RE:(2) [PATCH v2 2/2] xfs: skip the fsync flush when a later flush has completed

From: Daejun Park

Date: Mon Nov 23 2026 - 21:39:37 EST


On Fri, Nov 20, 2026 at 07:17:06PM +0100, Christoph Hellwig wrote:
> On Wed, Nov 11, 2026 at 12:17:12PM +0900, Daejun Park via B4 Relay wrote:
[...]
> > With an internal log, an fsync that takes the new skip can miss a
> > failed flush on bio-based dm. dm drops the error of a preflush sent
> > with data, unless the table is linear or stripe on a single device.
[...]
> I think you've fixed this bug in dm in the meantime, right?

Yes, commit e92cd41e8e5e ("dm: fail a REQ_PREFLUSH bio with data when
its preflush fails") in v7.4-rc3.

[...]
> > + * DAX writes are not block I/O, so DAX only skips the flush when
> > + * this log force flushed, as before.
>
> I don't get the DAX part. As far as cache flushes are concerned we
> don't special case DAX anywhere else, why here?

I was not sure that a flush issued by another CPU covers DAX data on
powerpc, so I kept the old behaviour for DAX. I never verified that.
The existing log_flushed skip may already rely on such a flush.

v3 drops the IS_DAX() check in xfs_file_fsync().

Best regards,
Daejun