RFC xfs: nodataio mount option to skip data I/O
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | iomap: factor out a bio submission helperfs/ | +23 | 0 replies | |
| 2/3 | iomap: add nosubmit flag to skip data I/O on iomap mappingfs/ include/ | +14 | 0 replies | |
| 3/3 | xfs: add nodataio mount option to skip all data I/Ofs/ fs/ fs/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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