Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Kir Kolyshkin | f28acaec77c | Released ploop 1.8Changelog: see https://openvz.org/Download/ploop/1.8/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 3c5415ffd7f | ploop grow: check sizeFor v1 format, it should not exceed 2T. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | fd7b8f16e46 | tune_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 Kolyshkin | 798d618a482 | tools/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 Kolyshkin | 9023b1fbebc | tools 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 Kolyshkin | 684ec719eb2 | ploop_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 Kolyshkin | 4cdfdbc5bca | ploop_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 Kolyshkin | e66b3ecf7ed | ploop_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 Kolyshkin | 516f715d656 | ploop convert: use present continious for logBackup -> Backing up Convert -> Converting Reference: ploop@894399 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 149656d46e7 | ploop convert: typo in log messageverion -> version Reference: ploop@894398 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 7c667b4d62a | ploop_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 Kolyshkin | 8dcb2d22422 | ploop_check(): remove duplicated codeThis is a fix to commit 17ebb77 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | e6b8951899c | switch 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@891828 | PSBM-20882 | ||
Kir Kolyshkin | 29a3bbaf632 | ploop_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 Kolyshkin | eeaf8da96a7 | tools/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 Kolyshkin | 8245de2e3e7 | tools/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 Kolyshkin | d09c500851c | ploop(8): add ploop convertReference: ploop@891669 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 881226b1f27 | ploop(8): add ploop resize to SYNOPSYSReference: ploop@891668 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 83873df50dc | ploop(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 Kolyshkin | c099d26c9c6 | ploop 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 Kolyshkin | 4ac97ac95b4 | ploop 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 Sukhih | 17ebb772b76 | Functionality 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 Sukhih | 8c3a45056e0 | resize_gpt_partition(): skip if no partitionCalling resize_gpt_partition() on device without partition can corrupt file system Reference: ploop@891209 | |||
Kir Kolyshkin | 66505e80c5b | create_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 Kolyshkin | 0a148f536e8 | setver.sh: don't remove rpms if rpm install failedSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 603b16ee1ba | ploop 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 Kolyshkin | 80cf616cfa3 | tools/.gitignore: add missing objectsSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 875585ee850 | include/dynload.h: add new prototypesSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | 74e98f9766b | Add 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 Sukhih | 21cc0d67fb6 | Export ploop_is_large_disk_supported()bug #PSBM-19603 References: ploop@888659, ploop@890927 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | PSBM-19603 | ||
Igor Sukhih | f0dbf109b98 | Make get_basedir() function ends with '/'References: ploop@888339, ploop@888700 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 96aebd22e12 | BUGFIX: create_image(): error out if dd.xml existSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 6c957fc1705 | e2fsck(): 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 Kolyshkin | 0f0a1baae3c | Introduce 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 Kolyshkin | b058abccd33 | ploop 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 Kolyshkin | ffd2a706677 | ploop_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 Kolyshkin | 6353c618fe5 | e2fsck(): introduce E2FSCK_* flagsSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | de5a854a17a | e2fsck(): minor refactoringSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 5ba063efafc | ploop --help: rm -P from ploop mount syntaxThis is an addition to commits e2fc3e4 and 3f46ed1. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 11fbb73f188 | create_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 Kolyshkin | 3352caac291 | ploop 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 Kolyshkin | 20ee6862fef | Introduce 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 Kolyshkin | d49bf6931ad | Revert "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 Kolyshkin | 85324674f91 | Revert "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 Kolyshkin | 6f097d45c37 | Released ploop 1.7Changelog: see http://wiki.openvz.org/Download/ploop/1.7/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | f3d80bd03c1 | dynload.h: note there are no new functions in 1.7Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 8690dd14c61 | lib/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 Kolyshkin | 3ee5071d761 | resize_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 Kolyshkin | f30a21bf503 | lib/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 Kolyshkin | 3e2f5c2b0df | run_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)... |