Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Kir Kolyshkin | 85201e3bcef | Released ploop 1.4Changelog: see ploop.spec Thanks ====== OpenVZ project would like to thank the following people who contributed patches and/or provided bug reports for this release: * Paparaciz Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Dmitry Mishin | e076e32098c | ploop(8): fixed according to doc team reviewReview done by apavlenko, vlikhanov. Reference: ploop@769578 | |||
Igor Sukhih | c44912f8a3e | add_deltas(): removed unneded trick with 'i' | |||
Kir Kolyshkin | 73b63bb52fc | ploop mount: tell about unsupported underlying fsSince kernel 042stab056.9 PLOOP_IOC_ADD_DELTA returns ENOTSUP in case underlying file system is not supported (currently we only support ext4). Check for ENOTSUP and print a nice explanatory error message. Reference: PSBM-13436 Reference: ploop@769111 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | PSBM-13436 | ||
Kir Kolyshkin | 215c8504213 | ploop copy send_process(): sync and freeze fsRight after executing STOPCOMMAND we need to 1. sync the filesystem, i.e. flush the page cache using syncfs() syscall 2. flush filesystem journal and freeze it (denying writes and marking filesystem state as clean. This should fix http://bugzilla.openvz.org/show_bug.cgi?id=2287#c2 Reported-by: Paparaciz <helpaz@gmail.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | abf60250246 | lib/pcopy.c send_process: improve an error messageSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | b38c5048903 | lib/balloon.c whitespace nitpickFix 8 spaces instead of a tab, introduced by commit 4796f0e Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 3aed4eb2187 | ploop-copy: improve usage* Add -d to -s form * Describe arguments and action. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 04c1522fc87 | ploop-copy -s: added mode to copy to local fileploop copy -s was writing data to stdout (for ploop copy -d to receive). This patch adds more to write to an opened file. send_process() new argument is_pipe should be set to non-zero value if we're writing to a pipe, and to 0 if we're writing to a local file. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 1973c80538f | lib/ploop.h: remove send_process() prototypeSince commit 66673002 added send_process() prototype to libploop.h, it does not make sense to have it in lib/ploop.h. Removed. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 59cadb01568 | setver.sh: exit with 0 if called w/o optionsIf setver.sh is called without any options, it's exit code is 1 because of if statements. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | f2ad9d3713a | tools/ploop.c: fixed build CC ploop.o ploop.c: In function ‘plooptool_mount’: ploop.c:240:5: error: label ‘err’ used but not defined make[1]: *** [ploop.o] Error 1 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 13327623e09 | tools/ploop.c: do not return -1 from main()Proper exit codes should be used. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | c0608b34be3 | tools/ploop.c: fix/unify working with diskdescriptor1 Introduce and use SYSEXIT_DISKDESCR exit code. 2 Introduce and use read_dd() which - checks if ploop_alloc_diskdescriptor succeeded - returns proper error codes Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 8ff44d325bd | Released ploop 1.3Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 0cd655c4944 | ploop.spec: fixCommit 7309b45aa mistakenly commited ploop.spec modified by setver.sh Revert it back to pristine state. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | 9bbe297b0f7 | parse_xml(): add Blocksize validationReference: ploop@767393 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | 0ad09688ff1 | Introduce Preallocated sign in DiskDescriptor.xmlThere is no good criteria for difference between plain and expanded formats. They only way to find out is to see if there's a noticeable difference between du -h image-file and df -h mount_point. Fix it. * Use <Preallocated>1</Preallocated> to mark base image as preallocated * Update DiskDescriptor.xml on convert action Reference: PSBM-13237 Reference: ploop@767390 | PSBM-13237 | ||
Kir Kolyshkin | 71e8e2e3524 | ploop ballon discard: fix usageThis time it's - offset for second line of options - describe *SIZE in a way similar to one used in ploop balloon resize. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Andrey Vagin | 3898d713f5e | ploop balloon discard: use parse_size() for --min-block argumentSigned-off-by: Andrey Vagin <avagin@openvz.org> Reference: ploop@767293 | |||
Kir Kolyshkin | 41dc83a605c | ploop balloon discard: fix tabs usage()There should be no tabs, otherwise output is screwed. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Andrey Vagin | 62bef3f3e68 | ploop balloon discard: parse_size return 0 in case of successSigned-off-by: Andrey Vagin <avagin@openvz.org> Reference: ploop@767292 | |||
Kir Kolyshkin | 312780a4ba3 | lib/pcopy.c receive_process(): resize iobuf if neededIt is not guaranteed that send_process() will send us cluster size in the first packet, so let's reallocate iobuf if needed. This improvement was suggested by Maxim Patlasov. Also, free(iobuf) at the end of the function. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 7309b45aa36 | get_image_info(): fix a potential leakMove ploop_get_attr("block_size") up since otherwise find_delta_names() allocates memory for *send_from_p and then ploop_get_attr() fails and we bail out with SYSEXIT_SYSFS. Not a big deal, but untidy. Reported-by: Maxim Patlasov <mpatlasov@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 83949f55849 | pcopy send_process(): only disable stdout log if neededIf ofd is not stdout, we can keep logging as is. Reported-by: Maxim Patlasov <mpatlasov@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 1d60d41626c | include/libploop.h: introduce PLOOP_LOG_NOSTDOUTWhile at it, provide a better description for PLOOP_LOG_ defines. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 2d7547f55bb | __ploop_discard(): remove unnecessary castsSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Andrey Vagin | 6621e823566 | ploop balloon discard: PLOOP_IOC_FBFILTER returns a positive valueioctl_device() can't handle it. Reference: ploop@766671 Signed-off-by: Andrey Vagin <avagin@parallels.com> | |||
Kir Kolyshkin | 4c26814285c | lib/balloon.c: add 'ing' to some log messagesStarting, waiting, killing etc Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Andrey Vagin | 4796f0e705e | ploop balloon discard: stop shrink if enough space is released (v2)The size of space which should be released is defined by an argument. We don't need to do more, because it will add extra fragmentation. v2: handle EBUSY from IOC_DISCARD_FINI Reference: ploop@766663 Acked-by: Maxim V. Patlasov <mpatlasov@openvz.org> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 693a2b61259 | ploop balloon discard: add ability to restrict a minimal size of relocated extentsNB: this requires kernel 042stab056.5 or later All extents, which size is less than a defined value, will not be relocated. v2: fix overflow (u32 * u32 is u32. Not u64.) use minlen_b (bytes) and minlen_c (clusters) fix parsing of long options [kir@openvz.org fixes: - fix usage (proper description of new options) - use parse_size for parsing --to-free argument - get block size from /proc - ad... | |||
Andrey Vagin | e190654a2a0 | ploop balloon: prepare discard to analyze free blocksFor that we should iterate blocks twice to collect statistics and to realocate blocks. v2: handle EBUSY from IOC_DISCARD_FINI Reference: ploop@766661 Acked-by: Maxim V. Patlasov <mpatlasov@openvz.org> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Andrey Vagin | d4ae1f0293f | ploop balloon: complete compacting if DISCARD_WAIT returned 0Now DISCARD_WAIT returns - 1 if free blocks were found - 0 if a discard mode of ploop has been disabled Reference: ploop@766660 Acked-by: Maxim V. Patlasov <mpatlasov@openvz.org> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Andrey Vagin | a8f3bbc60b8 | Declare new ioctl-s FBFILTER and FBDROPThose are available since kernel 042stab056.5 Reference: ploop@766659 Acked-by: Maxim V. Patlasov <mpatlasov@openvz.org> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 7e31c01dda5 | setver.sh: added --verbose, --build, --installAdded the following options -b, --build Build rpms -i, --install Build and install rpms -v, --verbose Be verbose, show version which we set Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 850576b2981 | tools/Makefile: no need to install lockdirThis belongs to and is done in lib/Makefile. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 6741770056d | ploop(8) man page: addSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 66818a46dbc | create image: if fallocate is not supported, failUsing ftruncate() does not lead to desired result (file with disk space really allocated). If we use ftruncate, since ploop is incabaple of working with sparse files yet, we can get something like this from the kernel: kernel: [62693.413845] Buffer I/O error on device ploop14p1 ploop_set_error=-22 We could use pwrite instead, but why bother? Reference: PSBM-13225 Reference: ploop@765408 Sign... | PSBM-13225 | ||
Igor Sukhih | 5972beb344e | Fixed offline snapshot creationCreating a snapshot for stopped CT fails miserably: # vzctl snapshot 902 Creating snapshot {b780f674-baa2-4f91-ba2a-85ac51b49761} Storing /vz/private/902/Snapshots.xml.tmp Storing /vz/private/902/root.hdd/DiskDescriptor.xml.tmp Error in get_image_size (ploop.c:1844): Can't find image by top guid {5fbaabe3-6958-40ff-92a7-860e329aab41} Failed to create snapshot: Error in get_image_size (ploop.c... | PSBM-13257 | ||
Kir Kolyshkin | c84aa4710ec | ploop_umount(): fix log messageIn another place we say "Unmounting" so let's do the same here. While at it, s/fs/file system/ Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Igor Sukhih | 8785c757279 | Fixed race between register/unregister_ploop_dev()When we start/stop a number of CTs in parallel, the following can happen: 2012-05-25T17:15:23+0400 : unregister /dev/ploop/::vzt:private:153:root.hdd:root.hdd 2012-05-25T17:15:23+0400 : remove stale registration /dev/ploop/::vzt:private:153:root.hdd:root.hdd ploop1 2012-05-25T17:15:23+0400 vzctl : Container 102 : Container is mounted 2012-05-25T17:15:23+0400 vzctl : Container 153 : Container i... | PSBM-13278 | ||
Kir Kolyshkin | 734399dd2ab | Factor out ploop_stop_device() from ploop_umount()No change in functionality, just shuffling the code around. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | df709133c20 | ploop_switch_snapshot(): fix a typo in variable nameSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 0feb8cb4523 | ploop snapshot: remove 'b' option from getoptThis is an addition to commit 8a3b66f. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 031bbc50aa7 | ploop mount: fix usage1. Fix indentation in arguments description (do not use tabs) 2. Fix -m argument name to be MOUNT_POINT Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 76401302496 | tools/ploop*: unify parsing -f optiontools/common.c: create parse_format_opt() tools/ploop*.c: make use of it Note that plooptool_convert() checks for invalid value of 'mode' below, so we don't have to do in options parse cycle. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 4122fb42dda | ploop convert: change -t to -f, fix usageOther commands accept ploop image format as -f argument, so fix this one for consistency. Also make its usage look more similar to other options. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 3f46ed1694f | ploop mount: fix usageAdd -m MOUNT_POINT -t FSTYPE -o MOUNT_OPTS and their argument description. Remove -P (addition to commit e2fc3e4). Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | d83ff4e634d | ploop start: remove 'P' from getoptThis is an addition to commit e2fc3e4. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 5dfc17a1581 | create_balloon_file(): fix error message and return codeWe are trying to create file, so it makes more sense to say "create" not "open", and return SYSEXIT_CREAT not SYSEXIT_OPEN. Signed-off-by: Kir Kolyshkin <kir@openvz.org> |