On Sun, May 25, 2025 at 01:32:33PM -0700, Linus Torvalds wrote: > But yeah, maybe the drop-behind case never triggers in practice, and I > should just revert commit 974c5e6139db ("xfs: flag as supporting > FOP_DONTCACHE") for now. > > That's kind of sad too, but at least that's new to 6.15 and we > wouldn't have a kernel release that triggers this issue. > > I realize that Vlastimil had a suggested possible fix, but doing > _that_ kind of surgery at this point in the release isn't an option, > I'm afraid. And delaying 6.15 for this also seems a bit excessive - if > it turns out to be easy to fix, we can always just backport the fix > and undo the revert. > > Sounds like a plan? > > I'm somewhat surprised that this was only noticed now if it triggers > so easily for Al with xfstests on xfs. But better late than never, I > guess.. I wonder if we shouldn't do ... +++ b/include/linux/fs.h @@ -3725,6 +3725,8 @@ static inline int kiocb_set_rw_flags(struct kiocb *ki, rwf_t flags, return -EOPNOTSUPP; } if (flags & RWF_DONTCACHE) { + /* Houston, we have a problem */ + return -EOPNOTSUPP; /* file system must support it */ if (!(ki->ki_filp->f_op->fop_flags & FOP_DONTCACHE)) return -EOPNOTSUPP; in case some other filesystem adds support for it? I don't see anything in -next right now, but I see Darrick playing with it here for FUSE: https://lore.kernel.org/all/174787195629.1483178.7917092102987513364.stgit@frogsfrogsfrogs/ Jeff playing with it for nfsd here: https://lore.kernel.org/all/370dd4ae06d44f852342b7ee2b969fc544bd1213.camel@xxxxxxxxxx/ Trond implementing it for NFS client here: https://lore.kernel.org/all/cover.1745381692.git.trond.myklebust@xxxxxxxxxxxxxxx/ I thought I saw someone implement it for ext4, but perhaps I'm confused with something else. Anyway, some kind of not-xfs-specific patch is appropriate here, I think? Oh, and we're only just seeing it, I think, because you need to recompile xfstests to test this functionality ... and I certainly don't re-pull and re-compile xfstests on a regular basis; I just use the one I pulled and compiled, um, months ago.