OpenVZ-legacy
  1. OpenVZ-legacy

ploop

Public
AuthorCommitMessageCommit dateIssues
Kir KolyshkinKir Kolyshkin
f28acaec77cReleased ploop 1.8Changelog: see https://openvz.org/Download/ploop/1.8/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3c5415ffd7fploop grow: check sizeFor v1 format, it should not exceed 2T. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
fd7b8f16e46tune_fs(): drop absolute path to tune2fsThis is an addition to commit f30a21b. Not sure why I missed this one. Reference: ploop@895284 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
798d618a482tools/ploop: allow T suffix for blockdev sizeIt is not uncommon to have ploop devices of a few TB size, so let's allow T suffix for size argument. Document it in usage and ploop(8) man page. While at it, change lowercase (kmg) to uppercase (KMG) in suffixes in usage, since usually lowercase is used for bits and uppercase for bytes. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9023b1fbebctools parse_size(): print errorAdd option name parameter to parse_size(), and make it print an error about invalid argument or tool large value. Modify all callers accordingly. Before: # ploop grow -s 8T DiskDescriptor.xml Usage: ploop grow -s NEW_SIZE -d DEVICE ... After: # ploop grow -s 8T DiskDescriptor.xml ERROR: Invalid argument to option -s: 8T Usage: ploop grow -s NEW_SIZE -d DEVICE ... # ploop grow -s 4...
Kir KolyshkinKir Kolyshkin
684ec719eb2ploop_grow_device(): show "Growing..." after checksOnly show we are about to grow device when all preliminary checks are done. Reference: ploop@895223 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4cdfdbc5bcaploop_grow_delta_offline(): use delta.versionSince we have used open_delta(), version field is already set in struct delta by using ploop1_version(), so we don't have to use it again. Reference: ploop@895223 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e66b3ecf7edploop_di_add_image(): fix log message1. Start with Uppercase 2. Use present continious. add snapshot -> Adding snapshot Reference: ploop@894400 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
516f715d656ploop convert: use present continious for logBackup -> Backing up Convert -> Converting Reference: ploop@894399 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
149656d46e7ploop convert: typo in log messageverion -> version Reference: ploop@894398 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
7c667b4d62aploop_store_diskdescriptor(): fix image name normalizationIn case DiskDescriptor.xml file name doesn't have any path components (i.e. it is literal "DiskDescriptor.xml"), realpath is not called and basedir is an empty string. Function normalize_image_name() just removes the first character from the image name if basedir is empty. Therefore, image file names are not normalized as they should, instead bogus file names are produced in the resulting DiskD...
Kir KolyshkinKir Kolyshkin
8dcb2d22422ploop_check(): remove duplicated codeThis is a fix to commit 17ebb77 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
e6b8951899cswitch snapshot: read parameters from image we are to switch toOn switch to snapshot action we should read image parameters for new top delta from image we going to switch on Reference: PSBM-20882 Reference: ploop@891828PSBM-20882
Kir KolyshkinKir Kolyshkin
29a3bbaf632ploop_change_fmt_version(): fix compiler errorWhen building rpms, a combination of CFLAGS provided by RPM_OPT_FLAGS is leading to the following error: ploop.c: In function 'ploop_change_fmt_version': ploop.c:2513:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] ploop.c:2398:6: note: 'ret' was declared here cc1: all warnings being treated as errors Fix by setting ret to 0. Signed-off-by: Kir ...
Kir KolyshkinKir Kolyshkin
eeaf8da96a7tools/ploop-fsck: addIt's a wrapper for ploop-check, added for backward compatibility as per Igor's request. Reference: ploop@891451 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8245de2e3e7tools/Makefile: don't strip binariesThat way we can't build proper debuginfo rpms. Besides, rpmbuild takes care of stripping binaries. Reference: ploop@891450 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d09c500851cploop(8): add ploop convertReference: ploop@891669 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
881226b1f27ploop(8): add ploop resize to SYNOPSYSReference: ploop@891668 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
83873df50dcploop(8): add -v for ploop initThis is an addition to commit 97c75a4/ploop@862569 which introduced -v argument to ploop init. Reference: ploop@891667 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c099d26c9c6ploop init, convert: unify -v parsing1 Create and use parse_version_opt() 2 ploop init: show usage in case of invalid -v argument 3 ploop convert: print error in case of invalid -v argument Reference: ploop@891463 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4ac97ac95b4ploop init usage: add -v VERSIONThis is an addition to commit 97c75a4/ploop@862569 which introduced -v argument to ploop init. Reference: ploop@891462 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
17ebb772b76Functionality to convert from/to v1/v2 ploop version format1. Convert The index table converion stages * Preserve original index table as $NAME.idx * Mark image as dirty and set flag CIF_FmtVersionConvert * Change index table format version * Drop dirty and CIF_FmtVersionConvert flag Limitation * Online convert is not supported 2. Restore The restore logic (in case convertion failure) was integrated in ploop mount logic 3. CLI Extend 'ploop-convert...PSBM-19205
Igor SukhihKir KolyshkinIgor Sukhih
8c3a45056e0resize_gpt_partition(): skip if no partitionCalling resize_gpt_partition() on device without partition can corrupt file system Reference: ploop@891209
Kir KolyshkinKir Kolyshkin
66505e80c5bcreate_image(): don't segfaultCommit 96aebd2 was bad: get_disk_descriptor_fname() tried using di->images[0]->file without first initializing di->images so it segfaulted. The fix to this chicken and egg is to introduce get_disk_descriptor_fname_by_image() function and use it from create_image(). Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0a148f536e8setver.sh: don't remove rpms if rpm install failedSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
603b16ee1baploop fsck: rename to ploop checkRename ploop fsck (and corresponding structure, defines, and function) to ploop check. The problem is, the word 'fsck' implies filesystem and while ploop image kinda looks like a filesystem, it is not. Since ploop library also does filesystem check (the real fsck), this is becoming more messy. Using the word 'check' for ploop image check would be more appropriate, and there will be no confusi...
Kir KolyshkinKir Kolyshkin
80cf616cfa3tools/.gitignore: add missing objectsSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
875585ee850include/dynload.h: add new prototypesSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
74e98f9766bAdd ploop_get_spec()This is functionality to get ploop image specification struct ploop_spec { off_t size; __u32 blocksize; int fmt_version; char dummy[32]; }; int ploop_get_spec(struct ploop_disk_images_data *di, struct ploop_spec *spec); bug #PSBM-19603 Reference: ploop@888715 Signed-off-by: Kir Kolyshkin <kir@openvz.org>PSBM-19603
Igor SukhihKir KolyshkinIgor Sukhih
21cc0d67fb6Export ploop_is_large_disk_supported()bug #PSBM-19603 References: ploop@888659, ploop@890927 Signed-off-by: Kir Kolyshkin <kir@openvz.org>PSBM-19603
Igor SukhihKir KolyshkinIgor Sukhih
f0dbf109b98Make get_basedir() function ends with '/'References: ploop@888339, ploop@888700 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
96aebd22e12BUGFIX: create_image(): error out if dd.xml existSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6c957fc1705e2fsck(): properly check e2fsck binary exit codeA quote from e2fsck(8) man page: > The exit code returned by e2fsck is the sum of the following conditions: > 0 - No errors > 1 - File system errors corrected > 2 - File system errors corrected, system should > be rebooted > 4 - File system errors left uncorrected > 8 - Operational error > 16 - Usage or syntax error > 32 - E2fsck cancel...PSBM-20497
Kir KolyshkinKir Kolyshkin
0f0a1baae3cIntroduce run_prg_rc()This is the same as run_prg, but if second argument (int *rc) is non-NULL and the program to run has exited, the exit code is not analyzed but is written to *rc. To be used by the next patch. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b058abccd33ploop mount: add -F to run fsck for inner fsAlso, document it in ploop(8) as well as in ploop mount help. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ffd2a706677ploop_mount_fs(): add option to run fsck1. Add fsck field to ploop_mount_param. Currently it is a boolean flag. 2. Call e2fsck() from ploop_mount_fs(), if param->fsck is set and filesystem appears to be extN. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6353c618fe5e2fsck(): introduce E2FSCK_* flagsSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
de5a854a17ae2fsck(): minor refactoringSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5ba063efafcploop --help: rm -P from ploop mount syntaxThis is an addition to commits e2fc3e4 and 3f46ed1. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
11fbb73f188create_image(): remove useless assignmentret is reassigned again after a couple of lines. This is probably a leftover after some code refactoring. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3352caac291ploop init: fix an error messageBefore this patch: # ploop create a Error in create_image (ploop.c:547): File already exists a After: # ploop create a Error in create_image (ploop.c:547): Can't create a: File exists Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
20ee6862fefIntroduce tmpfiles.d/ploop.confIn modern distros, /var/lock is a symlink to /run/lock, and /run is on tmpfs so it's not saved between reboots. Now, in order to have a consistent directory under it, a tmpfiles.d mechanism is introduced in most distros running systemd (for example see https://fedoraproject.org/wiki/Packaging:Tmpfiles.d). This should fix bug #2493. Note for old distros we still carry /var/lock/ploop in both in...
Kir KolyshkinKir Kolyshkin
d49bf6931adRevert "lib/lock.c: create_file(): make sure dir exists"This fix was very wrong, because 1. It mistakenly uses basename() rather than dirname() (bug #2623) 2. The only place that needs fixing is ploop_global_lock() https://bugzilla.openvz.org/2623 Reported-by: poiuty <poiuty@lepus.su> This reverts commit 30a0185c55c1ab0497df51a0551d90a4be0fc30d. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
85324674f91Revert "Create ploop in the PLOOP_FMT_V2 by default"Format V2 is still experimental (i.e. beta), so unless asked for explicitly, we'd rather use V1. This reverts commit beb439df7bfe4bf641e31fecd52dd32b4e756219. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6f097d45c37Released ploop 1.7Changelog: see http://wiki.openvz.org/Download/ploop/1.7/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f3d80bd03c1dynload.h: note there are no new functions in 1.7Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8690dd14c61lib/merge.c: fix a compilation warningmerge.c: In function 'merge_image': merge.c:297: warning: 'version' may be used uninitialized in this function Introduced by commit 97c75a4/ploop@862569 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3ee5071d761resize_fs(): try harder to find resize2fs binarySince introducing ploop_execvp() function, we can now rely on it to try finding resize2fs binary if our pre-defined list wasn't helpful. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f30a21bf503lib/fsutils.c: drop absolute paths to binariesDue to previous commit, we can be fine without hardcoding absolute paths to binaries we use. This fixes bug #2595. https://bugzilla.openvz.org/2595 Reported-by: Thomas Lucke (Lucky) <bugzilla.openvz.org@be.lucky.li> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3e2f5c2b0dfrun_prg(): introduce and use ploop_execvp()This is the same as libc-provided execvp (as far as I am able to check with strace), the only difference is we have our own set of directories to look a binary in, instead of of relying on PATH. We are a library and should not rely on PATH containing /sbin and be useful in general. Alternative approach would be to modify PATH, but this is forbidden for threaded processes (which we could have)...