Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Kir Kolyshkin | d54dfa112d4 | Released ploop 1.6Changelog: see http://wiki.openvz.org/Download/ploop/1.6/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 4a68ce12e09 | ploop.spec: enhance BuildRoot as per EPEL guidelineshttp://fedoraproject.org/wiki/EPEL/GuidelinesAndPolicies#BuildRoot_tag Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | da2fa59527c | ploop.spec: force vzctl >= 4.1.2vzctl versions older than 4.1.2 has a buffer overflow that strikes when using ploop-lib 1.6. Since ploop-lib should not require vzctl, use Conflicts tag to say what we want to say. See more details at http://git.openvz.org/?p=vzctl;a=commit;h=658010cf Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 27af6170035 | lib/.gitignore: add symbols.cSee commit 1ae04cc Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 6827a6d8d0a | Revert "ploop.spec: require libs of the proper arch"Apparently in RHEL5 (which we use to build this package) this macro (%_isa) is not supported, so we end up with a broken dependency. This reverts commit 3f07010bd930837082de32ba012411b28a6440be. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 508158daac4 | [build] fix check-api logicApparently we need to sort both lists of functions before trying to run diff on those, otherwise diff complains about function positions, which is not what we want. So change the logic of 1. gensym.sh to emit just sorted list of functions 2. include/Makefile's check-api target to generate cur-dynload.h as a sorted list of functions. diff will now ignore the differences in positions. NEVER... | |||
Kir Kolyshkin | c5b291e18b8 | ploop.spec: require our static e2fsresizeThis is an addition to commit 2a50fb2. See the description in there. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 002b574968b | dynload.h: add more external functions* create_snapshot_ex() introduced by commit b2cf1f4 * complete_running_operation() made public in commit 9933856 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 4715e7adb49 | [build] introduce hook to check if dynload.h is up to dateWith this patch, make will check if dynload.h is up to date, and exit with an error if it's not. In such case, you need to manually add missing functions to dynload.h, near the end of struct ploop_functions. The case when we remove an external function is not yet supported. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 9f1e905556d | include/dynload.h: addThis file was autogenerated before. We can't do that now when we are adding more functions to libploop.h, since ordering is important. So, this commit adds a static version of dynload.h as it appeared in ploop-1.5 (with slight changes such as added/removed comments and preprocessor inclusion guard). The next commit will introduce a way to check if the file is up-to-date. Signed-off-by: Kir Kol... | |||
Igor Sukhih | 2a50fb23b7d | Call custom /usr/libexec/resize2fs if availableresize2fs as shipped in RHEL6 distro does not have support for EXT4_IOC_RESIZE_FS ioctl which greatly improves resizing speed. Such support appeared in e2fsprogs-1.42, released Nov 29, 2011. (Note that standard RHEL6 kernel doesn't have this support either, it comes with OpenVZ RHEL6-based kernel). Reference: PSBM-14853 Reference: ploop@829441 | PSBM-14853 | ||
Igor Sukhih | 9933856dca8 | ploop_complete_running_operation: make publicReference: ploop@828591 | |||
Igor Sukhih | 05491a5ebb0 | ploop_resize_image: use single flag for online grow/shrinkBy default, online resize is performed. Reference: PSBM-17220 Reference: ploop@829167 | PSBM-17220 | ||
Kir Kolyshkin | cada8bee26c | [style] include/libploop.h: simplify a commentSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 75ccb289eae | tools/ploop-snapshot.c: added forgotten GPL headerSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 6bdcb70a49d | lib/Makefile: there are no PROGS hereSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | a9bfdea554e | alloc_diskdescriptor(): log error if calloc() failsOtherwise functions such as ploop_alloc_disk_descr() may fail silently, and then ploop_get_last_error() will show something irrelevant. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 2c58435248f | lib/ploop.h: remove PL_EXT from couple of protosThese two functions are not used by tools and were mistakenly marked with PL_EXT in commit 85fc03a. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 3f07010bd93 | ploop.spec: require libs of the proper archSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 39303c77d76 | Revert "add_delta(): prevent multiple mounts"As Maxim Patlasov puts it: > We regard "ploop cmd ..." as low-level tool for developers, > testers and admins. Guy should know what he's doing. > > Kir Kolyshkin wrote: > >> Still, there is a possibility of race here, and we can't use >> ploop_global_lock() because it is already used in >> ploop_find_dev(), so suggestions are welcome. > > This the main reason to NACK the patch. It'd give the f... | |||
Igor Sukhih | 1f2623b238e | create_empty_preallocated_delta(): fixed type truncateReference: PSBM-12162 Reference: ploop@745212 | PSBM-12162 | ||
Igor Sukhih | b2cf1f47320 | Extend switch snapshot APIint ploop_switch_snapshot_ex(struct ploop_disk_images_data *di, struct ploop_snapshot_switch_param *param) Reference: PSBM-16262 Reference: ploop@821571 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | PSBM-16262 | ||
Igor Sukhih | a68ffc22a58 | [style] Rename crc32() -> ploop_crc32()The crc32 is widely used name Reference: ploop@821564 | |||
Kir Kolyshkin | d0e58c753c1 | [style] Whitespace changesThese are to narrow the gap between ploop codebase in SVN and this one. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | d5e157b426e | [style] change ordering of case statementsSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 713175ac8cb | __ploop_discard(): fix exit code after 809436Before commit ploop@809436 the code was: ret = ploop_trim(mount_point, minlen_b, cluster); ... exit(ret < 0); and since ploop_trim() only returns 0 or -1 it was all correct. After commit ploop@809436 ret can get value from blk_discard() which can return SYSEXIT_DEVIOC so the (ret < 0) check is no longer valid. Fix by using (ret != 0) Reference: ploop@821763 Signed-off-by: Kir Kolyshkin ... | |||
Kir Kolyshkin | 7f31c31996c | ploop_raw_discard(): do not return -1This fixes exit(-1) from ploop balloon discard Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | e67b620d9ed | lib/balloon.c: some more "do not return -1" fixesThese are to fix exit code of "ploop balloon discard" Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | eaff6e63869 | [style] resize_gpt_partition(): do not init retNo need to initialize ret as we do that at the very beginning of the function. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 0216896cc0c | ploop_resize_image(): fix compiler warning ploop.c: In function 'ploop_resize_image': ploop.c:1626:6: error: 'new_fs_size' may be used uninitialized in this function [-Werror=maybe-uninitialized] ploop.c:1663:8: note: 'new_fs_size' was declared here Introduced by commit b8fbdad Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 88e2d4e9779 | ploop_resize_image(): do not return -1Fix a few cases in ploop_resize_image() in which we return -1. We should not do this as the value is used as an exit code from ploop resize command. This, together with the 10 or so previous patches, should significantly decrease the probability of doing exit(-1) from ploop resize. I am not sure though I eliminated all such cases. Reference: ploop@821373 Signed-off-by: Kir Kolyshkin <kir@ope... | |||
Kir Kolyshkin | 0ea5b9ed07d | resize_gpt_partition(): do not return -1, more exit codes1. We should not return -1 from resize_gpt_partition() since the value can eventually be used as exit code from ploop resize and ploop balloon discard. 2. If we can return a value less generic than SYSEXIT_CHANGE_GPT, do that Reference: ploop@821372 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | f6c3f2ffb68 | resize_fs(): do not return -1resize_fs() return value can be eventually used as ploop resize exit code so we end up doing exit(-1). Fix by returning SYSEXIT_SYS. Reference: ploop@821371 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 0d45d3e1460 | make_fs(): do not return -1This value is eventually used as ploop init exit code so we can't return -1 from here. Use SYSEXIT_MKFS. Reference: ploop@821370 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | b932e33157d | dumpe2fs(): do not return -1Return code from dumpe2fs() can be returned from ploop_resize_image() and is then used as ploop resize exit code, leading to exit(-1). Fix by returning SYSEXIT_SYS from dumpe2fs() in case of errors. Also, now we can also return this value directly from shrink_device(), which return value can also be returned from ploop_resize_image(). So, this patch fixes two cases where 'ploop resize' can d... | |||
Kir Kolyshkin | 9ea6cbaf7ef | ploop_balloon_complete(): do not return -1Use standard SYSEXIT_* codes. Reference: ploop@821368 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 52cb41b56c6 | ploop_balloon_complete(): do not supply NULL to ioctl()There is no need to. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 7ef24315364 | ploop balloon *: fix exit codeBy not returning -1 from get_balloon(), and returning SYSEXIT_PARAM instead, we fix about 8 "exit(-1)" cases with ploop balloon commands. Reference: ploop@821366 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | c7d196ca13c | ploop ballon: fixed a number of exit(-1) casesWe should not return -1 from main(), exit codes are positive numbers. Fix by using SYSEXIT_PARAM in most cases, and SYSEXIT_SYS for the case when ploop_lib_init() fails. Reference: ploop@821365 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 93af756bbf5 | Introduce and use SYSEXIT_FSCKIn case fsck on an underlying file system failed, return the appropriate error code. In particular, this fixes two cases when ploop_resize_image() was returning -1 which is wrong because its return value is used as an exit code from "ploop resize". Reference: ploop@821364 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 2592c75d191 | ploop_resize_image(): fix an error codeWe should not return -1 from this function because its return code is used as exit code for 'ploop resize'. In case we don't like DiskDescriptor.xml, the proper code to return is SYSEXIT_DISKDESCR. Reference: ploop@821363 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | c7c0f29a24f | ploop.spec: require util-linuxWe use /sbin/mkfs which is in util-linux, so let's require it. Reference: ploop@821189 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 826f5335e33 | ploop.spec: require e2fsprogsWe use resize2fs binary, plus since commit 7e47931 we use tune2fs, plus since commit 0badb9d we use e2fsck and dumpe2fs from the library. These binaries come from e2fsprogs package so let's require it from the spec file. Reference: ploop@821188 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | ef14fe46050 | Fix ploop_get_info() for a particular caseUpdate .statfs info in case file does not exist and ploop device is stopped. Reference: PSBM-16977 Reference: ploop@821111 | PSBM-16977 | ||
Kir Kolyshkin | 949fbaae4df | [style] some whitespace cleanupReference: ploop@820864 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | c80848631ad | Fixed size checks and rounding in ploop_{create,resize}_image[kir@openvz.org: changelog, macros formatting] References: ploop@815750, ploop@820828 | |||
Kir Kolyshkin | e9e5c7c3b88 | Fixed comments in ploop_resize_image()After commit 2bb0fb3: 1 Use C-style comments for long comments 2 childs -> children 3 alligment -> alignment After commit 83c51b1: 4 it's 4x not 2x now, fix comment accordingly Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | b8fbdad5b4d | Fix resize in autocompact modeIt was broken by offline shrink patch set Reference: ploop@811617 | |||
Igor Sukhih | 83c51b1ebf7 | Fix fail to shrinkAlign size supplied to resize2fs to 4k Increase delta to (4 * blocksize) as a workaround fo future investigation Reference: PSBM-15919 Reference: ploop@811218 | PSBM-15919 | ||
Igor Sukhih | 9ce6296a09d | replace __u64 -> off_t for size parameter in the set of resize related functionsReference: ploop@811101 |