[Devel] [PATCH RHEL7 COMMIT] ploop: Add comment about S_SWAPFILE

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 5 11:09:48 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.21.3.vz7.106.4
------>
commit 767d09a35bc02270a56255e8095d9a3fbb4e6ccd
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Jul 5 11:09:45 2019 +0300

    ploop: Add comment about S_SWAPFILE
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/io_direct_map.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/block/ploop/io_direct_map.c b/drivers/block/ploop/io_direct_map.c
index a64cc43dfa3c..83b83027c013 100644
--- a/drivers/block/ploop/io_direct_map.c
+++ b/drivers/block/ploop/io_direct_map.c
@@ -111,6 +111,10 @@ ploop_dio_open(struct ploop_io * io, int rdonly)
 	pm->extent_root.mapping = mapping;
 	pm->readers = rdonly ? 1 : -1;
 	list_add(&pm->list, &ploop_mappings);
+	/*
+	 * This protects against EXT4_IOC_MOVE_EXT:
+	 * image file extents remain on the place.
+	 */
 	mapping->host->i_flags |= S_SWAPFILE;
 	io->size_ptr = &pm->size;
 	*io->size_ptr = i_size_read(mapping->host);



More information about the Devel mailing list