Re: [PATCH 4/4] xfs: fallback to buffered I/O for direct I/O when stable writes are required

From: Qu Wenruo

Date: Thu Oct 30 2025 - 02:53:44 EST




在 2025/10/30 17:19, Christoph Hellwig 写道:
On Thu, Oct 30, 2025 at 05:07:44PM +1030, Qu Wenruo wrote:
I mean some open flag like O_DIRECT_NO_FALLBACK, then we can directly
reutrn -ENOBLK without falling back to buffered IO (and no need to bother
the warning of falling back).

This will provide the most accurate, true zero-copy for those programs that
really require zero-copy.

And we won't need to bother falling back to buffered IO, it will be
something for the user space to bother.

So what is your application going to do if the open fails?

If it can not accept buffered fallback, error out.

If it can, do regular open without direct IO flags, and may be even open a bug report to the project, questioning if they really need direct IO in the first place.

Thanks,
Qu



Thanks,
Qu
---end quoted text---