Re: [PATCH v2 04/10] fsdax: Introduce dax_iomap_cow_copy()

2021-03-03 Thread Christoph Hellwig
On Fri, Feb 26, 2021 at 08:20:24AM +0800, Shiyang Ruan wrote: > + if (!copy_edge) { > + ret = copy_mc_to_kernel(daddr, saddr, length); > + return ret; No need for the ret variable here, this can be: if (!copy_edge) return

[PATCH v2 04/10] fsdax: Introduce dax_iomap_cow_copy()

2021-02-25 Thread Shiyang Ruan
In the case where the iomap is a write operation and iomap is not equal to srcmap after iomap_begin, we consider it is a CoW operation. The destance extent which iomap indicated is new allocated extent. So, it is needed to copy the data from srcmap to new allocated extent. In theory, it is better