Commit c439ca69 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mike Snitzer

dm snapshot: don't define direct_access if we don't support it

Don't define a direct_access function that fails, dm_dax_direct_access
already fails with -EIO if the pointer is zero;
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent de7180ff
...@@ -2338,13 +2338,6 @@ static int origin_map(struct dm_target *ti, struct bio *bio) ...@@ -2338,13 +2338,6 @@ static int origin_map(struct dm_target *ti, struct bio *bio)
return do_origin(o->dev, bio); return do_origin(o->dev, bio);
} }
static long origin_dax_direct_access(struct dm_target *ti, pgoff_t pgoff,
long nr_pages, void **kaddr, pfn_t *pfn)
{
DMWARN("device does not support dax.");
return -EIO;
}
/* /*
* Set the target "max_io_len" field to the minimum of all the snapshots' * Set the target "max_io_len" field to the minimum of all the snapshots'
* chunk sizes. * chunk sizes.
...@@ -2404,7 +2397,6 @@ static struct target_type origin_target = { ...@@ -2404,7 +2397,6 @@ static struct target_type origin_target = {
.postsuspend = origin_postsuspend, .postsuspend = origin_postsuspend,
.status = origin_status, .status = origin_status,
.iterate_devices = origin_iterate_devices, .iterate_devices = origin_iterate_devices,
.direct_access = origin_dax_direct_access,
}; };
static struct target_type snapshot_target = { static struct target_type snapshot_target = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment