aboutsummaryrefslogtreecommitdiff
path: root/drivers/dax/bus.c
diff options
context:
space:
mode:
authorGravatar Christoph Hellwig <hch@lst.de> 2021-12-15 09:45:08 +0100
committerGravatar Dan Williams <dan.j.williams@intel.com> 2021-12-18 08:04:53 -0800
commit7ac5360cd4d02cc7e0eaf10867f599e041822f12 (patch)
tree995133c39f548b5ce8f01cc3a72f15d85838a630 /drivers/dax/bus.c
parentdax: remove the DAXDEV_F_SYNC flag (diff)
downloadlinux-7ac5360cd4d02cc7e0eaf10867f599e041822f12.tar.gz
linux-7ac5360cd4d02cc7e0eaf10867f599e041822f12.tar.bz2
linux-7ac5360cd4d02cc7e0eaf10867f599e041822f12.zip
dax: remove the copy_from_iter and copy_to_iter methods
These methods indirect the actual DAX read/write path. In the end pmem uses magic flush and mc safe variants and fuse and dcssblk use plain ones while device mapper picks redirects to the underlying device. Add set_dax_nocache() and set_dax_nomc() APIs to control which copy routines are used to remove indirect call from the read/write fast path as well as a lot of boilerplate code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Vivek Goyal <vgoyal@redhat.com> [virtiofs] Link: https://lore.kernel.org/r/20211215084508.435401-5-hch@lst.de Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax/bus.c')
-rw-r--r--drivers/dax/bus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index da2a14d096d2..ee4568ef757c 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -1330,6 +1330,8 @@ struct dev_dax *devm_create_dev_dax(struct dev_dax_data *data)
goto err_alloc_dax;
}
set_dax_synchronous(dax_dev);
+ set_dax_nocache(dax_dev);
+ set_dax_nomc(dax_dev);
/* a device_dax instance is dead while the driver is not attached */
kill_dax(dax_dev);