summaryrefslogtreecommitdiff
path: root/fs/jfs/jfs_metapage.c
diff options
context:
space:
mode:
authorShiyang Ruan <ruansy.fnst@fujitsu.com>2022-06-03 08:37:31 +0300
committerakpm <akpm@linux-foundation.org>2022-07-18 03:14:31 +0300
commit6061b69b9a550a2ab84e805d0d2315ba6215f112 (patch)
tree13fbbd096ab532eb801081d70582d688439c5c91 /fs/jfs/jfs_metapage.c
parent6f643c57d57c56d4677bc05f1fca2ef3f249797c (diff)
downloadlinux-6061b69b9a550a2ab84e805d0d2315ba6215f112.tar.xz
fsdax: set a CoW flag when associate reflink mappings
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. And to make sure disassociation works fine, we use page->index as refcount, and clear page->mapping to the initial state when page->index is decreased to 0. With the help of this new flag, it is able to distinguish normal case and CoW case, and keep the warning in normal case. Link: https://lkml.kernel.org/r/20220603053738.1218681-8-ruansy.fnst@fujitsu.com Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Dan Williams <dan.j.wiliams@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Goldwyn Rodrigues <rgoldwyn@suse.com> Cc: Goldwyn Rodrigues <rgoldwyn@suse.de> Cc: Jane Chu <jane.chu@oracle.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Miaohe Lin <linmiaohe@huawei.com> Cc: Naoya Horiguchi <naoya.horiguchi@nec.com> Cc: Ritesh Harjani <riteshh@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/jfs/jfs_metapage.c')
0 files changed, 0 insertions, 0 deletions