Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
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)... | |||
Kir Kolyshkin | f899afa4f83 | run_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 Kolyshkin | 6683a6f95b4 | get_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 Kolyshkin | 2c873a96009 | ploop_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 Kolyshkin | e954977b0f3 | ploop(8): add -B option for ploop initThis is an addition to commit 4c42a94/ploop@853465 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | 1d4ab272e4b | make_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@864015 | PSBM-19204 | ||
Igor Sukhih | beb439df7bf | Create ploop in the PLOOP_FMT_V2 by defaultReference: ploop@868966 | |||
Kir Kolyshkin | 0c7f201681c | ploop_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 Sukhih | 97c75a4a8cb | Large 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 Kolyshkin | 440cb518ec1 | add_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 Kolyshkin | ce25dba38a7 | print_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 Sukhih | 60fc590cb8b | ploop_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 Sukhih | 673a19be492 | ploop_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@854263 | PSBM-18837 | ||
Igor Sukhih | 4c42a94931d | ploop_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@853465 | PSBM-18735 | ||
Igor Sukhih | cb452baf224 | More clear errors on parsing DiskDescriptor.xmlDistinguish between 'file not found' and 'file size == 0' errors. Reference: ploop@877917 | |||
Igor Sukhih | 83182e5f598 | do_lock(): fix fd leak, refactor err pathReference: ploop@879586 | |||
Igor Sukhih | 48fcee8d1ed | do_lock(): add timeout tracking logic..to remove SA_RESTART requirements Reference: ploop@850223 | |||
Kir Kolyshkin | cd78b7ae701 | ploop_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 Kolyshkin | 30a0185c55c | lib/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 Kolyshkin | 11aeb5edccf | Makefile.inc: ability to add CFLAGSSo we can say something like CFLAGS=-m32 make Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 112a24f69c3 | lib/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 Kolyshkin | 68011f19c96 | relocmap2relocblks(): 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 Kolyshkin | 57f4b89ae60 | convert_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 Kolyshkin | 5a57b3ee30f | ploop balloon: fix -f processing...in a few places. Reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | eb0ed8aeef7 | ploop_balloon_check_and_repair(): do not close(-1)Reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | d8972af2d20 | create_snapshot(): don't pass -1 to close()Reported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ba19221a9d1 | ploop_send(): fix returning SYSEXIT_LOOPReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 0bd4c621336 | ploop_balloon_check_and_repair(): don't leak pfiemapReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 1e0ff2a7577 | grow_raw_delta(): return SYSEXIT_FSYNC...in the appropriate place. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | f88cab036c7 | grow_raw_delta(): free bufReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 117af9c98b1 | do_lock(): do not leak opened fdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 40b5d982ee6 | run_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 Kolyshkin | 8c623b95c17 | ploop discard: free diReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ae4d37da4d3 | plooptool_clear(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 65931f8b081 | plooptool_rm(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 7496c29e4b4 | plooptool_start(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 0f06f78ac18 | plooptool_stop(): close lfdReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ad1fcdb4e8e | open_delta(): fix uninitialized errPointed out by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 99c31b4adb7 | expanded2raw(): don't delete non-created fileReported by Coverity. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 7aa4d7ee87a | ploop-grow: add DiskDescriptor.xml format to usageSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ee823ead56a | ploop 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 Kolyshkin | 3961f8b333f | [style] tools/ploop-grow.c: remove unused statementSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | c69857bb6b9 | ploop 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 Sukhih | aae399992c8 | Introduce 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 Kolyshkin | 5c0ce6320c5 | lib/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> |