OpenVZ-legacy
  1. OpenVZ-legacy

ploop

Public
AuthorCommitMessageCommit dateIssues
Kir KolyshkinKir Kolyshkin
167917c05ffReleased ploop 1.1CHANGES (since 1.0) * support for variable block size * default block size changed from 256K to 1M * ploop_set_log_file(): make NULL a valid argument * logger: introduce, use and expose PLOOP_LOG_NOCONSOLE * ploop_getdevice(): expose * ploop_store_diskdescriptor(): fix for a case when image is in root dir * Fixed expanded to preallocated conversion * Remove some unused functions and non-existen...
Kir KolyshkinKir Kolyshkin
5f177ddabfbmerge.c: fix a compiler warningmerge.c: In function ‘merge_image’: merge.c:363:27: error: ‘prev_blocksize’ may be used uninitialized in this function [-Werror=uninitialized] cc1: all warnings being treated as errors Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0e3bf94d9f5Fix a compiler warningploop.c: In function ‘ploop_mount’: ploop.c:1130:14: error: ‘prev_blocksize’ may be used uninitialized in this function [-Werror=uninitialized] In fact it's a bit too complicated for gcc to understand Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f1a89d46310lib/*: introduce and use B2S macroThis is the opposite of S2B. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
7d2636ee251lib/merge.c: a whitespace cleanup nitpickSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
da7b4adba24lib/*.c: use S2B macro where possibleInstead of hardcoded '<< 9'. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9ecb0d24bb4Fixed log messages ("remove" -> "Removing")Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Maxim PatlasovKir KolyshkinMaxim Patlasov
6a17d37e9b2Fix non-aligned pread in open_delta()ploop-resize calls open_delta with O_DIRECT. Consequently pread args should be sector-aligned.
Kir KolyshkinKir Kolyshkin
d03404fb55dtools/ploop-grow.c: fix wrt variable block sizeThis is a forgotten hunk of commit 8f2a7f1. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c55991ca7eainclude/ploop1_image.h: do not hardcode 9Use supplied define instead Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4a94b43ed09lib/ploop.h: add parentheses around S2B macro argumentVery useful in case of say S2B(a + b) Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
e49f67318caSet default blocksize to 1MReference: PSBM-10074PSBM-10074
Igor SukhihKir KolyshkinIgor Sukhih
bc2f690c75dAdd blocksize validation while creating new image
Igor SukhihKir KolyshkinIgor Sukhih
b1c32f2b8betools/ploop: remove unused and untested replace & add commands
Igor SukhihKir KolyshkinIgor Sukhih
8f2a7f189bcIntroduce variable block size* Store BlockSize to DiskDescriptor.xml on image create * Use blocksize from DiskDescriptor.xml for all operations * Read blocksize from ploop image header for non-DiskDeskriptor.xml case Reference: PSBM-10074PSBM-10074
Kir KolyshkinKir Kolyshkin
7b85a0cf2f1xml.c: fix a warning messagetowards an English English While at it, fix a capitalization in a comment Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4dd3defe43bAssorted log message fixes part II(1) "remove" -> "Removing" (...ing and Uppercase) (2) "failed to" -> "Can't" (unification) (3) First char of log message should be Uppercase. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
07709508c2fAssorted log message fixes(1) "do ..." -> "Doing ..." (...ing and Uppercase) (2) "Succesfully inflate" -> "... inflated" (3) When running a command, say so before the cmd name. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0d463283f55ploop_set_log_file(): make NULL a valid argumentIn case NULL is provided, we just want to close the old log file. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
fefbdeb137dlogger: introduce, use and expose PLOOP_LOG_NOCONSOLEInstead of a hardcoded constant. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4f360418ca2Fix ploop_mount_param structure.Commit 249a9b7 removed nfs field from struct ploop_mount_param. Put it back (under a different name) to retain backward binary compatibility. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
2e06c26c4e0ploop_store_diskdescriptor(): fix for a case when image is in root dirroot@mrmber ~]# ploop init -s 1g -f raw /ploop.image Creating raw delta /ploop.image size=2097152 sectors add snapshot {5fbaabe3-6958-40FF-92a7-860e329aab41} Storing /DiskDescriptor.xml Can't resolve : No such file or directory The problem is get_basedir() returns empty string for something like "/img" and then realpath() fails on it. Fix by not calling realpath in case the string is empty. ...
Igor SukhihKir KolyshkinIgor Sukhih
b77b7608d86Fixed expanded2preallocated()Use right sequence: allocate cluster block and update cluster index.
Igor SukhihKir KolyshkinIgor Sukhih
c1caa577776create_empty_preallocated_delta(): remove a workaroundFallocate is working since >= 042stab052.8
Kir KolyshkinKir Kolyshkin
5ca39b1b484Makefiles: 'install' and 'clean' targets are also quiet nowSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f89a4012d90Makefiles: fix dependencies generationSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
a2de1ab5e01Makefiles: enable 'silent' build by defaultSame technique as used in Linux kernel Makefiles. If you want non-silent compilation, use make V=1 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
b458d6f1d6dSTYLE removed set of unused functions after ploop-shrink was droppedint locate_l1_entry(struct delta_array *p, int level, int index); int check_l2_cache(struct delta * delta, __u32 idx); int delta_locate(struct delta_array *p, off_t pos, off_t *opos); int delta_read(struct delta_array *p, void * buf, unsigned int size, off_t pos); int delta_read_2(struct delta_array *p, off_t pos, int * level); __u64 delta_bd_size(struct delta * delta); [kir@: this is after co...
kirkir
a4a373797ceDo not save errno when calling ploop_err()ploop_err() already does that for us. Note there is one case when errno is also saved for fclose(). Since fp is the one just returned from fopen() and checked, fclose() should not set errno. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
kirkir
396e0cc1a67Introduce and use SYSEXIT_MKNOD(1) create_ploop_dev() was returning -1 which is wrong because this code is used as a return code from say ploop_mount(). Since there was no appropriate or close error code let's introduce a new one: SYSEXIT_MKNOD. (2) ploop_getdevice() was not checking for a potential error from mknod(). Add a check, log and return proper error. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
kirkir
015e9ff3534Style: ploop_getdevice(): use variable for /dev/ploop0 stringCode looks a bit better this way. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
c1a95cb9a30Changed image -> device mapping schemaChanged image -> device mapping schema from hardlink based to 'base_image -> device' On mount action the new device is auto allocated and a 'base_image -> device' symlink is created under /dev/ploop folder.
Kir KolyshkinKir Kolyshkin
49f0d81e6fblib/ploop.h: remove non-existent function prototypesSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
f43e3f39cb5Move struct ploop_disk_images_runtime_data to private header
Igor SukhihKir KolyshkinIgor Sukhih
da9f0072fb0Restrict set of operation on VM virtual disk to mount/umount The VM DiskDescriptor.xml format required that top dela has guid as {5fbaabe3-6958-40ff-92a7-860e329aab41} bug #PSBM-12003PSBM-12003
Igor SukhihKir KolyshkinIgor Sukhih
990e3bf23fdProcess Parallels VM virtual disks renamed SnapshotTree -> Snapshots use hardcoded top delta if no TopGuid found bug #PSBM-12003PSBM-12003
Igor SukhihKir KolyshkinIgor Sukhih
3a71009d5f9Use strcasecmp for guid comparison
Kir KolyshkinKir Kolyshkin
30fe710fcb6Made ploop_merge_param.guid field constIndeed it is not changed by ploop_merge_snapshot(). Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
95b4ef04e44ploop_getdevice(): expose to include/libploop.hThis call can be used to check if ploop is supported by the kernel. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c82dcaeb141ploop tool: error message unificationCannot -> Can't Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4538ee58e34ploop tool: spaces at EOL removedSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
739124ffedeploop tool: fix a typo in ploop mount usageSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
bd4a05eb763ploop tool usage: s/f.e./e.g./Proper English is e.g. not f.e. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3484c3a5d09ploop tool: fix usage for resize, convert, infoSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8a237e5cb9aSimplify plooptool_getdevice(): use ploop_getdevice()Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
249a9b7a233Remove nfs field from struct ploop_mount_paramIt is not used anymore. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
fa3881f7c0dtools/ploop.c: remove -b optionUse ploop_is_on_nfs() to auto-detect if it's NFS or local. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
cb9bc53c3b2ploop_resize_image(): store statfs info on offline resize
Kir KolyshkinKir Kolyshkin
f54976cee7dploop 1.0 releasedSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1c55a9e8dc2include/linux: remove linux/ includes we don'd needPrevious patch added some linux includes as they were in RHEL6 kernel-headers package. This patch removes some extra includes that are not needed by our code (nor by the declarations in files we are patching). End result: - we have self-contained subset of linux kernel includes - it is possible to compile ploop on RHEL5 or maybe even RHEL4. Signed-off-by: Kir Kolyshkin <kir@openvz.org>