Thread (46 messages) 46 messages, 7 authors, 2021-09-13

Re: [git pull] iov_iter fixes

From: Dave Chinner <david@fromorbit.com>
Date: 2021-09-09 21:42:14
Also in: linux-fsdevel

On Thu, Sep 09, 2021 at 03:19:56PM -0600, Jens Axboe wrote:
On 9/9/21 1:37 PM, Linus Torvalds wrote:
quoted
I'd like the comments expanded too. In particular that

                /* some cases will consume bytes even on error returns */
That comment is from me, and it goes back a few years. IIRC, it was the
iomap or xfs code that I hit this with, but honestly I don't remember
all the details at this point. I can try and play with it and see if it
still reproduces.
You might well be thinking of the problem fixed by commit
883a790a8440 ("xfs: don't allow NOWAIT DIO across extent
boundaries").

This fix was indicative of a whole class of issues with IOCB_NOWAIT
being used for multi-IO operations at the filesystem level and being
applied to each sub-segment of the IO that was constructed, rather
than the IO as a whole. Hence a failure on the second or subsequent
segments could return -EAGAIN (and potentially other errors) to the
caller after the segments we successfully submitted consumed part of
the iov...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help