fsdax: decouple zeroing from the iomap buffered I/O code
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Nov 2021 10:21:52 +0000 (11:21 +0100)
committerDan Williams <dan.j.williams@intel.com>
Sat, 4 Dec 2021 16:58:53 +0000 (08:58 -0800)
commitc6f40468657d16e4010ef84bf32a761feb3469ea
treeb86852a866cadaac4e68c67b7a5e3419ad32d588
parente5c71954ca11df04d258a663a8a15262be0e17f6
fsdax: decouple zeroing from the iomap buffered I/O code

Unshare the DAX and iomap buffered I/O page zeroing code.  This code
previously did a IS_DAX check deep inside the iomap code, which in
fact was the only DAX check in the code.  Instead move these checks
into the callers.  Most callers already have DAX special casing anyway
and XFS will need it for reflink support as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20211129102203.2243509-19-hch@lst.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/dax.c
fs/ext2/inode.c
fs/ext4/inode.c
fs/iomap/buffered-io.c
fs/xfs/xfs_iomap.c
include/linux/dax.h