Re: [PATCH 03/15] iomap: Read page from srcmap for IOMAP_COW

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

 



On Sun, Sep 01, 2019 at 03:08:24PM -0500, Goldwyn Rodrigues wrote:

> +		iomap_assert(!(iomap->flags & IOMAP_F_BUFFER_HEAD));
> +		iomap_assert(srcmap->type == IOMAP_HOLE || srcmap->addr > 0);

0 can be a valid address in various file systems, so I don't think we
can just exclude it.  Then again COWing from a hole seems pointless,
doesn't it?

So just check for addr != IOMAP_NULL_ADDR here?

>  
> @@ -961,7 +966,7 @@ iomap_zero_range_actor(struct inode *inode, loff_t pos, loff_t count,
>  		if (IS_DAX(inode))
>  			status = iomap_dax_zero(pos, offset, bytes, iomap);
>  		else
> -			status = iomap_zero(inode, pos, offset, bytes, iomap);
> +			status = iomap_zero(inode, pos, offset, bytes, iomap, srcmap);

This introduces an > 80 character line.



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

  Powered by Linux