Re: [PATCH 2/4] fs: return writeback errors for IOCB_DONTCACHE in generic_write_sync

From: Nirjhar Roy (IBM)
Date: Tue Nov 04 2025 - 07:08:13 EST


On Wed, 2025-10-29 at 17:37 +0100, Christoph Hellwig wrote:
> On Wed, Oct 29, 2025 at 09:01:01AM -0700, Darrick J. Wong wrote:
> > Hum. So we kick writeback but don't wait for any of it to start, and
> > immediately sample wberr. Does that mean that in the "bdev died" case,
> > the newly initiated writeback will have failed so quickly that
> > file_check_and_advance_wb_err will see that?
>
> Yes, this is primarily about catching errors in the submission path
> before it reaches the device, which are returned synchronously.
So, what you are saying is file_check_and_advance_wb_err() will wait/block till the write back
request done in filemap_fdatawrite_range_kick() is completely submitted and there are no more
chances of write back failure?
--NR
>
> > Or are we only reflecting
> > past write failures back to userspace on the *second* write after the
> > device dies?
> >
> > It would be helpful to know which fstests break, btw.
>
> generic/252 generic/329 xfs/237
>