When using reflink, coping the source blocks before writing data
into new allocated blocks is required.  In fsdax mode, we need a source
blocks' start address to handle the COW operation.

Signed-off-by: Shiyang Ruan <ruansy.f...@cn.fujitsu.com>
---
 include/linux/iomap.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 0fefb5455bda..3b3aec2311c5 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -61,6 +61,10 @@ struct iomap {
        u16                     flags;  /* flags for mapping */
        struct block_device     *bdev;  /* block device for I/O */
        struct dax_device       *dax_dev; /* dax_dev for dax operations */
+       u64                     src_addr; /* disk offset of mapping, bytes,
+                                          * the source blocks' start address
+                                          * for cow in dax
+                                          */
        void                    *inline_data;
        void                    *private; /* filesystem private */
 
-- 
2.17.0



_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to