Why is it necessary to unshare? Userspace gave us a buffer of newWhat is this checking? That something else already created a mapping inI want to check if some data is shared. In that case, we should unshare.
the COW fork, so we want to bail out to get rid of it?
contents, and we're already prepared to write that out of place and
remap it.
And I am not sure if that check is sufficient.Flushed against what? Concurrent writeback or something? The directio
On the buffered write path, we may have something in a CoW fork - in that
case it should be flushed, right?
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.)