OpenVZ-legacy
  1. OpenVZ-legacy

ploop

Public
AuthorCommitMessageCommit dateIssues
Kir KolyshkinKir Kolyshkin
8ff44d325bdReleased ploop 1.3Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0cd655c4944ploop.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 SukhihKir KolyshkinIgor Sukhih
9bbe297b0f7parse_xml(): add Blocksize validationReference: ploop@767393 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
0ad09688ff1Introduce 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@767390PSBM-13237
Kir KolyshkinKir Kolyshkin
71e8e2e3524ploop 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 VaginKir KolyshkinAndrey Vagin
3898d713f5eploop balloon discard: use parse_size() for --min-block argumentSigned-off-by: Andrey Vagin <avagin@openvz.org> Reference: ploop@767293
Kir KolyshkinKir Kolyshkin
41dc83a605cploop balloon discard: fix tabs usage()There should be no tabs, otherwise output is screwed. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Andrey VaginKir KolyshkinAndrey Vagin
62bef3f3e68ploop balloon discard: parse_size return 0 in case of successSigned-off-by: Andrey Vagin <avagin@openvz.org> Reference: ploop@767292
Kir KolyshkinKir Kolyshkin
312780a4ba3lib/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 KolyshkinKir Kolyshkin
7309b45aa36get_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 KolyshkinKir Kolyshkin
83949f55849pcopy 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 KolyshkinKir Kolyshkin
1d60d41626cinclude/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 KolyshkinKir Kolyshkin
2d7547f55bb__ploop_discard(): remove unnecessary castsSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Andrey VaginKir KolyshkinAndrey Vagin
6621e823566ploop 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 KolyshkinKir Kolyshkin
4c26814285clib/balloon.c: add 'ing' to some log messagesStarting, waiting, killing etc Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Andrey VaginKir KolyshkinAndrey Vagin
4796f0e705eploop 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 KolyshkinKir Kolyshkin
693a2b61259ploop 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 VaginKir KolyshkinAndrey Vagin
e190654a2a0ploop 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 VaginKir KolyshkinAndrey Vagin
d4ae1f0293fploop 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 VaginKir KolyshkinAndrey Vagin
a8f3bbc60b8Declare 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 KolyshkinKir Kolyshkin
7e31c01dda5setver.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 KolyshkinKir Kolyshkin
850576b2981tools/Makefile: no need to install lockdirThis belongs to and is done in lib/Makefile. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6741770056dploop(8) man page: addSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
66818a46dbccreate 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 SukhihKir KolyshkinIgor Sukhih
5972beb344eFixed 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 KolyshkinKir Kolyshkin
c84aa4710ecploop_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 SukhihKir KolyshkinIgor Sukhih
8785c757279Fixed 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 KolyshkinKir Kolyshkin
734399dd2abFactor 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 KolyshkinKir Kolyshkin
df709133c20ploop_switch_snapshot(): fix a typo in variable nameSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0feb8cb4523ploop snapshot: remove 'b' option from getoptThis is an addition to commit 8a3b66f. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
031bbc50aa7ploop 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 KolyshkinKir Kolyshkin
76401302496tools/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 KolyshkinKir Kolyshkin
4122fb42ddaploop 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 KolyshkinKir Kolyshkin
3f46ed1694fploop 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 KolyshkinKir Kolyshkin
d83ff4e634dploop start: remove 'P' from getoptThis is an addition to commit e2fc3e4. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5dfc17a1581create_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>
Kir KolyshkinKir Kolyshkin
e1c48a706d5create_balloon_file(): umount, rm temp mnt pointIn create_balloon_file() which is called by ploop_init_image() which is called by ploop_create_image(), we create a temporary directory to be used as mount point, and mount the ploop image (in order to create balloon file). Neither the mounted image nor the temp dir is needed after it, so let's roll back properly and do umount and rmdir. Notes 1. Not sure why umount was done before only in the...
Kir KolyshkinKir Kolyshkin
8d7dbe22228create_balloon_file(): fix file name in error messageSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
19384a5a6b8ploop_create_image(): free disk descriptor if fstype is NULLSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d478dddfbaetools/ploop-stat: require device argumentploop-stat was the only tool with DEVICE argument being optional, with default to /dev/ploop0. This is inconsistent with other commands and the default doesn't make much sense now when we usually have a lot of ploop devices. Make DEVICE argument required. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
2b77cad2b9cMakefile: use uname -m not -iI can't tell you the whole story but on some distros (notably Debian and Ubuntu, maybe others) uname -i gives "unknown". This is what coreutils texinfo rant^W documentation says about this matter: -i' `--hardware-platform' Print the hardware platform name (sometimes called the hardware implementation). Print `unknown' if the kernel does not make this information easily availabl...
Kir KolyshkinKir Kolyshkin
0135a1e7bb4Makefile: use /usr/lib64 LIBDIR for x86_64Otherwise our 64-bit lib gets installed into /usr/lib. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b9bd87644d5ploop balloon: make it accept either -m or -dMost of the ploop balloon commands require both -d DEVICE and -m MOUNT_POINT arguments. This is redundant, since we can figure out one from another. So make ploop balloon accept either device, or mount point, or both, to make it easier to use. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9e3edfd0da5ploop stat: fix usage1 Options -l and -c are exclusive 2 DEVICE should be prepended by -d 3 Fix square brackets Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6f68f9a4f32tools/*: do not forget newlineSpotted a few places where we print informative or error message but forget a newline. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d8775aa7b8clib/balloon.c: redo ioctl_device as macroThis is an improvement because of two things: 1 Thanks to preprocessor stringification we don't have to have that long case statement, the code is much smaller now 2 The error message will now have the name and location of the function calling ioctl_device, not the ioctl_device itself. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1fc0accfd16ploop balloon discard: do syncfs() before processingI have noticed a situation when ploop balloon discard working on a CT fs in which CT is idle does not discards everything, so when you run it for the second time, it does some more. So that creates a situation in which we need to run ploop balloon discard a few times, even if no one is doing anything with the file system. After discussion with Maxim and Andrey, we agreed that Most probable fix...
Kir KolyshkinKir Kolyshkin
cbf7095e8f7lib/pcopy.c send_process(): check exit code of flush_cmdIf an external command executed by ploop copy -s -F cmd failed, something is wrong and we need to abort. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e2fc3e4f7ecmount: remove 'partitioned' option1. Remove 'partitioned' field from struct ploop_mount_opts (it is unused) 2. Remove -P option from ploop mount (it is unused) 3. Remove -P option from ploop start, always reread partition table, ignoring (but notifying about) possible error (same behavior as in ploop mount) 4. Remove -P option description from ploop.sgml Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d6e02fae95cFix SYSEXIT_PARAM valueSYSEXIT_PARAM value can't be -1 because in many cases it is returned from main() and thus becomes 255, and the exit code of 255 is kinda reserved by shell. In order to not change all the SYSEXIT_* codes, move SYSEXIT_PARAM to the end of the list. Signed-off-by: Kir Kolyshkin <kir@openvz.org>