Skip to content

RFC xfs: nodataio mount option to skip data I/O

Brian Foster linux-bcachefs linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iomap: factor out a bio submission helperfs/iomap/buffered-io.c+23 -90 replies
2/3iomap: add nosubmit flag to skip data I/O on iomap mappingfs/iomap/buffered-io.c include/linux/iomap.h+14 -80 replies
3/3xfs: add nodataio mount option to skip all data I/Ofs/xfs/xfs_iomap.c fs/xfs/xfs_mount.h fs/xfs/xfs_super.c+10 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/3] xfs: nodataio mount option to skip data I/O

Hi all,

bcachefs has a nodataio mount option that is used for isolated metadata performance testing purposes. When enabled, it performs all metadata I/O as normal and shortcuts data I/O by directly invoking bio completion. Kent had asked for something similar for fs comparison purposes some time ago and I put together a quick hack based around an iomap flag and mount option for XFS.

I don't recall if I ever posted the initial version and Kent recently asked about whether we'd want to consider merging something like this. I think there are at least a couple things that probably need addressing before that is a viable option.

One is that the mount option is kind of hacky in and of itself. Beyond that, this mechanism provides a means for stale data exposure because writes with nodataio mode enabled will operate as if writes were completed normally (including unwritten extent conversion). Therefore, a remount to !nodataio mode means we read off whatever was last written to storage.

Kent mentioned that Eric (or somebody?) had floated the idea of a mkfs time feature flag or some such to control nodataio mode. That would avoid mount api changes in general and also disallow use of such filesystems in a non-nodataio mode, so to me seems like the direction bcachefs should go with its variant of this regardless.

Personally, I don't have much of an opinion on whether something like this lands upstream or just remains as a local test hack for isolated performance testing. The code is simple enough as it is and not really worth the additional polishing for the latter, but I offered to at least rebase and post for discussion. Thoughts, reviews, flames appreciated.

Brian

Brian Foster (3):
iomap: factor out a bio submission helper
iomap: add nosubmit flag to skip data I/O on iomap mapping
xfs: add nodataio mount option to skip all data I/O

 fs/iomap/buffered-io.c | 37 ++++++++++++++++++++++++++++---------
 fs/xfs/xfs_iomap.c     |  3 +++
 fs/xfs/xfs_mount.h     |  2 ++
 fs/xfs/xfs_super.c     |  6 +++++-
 include/linux/iomap.h  |  1 +
 5 files changed, 39 insertions(+), 10 deletions(-)
Signature · 1 line
2.44.0