Re: [PATCH 3/4] fsdax: remove zeroing code from dax_unshare_iter

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

 



On Thu, Oct 03, 2024 at 08:09:32AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Remove the code in dax_unshare_iter that zeroes the destination memory
> because it's not necessary.
> 
> If srcmap is unwritten, we don't have to do anything because that
> unwritten extent came from the regular file mapping, and unwritten
> extents cannot be shared.  The same applies to holes.
> 
> Furthermore, zeroing to unshare a mapping is just plain wrong because
> unsharing means copy on write, and we should be copying data.
> 
> This is effectively a revert of commit 13dd4e04625f ("fsdax: unshare:
> zero destination if srcmap is HOLE or UNWRITTEN")

The original commit claims it fixed a bug, so I'm curious how
that happend and got fixed differently now.  But manually zeroing
data on an unshare does seem very wrong to me:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux