OpenVZ-legacy
  1. OpenVZ-legacy

ploop.ovzl

Public
AuthorCommitMessageCommit dateIssues
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)...
Kir KolyshkinKir Kolyshkin
f899afa4f83run_prg(): print error if execvp() failedexecvp() never returns if not failed, so if we are executing past it it failed, and we need to tell a user why. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6683a6f95b4get_image_param(): don't check di for NULLThere is no way di can be null in this place, we have dereferenced it a few times before. So there is no need to check if di is NULL. Reported by Coverity, CID 1026194 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
2c873a96009ploop_find_dev(): assume ploop cookie is supportedCommit e644ed7 introduced cookie-based registration, and it required specific kernel version (>= 042stab061.1). Now, in a year, let's assume that no one is running kernel older than the one mentioned, and drop run-time check for kernel version. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e954977b0f3ploop(8): add -B option for ploop initThis is an addition to commit 4c42a94/ploop@853465 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
1d4ab272e4bmake_fs(): make fs to allow resize to 16TReserve enough space so that the block group descriptor table can grow to 16T. Make reservation independent on ploop format to allow online resize on 'ploop resize' action. Reference: PSBM-19204 References: ploop@862585, ploop@863839, ploop@864015PSBM-19204
Igor SukhihKir KolyshkinIgor Sukhih
beb439df7bfCreate ploop in the PLOOP_FMT_V2 by defaultReference: ploop@868966
Kir KolyshkinKir Kolyshkin
0c7f201681cploop_read_disk_descr(): set *di to NULL in case of errorJust in case we do not giving some half-assed data in case of error, set *di to NULL if we are returning an error. Reference: ploop@827205 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
97c75a4a8cbLarge ploop image support* Introduce new BAT format version PLOOP_FMT_V2 * Extend m_SizeInSectors from _u32 to __u64 * Process ploop format on new delta creation * Add version autodetection (large format supported if /sys/module/ploop/parameters/large_disk_support exist) * Add possiblity to specify version on create action * Update FSCK/GROW/BALLOON/MERGE logic Reference: PSBM-19034 References: ploop@862569, ploop@8...PSBM-19034
Kir KolyshkinKir Kolyshkin
440cb518ec1add_delta(): print more diags if EBUSYShow contents of /sys/block/ploop* if ioctl(PLOOP_IOC_ADD_DELTA) returns with EBUSY Reference: PSBM-17821 Reference: ploop@835860 Signed-off-by: Kir Kolyshkin <kir@openvz.org>PSBM-17821
Kir KolyshkinKir Kolyshkin
ce25dba38a7print_output(): generalize print_lsof(), improveThis patch generalizes and simplifies print_lsof() and renames it to print_output() so now it can print output of any command. Note that it is no longer printing error message, this should be done by a caller. It is in fact better because it makes sense to print error message *after* print_output(), otherwise it can be lost in lots of output. Also, there are a few improvements 1. Last \n from...
Igor SukhihKir KolyshkinIgor Sukhih
60fc590cb8bploop_log(): fix loglevel checkingLoglevel is not correctly checked in logger_ap(), so messages with the same level are not logged to a file (but are logged to screen). Reference: ploop@840087 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
673a19be492ploop_find_dev(): treat ENODEV as ENOENT on /sys readsThe error is the following: Can't open or read /sys/block/ploop55394/pdelta/0/image: No such device [-1] We should treat ENODEV as ENOENT. Reference: PSBM-18837 Reference: ploop@854263PSBM-18837
Igor SukhihKir KolyshkinIgor Sukhih
4c42a94931dploop_create_image(), ploop init: add FS blocksize* ploop_create_image(): add file system block size parameter * ploop init: add option to set FS blocksize # ploop init [-B FSBLOCKSIZE] DELTA Reference: PSBM-18735 Reference: ploop@853465PSBM-18735
Igor SukhihKir KolyshkinIgor Sukhih
cb452baf224More clear errors on parsing DiskDescriptor.xmlDistinguish between 'file not found' and 'file size == 0' errors. Reference: ploop@877917
Igor SukhihKir KolyshkinIgor Sukhih
83182e5f598do_lock(): fix fd leak, refactor err pathReference: ploop@879586
Igor SukhihKir KolyshkinIgor Sukhih
48fcee8d1eddo_lock(): add timeout tracking logic..to remove SA_RESTART requirements Reference: ploop@850223
Kir KolyshkinKir Kolyshkin
cd78b7ae701ploop_snapshot_switch_param: guids are constguid and guid_old fields of struct ploop_snapshot_switch_param should be const. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
30a0185c55clib/lock.c: create_file(): make sure dir existscreate_file() is used for creating various lock files. The problem with recent distros /var/run is no longer static so we can't rely on /var/run/ploop existence. Therefore, add code to create a directory (and ignore EEXIST). https://bugzilla.openvz.org/2493 https://bugzilla.openvz.org/2597 Reported-by: Andrei Vinogradov <spamslepnoga@inbox.ru> Reported-by: Thomas Lucke (Lucky) <bugzilla.open...
Kir KolyshkinKir Kolyshkin
11aeb5edccfMakefile.inc: ability to add CFLAGSSo we can say something like CFLAGS=-m32 make Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
112a24f69c3lib/delta_read.c: fix 32-bit buildGot the following error: delta_read.c: In function 'ploop_grow_raw_delta_offline': delta_read.c:581: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'off_t' delta_read.c:581: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'off_t' delta_read.c: In function 'ploop_grow_delta_offline': delta_read.c:610: warning: format '%lu' expects ...
Kir KolyshkinKir Kolyshkin
68011f19c96relocmap2relocblks(): avoid null pointer derefWe do check relocmap for NULL at the beginning where we assign n: int n = (relocmap == NULL) ? 0 : relocmap->n_entries_used; but later we just defererence it without any check. relocmap->n_entries_used Apparently using n everywhere helps. Reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
57f4b89ae60convert_disk_descriptor(): check top_guid for NULLIf top_guid is null we can't do much, so let's error out. Pointed by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5a57b3ee30fploop balloon: fix -f processing...in a few places. Reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
eb0ed8aeef7ploop_balloon_check_and_repair(): do not close(-1)Reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d8972af2d20create_snapshot(): don't pass -1 to close()Reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ba19221a9d1ploop_send(): fix returning SYSEXIT_LOOPReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0bd4c621336ploop_balloon_check_and_repair(): don't leak pfiemapReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1e0ff2a7577grow_raw_delta(): return SYSEXIT_FSYNC...in the appropriate place. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f88cab036c7grow_raw_delta(): free bufReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
117af9c98b1do_lock(): do not leak opened fdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
40b5d982ee6run_prg: check for open() error, close fd1. Check for error from open(), report it and return error. 2. close fd Item 2 reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8c623b95c17ploop discard: free diReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ae4d37da4d3plooptool_clear(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
65931f8b081plooptool_rm(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
7496c29e4b4plooptool_start(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0f06f78ac18plooptool_stop(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ad1fcdb4e8eopen_delta(): fix uninitialized errPointed out by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
99c31b4adb7expanded2raw(): don't delete non-created fileReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
7aa4d7ee87aploop-grow: add DiskDescriptor.xml format to usageSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ee823ead56aploop grow: -s is now requiredAfter commit 3b403aa size is no longer optional and obviously it can't be 0. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3961f8b333f[style] tools/ploop-grow.c: remove unused statementSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
c69857bb6b9ploop grow: add DiskDescriptor.xml supportReference: fc31b4d Reviewed-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Igor Sukhih <igor@parallels.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
aae399992c8Introduce ploop_grow_image()This is high-level ploop grow, i.e. by DiskDescriptor.xml To be used by ploop grow (see next patch). [kir@openvz.org: patch splitting, log message] Reference: ploop@862573 Reviewed-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Igor Sukhih <igor@parallels.com>
Kir KolyshkinKir Kolyshkin
5c0ce6320c5lib/ploop.h: "unexport" some internal functionsAfter commit c33a245, we no longer have to export the following internal functions for our own tools: - open_delta - dirty_delta - clear_delta - grow_delta - grow_raw_delta - read_size_from_image Good. Good. Signed-off-by: Kir Kolyshkin <kir@openvz.org>