Re: [PATCH v12 7/7] fsdax: set a CoW flag when associate reflink mappings

2022-04-11 Thread Christoph Hellwig
> + * Set or Update the page->mapping with FS_DAX_MAPPING_COW flag. > + * Return true if it is an Update. > + */ > +static inline bool dax_mapping_set_cow(struct page *page) > +{ > + if (page->mapping) { > + /* flag already set */ > + if

[PATCH v12 7/7] fsdax: set a CoW flag when associate reflink mappings

2022-04-10 Thread Shiyang Ruan
Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file mappings. In this case, since the dax-rmap has already took the responsibility to look up for shared files by given dax page, the page->mapping is no longer to used for rmap but for marking that this dax page is shared.