summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-target.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-04-12 13:37:44 -0700
committerDan Williams <dan.j.williams@intel.com>2017-04-25 13:20:36 -0700
commit817bf40265459578abc36c6bd53e27775b5c7ec4 (patch)
tree7f77cc1bb97457d10d92df83a640d8d90023a653 /drivers/md/dm-target.c
parentf26c5719b2d7b00de69eb83eb1c1c831759fdc9b (diff)
downloadlinux-817bf40265459578abc36c6bd53e27775b5c7ec4.tar.bz2
dm: teach dm-targets to use a dax_device + dax_operations
Arrange for dm to lookup the dax services available from member devices. Update the dax-capable targets, linear and stripe, to route dax operations to the underlying device. Changes the target-internal ->direct_access() method to more closely align with the dax_operations ->direct_access() calling convention. Cc: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/md/dm-target.c')
-rw-r--r--drivers/md/dm-target.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c
index 43d3445b121d..6a7968f93f3c 100644
--- a/drivers/md/dm-target.c
+++ b/drivers/md/dm-target.c
@@ -142,8 +142,8 @@ static void io_err_release_clone_rq(struct request *clone)
{
}
-static long io_err_direct_access(struct dm_target *ti, sector_t sector,
- void **kaddr, pfn_t *pfn, long size)
+static long io_err_dax_direct_access(struct dm_target *ti, pgoff_t pgoff,
+ long nr_pages, void **kaddr, pfn_t *pfn)
{
return -EIO;
}
@@ -157,7 +157,7 @@ static struct target_type error_target = {
.map = io_err_map,
.clone_and_map_rq = io_err_clone_and_map_rq,
.release_clone_rq = io_err_release_clone_rq,
- .direct_access = io_err_direct_access,
+ .direct_access = io_err_dax_direct_access,
};
int __init dm_target_init(void)