Re: [PATCH v2 1/2] iomap: fix zero padding data issue in concurrent append writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 14, 2024 at 01:04:31PM -0500, Brian Foster wrote:
> On Thu, Nov 14, 2024 at 10:34:26AM +0800, Long Li wrote:
> > On Wed, Nov 13, 2024 at 11:13:49AM -0500, Brian Foster wrote:
> ISTM that for the above merge scenario to happen we'd either need
> writeback of the thread 1 write to race just right with the thread 2
> write, or have two writeback cycles where the completion of the first is
> still pending by the time the second completes. Either of those seem far
> less likely than either writeback seeing i_size == 8k from the start, or
> the thread 2 write completing sometime after the thread 1 ioend has
> already been completed. Hm?

I think that this should be fairly easy to trigger with concurrent
sub-block buffered writes to O_DSYNC|O_APPEND opened files. The fact
we drop the IOLOCK before calling generic_write_sync() to flush the
data pretty much guarantees that there will be IO in flight whilst
other write() calls have extended the file in memory and are then
waiting for the current writeback on the folio to complete before
submitting their own writeback IO.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux