Re: [PATCH] xfs: only remap the written blocks in xfs_reflink_end_cow_extent

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

 



On Mon, Oct 16, 2023 at 08:48:27AM -0700, Darrick J. Wong wrote:
> Hmm.  xfs_prepare_ioend converts unwritten cowfork extents to written
> prior to submit_bio.  So I guess you'd have to trick writeback into
> issuing totally separate bios for the single mapping.

Yes.  Hitting IOEND_BATCH_SIZE seems like the least difficult one
to hit, but even that would require work.

> Then you'd have
> to delay the bio for the higher offset part of the mapping while
> allowing the bio for the lower part to complete, at which point it would
> convey the entire mapping to the data fork.

Shouldn't really matter which side is faster.

> Then you'd have to convince
> the kernel to reread the contents from disk.  I think that would be hard
> since the folios for the incomplete writeback are still uptodate and
> marked for writeback.  directio will block trying to flush and
> invalidate the cache, and buffered io will read the pagecache.

I don't think on a live kernel it is possible.  But if one of the
two bios completed before the other one, and power failed just inbetween.



[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