Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433238 > unrolled thread
| Started by | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| First post | 2016-06-28 21:40 +0200 |
| Last post | 2016-06-28 22:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] dm snap: add fake origin_direct_access Toshi Kani <toshi.kani@hpe.com> - 2016-06-28 21:40 +0200
Re: [PATCH 2/2] dm snap: add fake origin_direct_access kbuild test robot <lkp@intel.com> - 2016-06-28 22:30 +0200
| From | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| Date | 2016-06-28 21:40 +0200 |
| Subject | [PATCH 2/2] dm snap: add fake origin_direct_access |
| Message-ID | <rP71w-2K4-23@gated-at.bofh.it> |
dax-capable mapped-device is marked as DM_TYPE_DAX_BIO_BASED,
which supports both dax and bio-based operations. dm-snap
needs to work with dax-capable device when bio-based operation
is used.
Add fake origin_direct_access() to origin device so that its
origin device is also marked as DM_TYPE_DAX_BIO_BASED for
dax-capable device. This allows to extend target's DM table.
dm-snap works normally when bio-based operation is used.
dm-snap does not support dax operation, and mount with dax
option to a target device or snapshot device fails.
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
---
drivers/md/dm-snap.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 69ab1ff..c472f04 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -2301,6 +2301,13 @@ static int origin_map(struct dm_target *ti, struct bio *bio)
return do_origin(o->dev, bio);
}
+static long origin_direct_access(struct dm_target *ti, sector_t sector,
+ void __pmem **kaddr, pfn_t *pfn, long size)
+{
+ DMWARN("device does not support dax.");
+ return -EIO;
+}
+
/*
* Set the target "max_io_len" field to the minimum of all the snapshots'
* chunk sizes.
@@ -2360,6 +2367,7 @@ static struct target_type origin_target = {
.postsuspend = origin_postsuspend,
.status = origin_status,
.iterate_devices = origin_iterate_devices,
+ .direct_access = origin_direct_access,
};
static struct target_type snapshot_target = {
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-06-28 22:30 +0200 |
| Message-ID | <rP7NT-3gG-37@gated-at.bofh.it> |
| In reply to | #1433238 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
[auto build test WARNING on dm/for-next]
[also build test WARNING on v4.7-rc5 next-20160628]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Toshi-Kani/Support-DAX-for-device-mapper-dm-linear-devices/20160629-034110
base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
config: x86_64-lkp (attached as .config)
compiler: gcc-4.9 (Debian 4.9.3-14) 4.9.3
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/md/dm-snap.c:2370:2: error: unknown field 'direct_access' specified in initializer
.direct_access = origin_direct_access,
^
>> drivers/md/dm-snap.c:2370:2: warning: initialization from incompatible pointer type
drivers/md/dm-snap.c:2370:2: warning: (near initialization for 'origin_target.io_hints')
vim +2370 drivers/md/dm-snap.c
2354 struct dm_origin *o = ti->private;
2355
2356 return fn(ti, o->dev, 0, ti->len, data);
2357 }
2358
2359 static struct target_type origin_target = {
2360 .name = "snapshot-origin",
2361 .version = {1, 9, 0},
2362 .module = THIS_MODULE,
2363 .ctr = origin_ctr,
2364 .dtr = origin_dtr,
2365 .map = origin_map,
2366 .resume = origin_resume,
2367 .postsuspend = origin_postsuspend,
2368 .status = origin_status,
2369 .iterate_devices = origin_iterate_devices,
> 2370 .direct_access = origin_direct_access,
2371 };
2372
2373 static struct target_type snapshot_target = {
2374 .name = "snapshot",
2375 .version = {1, 15, 0},
2376 .module = THIS_MODULE,
2377 .ctr = snapshot_ctr,
2378 .dtr = snapshot_dtr,
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web