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.

Reply via email to