summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-target.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2016-06-24 17:09:35 -0400
committerMike Snitzer <snitzer@redhat.com>2016-07-20 23:49:50 -0400
commitf8df1fdf18839cb4ef2035310bb9b6ec02025598 (patch)
treeb355c0f0596d6850ba68ca542014c17c2a6181b3 /drivers/md/dm-target.c
parent84b22f8378cf493524043a0a8dd567c58c64546f (diff)
downloadlinux-f8df1fdf18839cb4ef2035310bb9b6ec02025598.tar.bz2
dm error: add DAX support
Allow the error target to replace an existing DAX-enabled target. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-target.c')
-rw-r--r--drivers/md/dm-target.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c
index 5c826b450aad..6eecd6b36f76 100644
--- a/drivers/md/dm-target.c
+++ b/drivers/md/dm-target.c
@@ -148,9 +148,15 @@ static void io_err_release_clone_rq(struct request *clone)
{
}
+static long io_err_direct_access(struct dm_target *ti, sector_t sector,
+ void __pmem **kaddr, pfn_t *pfn, long size)
+{
+ return -EIO;
+}
+
static struct target_type error_target = {
.name = "error",
- .version = {1, 4, 0},
+ .version = {1, 5, 0},
.features = DM_TARGET_WILDCARD,
.ctr = io_err_ctr,
.dtr = io_err_dtr,
@@ -158,6 +164,7 @@ static struct target_type error_target = {
.map_rq = io_err_map_rq,
.clone_and_map_rq = io_err_clone_and_map_rq,
.release_clone_rq = io_err_release_clone_rq,
+ .direct_access = io_err_direct_access,
};
int __init dm_target_init(void)