[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240422143923.3927601-7-john.g.garry@oracle.com>
Date: Mon, 22 Apr 2024 14:39:22 +0000
From: John Garry <john.g.garry@...cle.com>
To: axboe@...nel.dk, brauner@...nel.org, djwong@...nel.org,
viro@...iv.linux.org.uk, jack@...e.cz, akpm@...ux-foundation.org,
willy@...radead.org, dchinner@...hat.com, tytso@....edu, hch@....de,
martin.petersen@...cle.com, nilay@...ux.ibm.com, ritesh.list@...il.com,
mcgrof@...nel.org
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, ojaswin@...ux.ibm.com, p.raghav@...sung.com,
jbongio@...gle.com, okiselev@...zon.com,
John Garry <john.g.garry@...cle.com>
Subject: [PATCH RFC 6/7] fs: xfs: buffered atomic writes statx support
For filling in the statx fields, we use the extent alignment as the
buffered atomic writes size. Only a single size is permitted.
Signed-off-by: John Garry <john.g.garry@...cle.com>
---
fs/xfs/xfs_iops.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 05b20c88ff77..d2226df567ca 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -650,12 +650,19 @@ xfs_vn_getattr(
stat->dio_mem_align = bdev_dma_alignment(bdev) + 1;
stat->dio_offset_align = bdev_logical_block_size(bdev);
}
- if (request_mask & STATX_WRITE_ATOMIC_DIO) {
+ if (request_mask & STATX_WRITE_ATOMIC_DIO &&
+ !(request_mask & STATX_WRITE_ATOMIC_BUF)) {
unsigned int unit_min, unit_max;
xfs_get_atomic_write_attr(ip, &unit_min, &unit_max);
generic_fill_statx_atomic_writes(stat,
unit_min, unit_max, true);
+ } else if (request_mask & STATX_WRITE_ATOMIC_BUF) {
+ unsigned int unit_min, unit_max;
+
+ xfs_get_atomic_write_attr(ip, &unit_min, &unit_max);
+ generic_fill_statx_atomic_writes(stat,
+ unit_max, unit_max, false);
}
fallthrough;
default:
--
2.31.1
Powered by blists - more mailing lists