[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6959eb95-acd2-45b5-be40-39892219c0d5@oracle.com>
Date: Fri, 7 Feb 2025 11:48:01 +0000
From: John Garry <john.g.garry@...cle.com>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: brauner@...nel.org, cem@...nel.org, dchinner@...hat.com, hch@....de,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, ojaswin@...ux.ibm.com,
ritesh.list@...il.com, martin.petersen@...cle.com
Subject: Re: [PATCH RFC 06/10] xfs: iomap CoW-based atomic write support
On 06/02/2025 21:44, Darrick J. Wong wrote:
>>> What is this checking? That something else already created a mapping in
>>> the COW fork, so we want to bail out to get rid of it?
>> I want to check if some data is shared. In that case, we should unshare.
> Why is it necessary to unshare? Userspace gave us a buffer of new
> contents, and we're already prepared to write that out of place and
> remap it.
fine, as long as the remap does what we need, then I won't bother with
this explicit unshare.
>
>> And I am not sure if that check is sufficient.
>>
>> On the buffered write path, we may have something in a CoW fork - in that
>> case it should be flushed, right?
> Flushed against what? Concurrent writeback or something? The directio
> setup should have flushed dirty pagecache, so the only things left in
> the COW fork are speculative preallocations. (IOWs, I don't understand
> what needs to be flushed or why.)
ah, ok, as long as DIO would have flushed dirty relevant pagecache, then
we should be good.
Cheers,
John
Powered by blists - more mailing lists