summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_iomap.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2023-04-03 08:38:51 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-02-15 22:08:37 -0500
commit7844bffb38a4369150df3b642978f1d6d8060e2d (patch)
treed6252e691f130f6d7500d9a602c7f2acfaa986cf /fs/xfs/xfs_iomap.c
parent619b6529e9e7d2dd8ee02256f1542ab3fdff7d1b (diff)
xfs: add nodataio mount option to skip all data I/Oxfs_no_data_io
When mounted with nodataio, add the NOSUBMIT iomap flag to all data mappings passed into the iomap layer. This causes iomap to skip all data I/O submission and thus facilitates metadata only performance testing. For experimental use only. Only tested insofar as fsstress runs for a few minutes without blowing up. Signed-off-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r--fs/xfs/xfs_iomap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 18c8f168b153..f0003446f040 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -99,6 +99,9 @@ xfs_bmbt_to_iomap(
struct xfs_mount *mp = ip->i_mount;
struct xfs_buftarg *target = xfs_inode_buftarg(ip);
+ if (xfs_has_nodataio(mp))
+ iomap_flags |= IOMAP_F_NOSUBMIT;
+
if (unlikely(!xfs_valid_startblock(ip, imap->br_startblock)))
return xfs_alert_fsblock_zero(ip, imap);