OpenVZ-legacy
  1. OpenVZ-legacy

ploop.ovzl

Public
AuthorCommitMessageCommit dateIssues
Kir KolyshkinKir Kolyshkin
85201e3bcefReleased 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 MishinKir KolyshkinDmitry Mishin
e076e32098cploop(8): fixed according to doc team reviewReview done by apavlenko, vlikhanov. Reference: ploop@769578
Igor SukhihKir KolyshkinIgor Sukhih
c44912f8a3eadd_deltas(): removed unneded trick with 'i'
Kir KolyshkinKir Kolyshkin
73b63bb52fcploop 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 KolyshkinKir Kolyshkin
215c8504213ploop 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 KolyshkinKir Kolyshkin
abf60250246lib/pcopy.c send_process: improve an error messageSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b38c5048903lib/balloon.c whitespace nitpickFix 8 spaces instead of a tab, introduced by commit 4796f0e Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3aed4eb2187ploop-copy: improve usage* Add -d to -s form * Describe arguments and action. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
04c1522fc87ploop-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 KolyshkinKir Kolyshkin
1973c80538flib/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 KolyshkinKir Kolyshkin
59cadb01568setver.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 KolyshkinKir Kolyshkin
f2ad9d3713atools/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 KolyshkinKir Kolyshkin
13327623e09tools/ploop.c: do not return -1 from main()Proper exit codes should be used. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c0608b34be3tools/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 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>