[Devel] [PATCH rh7] ploop: Add comment about S_SWAPFILE

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jul 4 12:46:09 MSK 2019


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