[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5bd55d32031b49bdd9e2c6d073787d1ac4b6d78.1729825985.git.ritesh.list@gmail.com>
Date: Fri, 25 Oct 2024 09:15:54 +0530
From: "Ritesh Harjani (IBM)" <ritesh.list@...il.com>
To: linux-ext4@...r.kernel.org
Cc: Theodore Ts'o <tytso@....edu>,
Jan Kara <jack@...e.cz>,
"Darrick J . Wong" <djwong@...nel.org>,
Christoph Hellwig <hch@...radead.org>,
John Garry <john.g.garry@...cle.com>,
Ojaswin Mujoo <ojaswin@...ux.ibm.com>,
Dave Chinner <david@...morbit.com>,
linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
"Ritesh Harjani (IBM)" <ritesh.list@...il.com>
Subject: [PATCH 5/6] iomap: Lift blocksize restriction on atomic writes
Filesystems like ext4 can submit writes in multiples of blocksizes.
But we still can't allow the writes to be split. Hence let's check if
the iomap_length() is same as iter->len or not.
This shouldn't affect XFS since it anyways checks for this in
xfs_file_write_iter() to not support atomic write size request of more
than FS blocksize.
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@...il.com>
---
fs/iomap/direct-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index ed4764e3b8f0..1d33b4239b3e 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -306,7 +306,7 @@ static loff_t iomap_dio_bio_iter(const struct iomap_iter *iter,
size_t copied = 0;
size_t orig_count;
- if (atomic && length != fs_block_size)
+ if (atomic && length != iter->len)
return -EINVAL;
if ((pos | length) & (bdev_logical_block_size(iomap->bdev) - 1) ||
--
2.46.0
Powered by blists - more mailing lists