[Devel] [PATCH RH7] ploop: Add comment in cached_submit()

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jan 21 20:28:31 MSK 2021


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

diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index dff12e2276bb..f24a3db23a62 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -414,6 +414,10 @@ cached_submit(struct ploop_io *io, iblock_t iblk, struct ploop_request * preq,
 			if (prealloc > PLOOP_MAX_PREALLOC(plo))
 				prealloc = PLOOP_MAX_PREALLOC(plo);
 try_again:
+			/*
+			 * Keep in mind, fallocate() allocates space iteratively,
+			 * so power down in middle may leave unaligned tail blocks.
+			 */
 			err = io->files.file->f_op->fallocate(io->files.file, 0,
 							       pos, prealloc);
 			if (err) {




More information about the Devel mailing list