Re: [PATCH v9 5/8] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero
From: Christoph Hellwig
Date: Thu Sep 16 2021 - 02:17:06 EST
On Wed, Sep 15, 2021 at 06:44:58PM +0800, Shiyang Ruan wrote:
> + rc = dax_direct_access(iomap->dax_dev, pgoff, 1, &kaddr, NULL);
> + if (rc < 0)
> + goto out;
> + memset(kaddr + offset, 0, size);
> + if (srcmap->addr != IOMAP_HOLE && srcmap->addr != iomap->addr) {
Should we also check that ->dax_dev for iomap and srcmap are different
first to deal with case of file system with multiple devices?
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>