diff options
author | Christoph Hellwig <hch@lst.de> | 2021-11-29 11:21:52 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-12-04 17:58:53 +0100 |
commit | c6f40468657d16e4010ef84bf32a761feb3469ea (patch) | |
tree | b86852a866cadaac4e68c67b7a5e3419ad32d588 /fs/ext4 | |
parent | fsdax: factor out a dax_memzero helper (diff) | |
download | linux-c6f40468657d16e4010ef84bf32a761feb3469ea.tar.xz linux-c6f40468657d16e4010ef84bf32a761feb3469ea.zip |
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>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index bfd3545f1e5d..d316a2009489 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -41,6 +41,7 @@ #include <linux/bitops.h> #include <linux/iomap.h> #include <linux/iversion.h> +#include <linux/dax.h> #include "ext4_jbd2.h" #include "xattr.h" @@ -3780,8 +3781,8 @@ static int ext4_block_zero_page_range(handle_t *handle, length = max; if (IS_DAX(inode)) { - return iomap_zero_range(inode, from, length, NULL, - &ext4_iomap_ops); + return dax_zero_range(inode, from, length, NULL, + &ext4_iomap_ops); } return __ext4_block_zero_page_range(handle, mapping, from, length); } |