diff options
author | Brian Foster <bfoster@redhat.com> | 2023-04-03 08:38:51 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-15 22:08:37 -0500 |
commit | 7844bffb38a4369150df3b642978f1d6d8060e2d (patch) | |
tree | d6252e691f130f6d7500d9a602c7f2acfaa986cf /fs/xfs/xfs_iomap.c | |
parent | 619b6529e9e7d2dd8ee02256f1542ab3fdff7d1b (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.c | 3 |
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); |