[Devel] [PATCH RH7 1/4] ploop: Kaio simplify truncate() in kaio_fsync_thread()
Kirill Tkhai
ktkhai at virtuozzo.com
Sat Sep 19 19:50:46 MSK 2020
Doing both >> and << is useless since length is aligned
to cluster size.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/io_kaio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index f85dac1..00316e7 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -528,8 +528,8 @@ static int kaio_fsync_thread(void * data)
isize = i_size_read(io->files.inode);
if (WARN_ON_ONCE(preq->prealloc_size < isize))
goto out;
- err = kaio_truncate(io, io->files.file,
- preq->prealloc_size >> (plo->cluster_log + 9));
+ err = __kaio_truncate(io, io->files.file,
+ preq->prealloc_size);
if (err)
PLOOP_REQ_SET_ERROR(preq, -EIO);
} else {
More information about the Devel
mailing list