Re: [PATCH v14 11/21] xfs: don't report dio_mem_align and dio_offset_align for fsverity files

Eric Biggers <[email protected]> Tue, 4 Aug 2026 18:29:15 +0000
Newsgroups gmane.comp.file-systems.ext4,gmane.linux.file-systems,gmane.linux.file-systems.f2fs,gmane.comp.file-systems.btrfs
Message-ID <[email protected]>
On Tue, Aug 04, 2026 at 10:50:58AM -0700, Darrick J. Wong wrote:
> On Tue, Aug 04, 2026 at 07:43:47PM +0200, Christoph Hellwig wrote:
> > On Mon, Aug 03, 2026 at 10:08:01PM +0200, Andrey Albershteyn wrote:
> > > Sashiko.dev reported that while fsverity files falls back to the
> > > buffered IO for Direct I/O, they should not report non-zero values in
> > > dio_mem_align and dio_offset_align, meaning it's not supported.
> > 
> > This doesn't make much sense to me.  If we didn't want to report
> > we'd also want to not set STATX_DIOALIGN | STATX_DIO_READ_ALIGN.
> > But in the end there is very little upside of this while adding
> > extra special cases.
> 
> directio is supported; the implementation merely falls back to reading
> through the page cache.  Unless you're saying that xfs shouldn't
> shouldn't set FMODE_CAN_ODIRECT for fsverity files?  But that also
> doesn't sound right.
> 
> Personally I think sashaniko is full of it and this whole patch should
> be dropped.

The statx fields are meant to report real direct I/O support, not merely
accepting the O_DIRECT flag and silently falling back to buffered I/O.

- Eric