Re: [PATCH 2/2] block: take i_rwsem for the direct I/O write fallback
From: Christoph Hellwig
Date: Tue Aug 04 2026 - 10:52:29 EST
On Sun, Aug 02, 2026 at 08:11:41PM +0300, Tal Zussman wrote:
> > } else {
> > /*
> > * Take i_rwsem and invalidate_lock to avoid racing with
> >
>
> I seem to have stumbled into a Sashiko rabbit hole of issues with IOCB_NOWAIT
> and IOCB_ATOMIC here... [1].
> I'll wait a day or two and send an update along with some additional fixes
> I've spotted.
I think IOCB_ATOMIC vs fallback to buffered I/O is a generally
unsolved issue. I know ext4 just has a warning, but I'm not
sure how to avoid creating the problem in the first place.