Re: [PATCH 4/7] fsdax: Replace mmap entry in case of CoW

2021-02-16 Thread Ruan Shiyang
On 2021/2/16 下午9:11, David Sterba wrote: On Mon, Feb 08, 2021 at 01:09:21AM +0800, Shiyang Ruan wrote: We replace the existing entry to the newly allocated one in case of CoW. Also, we mark the entry as PAGECACHE_TAG_TOWRITE so writeback marks this entry as writeprotected. This helps us snaps

Re: [PATCH 4/7] fsdax: Replace mmap entry in case of CoW

2021-02-16 Thread David Sterba
On Mon, Feb 08, 2021 at 01:09:21AM +0800, Shiyang Ruan wrote: > We replace the existing entry to the newly allocated one > in case of CoW. Also, we mark the entry as PAGECACHE_TAG_TOWRITE > so writeback marks this entry as writeprotected. This > helps us snapshots so new write pagefaults after snap

Re: [PATCH 4/7] fsdax: Replace mmap entry in case of CoW

2021-02-08 Thread Christoph Hellwig
> static void *dax_insert_entry(struct xa_state *xas, > struct address_space *mapping, struct vm_fault *vmf, > - void *entry, pfn_t pfn, unsigned long flags, bool dirty) > + void *entry, pfn_t pfn, unsigned long flags, bool insert_flags) > { > void *new

[PATCH 4/7] fsdax: Replace mmap entry in case of CoW

2021-02-07 Thread Shiyang Ruan
We replace the existing entry to the newly allocated one in case of CoW. Also, we mark the entry as PAGECACHE_TAG_TOWRITE so writeback marks this entry as writeprotected. This helps us snapshots so new write pagefaults after snapshots trigger a CoW. Signed-off-by: Goldwyn Rodrigues Signed-off-by: