Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1430861 > unrolled thread
| Started by | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| First post | 2016-06-24 20:30 +0200 |
| Last post | 2016-06-24 22:10 +0200 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] dm stripe: add DAX support Toshi Kani <toshi.kani@hpe.com> - 2016-06-24 20:30 +0200
Re: [PATCH] dm stripe: add DAX support kbuild test robot <lkp@intel.com> - 2016-06-24 22:00 +0200
Re: dm stripe: add DAX support Mike Snitzer <snitzer@redhat.com> - 2016-06-24 22:10 +0200
Re: dm stripe: add DAX support "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2016-06-24 22:50 +0200
Re: [PATCH] dm stripe: add DAX support kbuild test robot <lkp@intel.com> - 2016-06-24 22:10 +0200
| From | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| Date | 2016-06-24 20:30 +0200 |
| Subject | [PATCH] dm stripe: add DAX support |
| Message-ID | <rNE1z-3iA-9@gated-at.bofh.it> |
Change dm-stripe to implement direct_access function,
stripe_direct_access(), which maps bdev and sector and
calls direct_access function of its physical target device.
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
---
drivers/md/dm-stripe.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
index 48f1c01..8925f6a 100644
--- a/drivers/md/dm-stripe.c
+++ b/drivers/md/dm-stripe.c
@@ -308,6 +308,30 @@ static int stripe_map(struct dm_target *ti, struct bio *bio)
return DM_MAPIO_REMAPPED;
}
+static long stripe_direct_access(struct dm_target *ti, sector_t sector,
+ void __pmem **kaddr, pfn_t *pfn, long size)
+{
+ struct stripe_c *sc;
+ struct block_device *bdev;
+ uint32_t stripe;
+ struct blk_dax_ctl dax = {
+ .size = size,
+ };
+ long ret;
+
+ sc = ti->private;
+ stripe_map_sector(sc, sector, &stripe, &dax.sector);
+
+ dax.sector += sc->stripe[stripe].physical_start;
+ bdev = sc->stripe[stripe].dev->bdev;
+
+ ret = bdev_direct_access(bdev, &dax);
+ *kaddr = dax.addr;
+ *pfn = dax.pfn;
+
+ return ret;
+}
+
/*
* Stripe status:
*
@@ -425,6 +449,7 @@ static struct target_type stripe_target = {
.status = stripe_status,
.iterate_devices = stripe_iterate_devices,
.io_hints = stripe_io_hints,
+ .direct_access = stripe_direct_access,
};
int __init dm_stripe_init(void)
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-06-24 22:00 +0200 |
| Message-ID | <rNFqG-447-17@gated-at.bofh.it> |
| In reply to | #1430861 |
[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-rc4 next-20160624]
[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/dm-stripe-add-DAX-support/20160625-022600
base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k
All warnings (new ones prefixed by >>):
drivers/md/dm-stripe.c:452:2: error: unknown field 'direct_access' specified in initializer
.direct_access = stripe_direct_access,
^
drivers/md/dm-stripe.c:452:2: warning: missing braces around initializer [-Wmissing-braces]
drivers/md/dm-stripe.c:452:2: warning: (near initialization for 'stripe_target.list') [-Wmissing-braces]
>> drivers/md/dm-stripe.c:452:2: warning: initialization from incompatible pointer type
drivers/md/dm-stripe.c:452:2: warning: (near initialization for 'stripe_target.list.next')
vim +452 drivers/md/dm-stripe.c
436
437 blk_limits_io_min(limits, chunk_size);
438 blk_limits_io_opt(limits, chunk_size * sc->stripes);
439 }
440
441 static struct target_type stripe_target = {
442 .name = "striped",
443 .version = {1, 5, 1},
444 .module = THIS_MODULE,
445 .ctr = stripe_ctr,
446 .dtr = stripe_dtr,
447 .map = stripe_map,
448 .end_io = stripe_end_io,
449 .status = stripe_status,
450 .iterate_devices = stripe_iterate_devices,
451 .io_hints = stripe_io_hints,
> 452 .direct_access = stripe_direct_access,
453 };
454
455 int __init dm_stripe_init(void)
456 {
457 int r;
458
459 r = dm_register_target(&stripe_target);
460 if (r < 0)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Mike Snitzer <snitzer@redhat.com> |
|---|---|
| Date | 2016-06-24 22:10 +0200 |
| Subject | Re: dm stripe: add DAX support |
| Message-ID | <rNFAl-4mG-15@gated-at.bofh.it> |
| In reply to | #1430910 |
On Fri, Jun 24 2016 at 3:58pm -0400, kbuild test robot <lkp@intel.com> wrote: > Hi, > > [auto build test WARNING on dm/for-next] > [also build test WARNING on v4.7-rc4 next-20160624] > [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/dm-stripe-add-DAX-support/20160625-022600 > base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next > config: m68k-sun3_defconfig (attached as .config) > compiler: m68k-linux-gcc (GCC) 4.9.0 > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=m68k > > All warnings (new ones prefixed by >>): > > drivers/md/dm-stripe.c:452:2: error: unknown field 'direct_access' specified in initializer > .direct_access = stripe_direct_access, > ^ > drivers/md/dm-stripe.c:452:2: warning: missing braces around initializer [-Wmissing-braces] > drivers/md/dm-stripe.c:452:2: warning: (near initialization for 'stripe_target.list') [-Wmissing-braces] > >> drivers/md/dm-stripe.c:452:2: warning: initialization from incompatible pointer type > drivers/md/dm-stripe.c:452:2: warning: (near initialization for 'stripe_target.list.next') FYI, overzealous kbuild robot build failure here.. I haven't staged the prereq DM core changes yet because I'm waiting for Jens to take the 2 block changes those depend on. Mike
[toc] | [prev] | [next] | [standalone]
| From | "Kani, Toshimitsu" <toshi.kani@hpe.com> |
|---|---|
| Date | 2016-06-24 22:50 +0200 |
| Subject | Re: dm stripe: add DAX support |
| Message-ID | <rNGd3-4B8-15@gated-at.bofh.it> |
| In reply to | #1430915 |
On Fri, 2016-06-24 at 16:02 -0400, Mike Snitzer wrote: > On Fri, Jun 24 2016 at 3:58pm -0400, > kbuild test robot <lkp@intel.com> wrote: > > > > > Hi, > > > > [auto build test WARNING on dm/for-next] > > [also build test WARNING on v4.7-rc4 next-20160624] > > [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/dm-stripe-add- > > DAX-support/20160625-022600 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linu > > x-dm.git for-next > > config: m68k-sun3_defconfig (attached as .config) > > compiler: m68k-linux-gcc (GCC) 4.9.0 > > reproduce: > > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.gi > > t/plain/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # save the attached .config to linux build tree > > make.cross ARCH=m68k > > > > All warnings (new ones prefixed by >>): > > > > drivers/md/dm-stripe.c:452:2: error: unknown field 'direct_access' > > specified in initializer > > .direct_access = stripe_direct_access, > > ^ > > drivers/md/dm-stripe.c:452:2: warning: missing braces around > > initializer [-Wmissing-braces] > > drivers/md/dm-stripe.c:452:2: warning: (near initialization for > > 'stripe_target.list') [-Wmissing-braces] > > > > > > > > > > > drivers/md/dm-stripe.c:452:2: warning: initialization from > > > > incompatible pointer type > > drivers/md/dm-stripe.c:452:2: warning: (near initialization for > > 'stripe_target.list.next') > > FYI, overzealous kbuild robot build failure here.. I haven't staged the > prereq DM core changes yet because I'm waiting for Jens to take the 2 > block changes those depend on. This patch applies on top of wip. Could this be because 'for-next' does not have the previous dm/dm-linear series? Thanks, -Toshi
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-06-24 22:10 +0200 |
| Message-ID | <rNFAm-4mG-21@gated-at.bofh.it> |
| In reply to | #1430861 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
[auto build test ERROR on dm/for-next]
[also build test ERROR on v4.7-rc4 next-20160624]
[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/dm-stripe-add-DAX-support/20160625-022600
base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
config: x86_64-randconfig-s5-06250328 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
>> drivers/md/dm-stripe.c:452:2: error: unknown field 'direct_access' specified in initializer
.direct_access = stripe_direct_access,
^
>> drivers/md/dm-stripe.c:452:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.direct_access = stripe_direct_access,
^~~~~~~~~~~~~~~~~~~~
drivers/md/dm-stripe.c:452:19: note: (near initialization for 'stripe_target.list.next')
>> drivers/md/dm-stripe.c:441:43: warning: missing braces around initializer [-Wmissing-braces]
static struct target_type stripe_target = {
^
drivers/md/dm-stripe.c:441:43: note: (near initialization for 'stripe_target')
cc1: some warnings being treated as errors
vim +/direct_access +452 drivers/md/dm-stripe.c
435 unsigned chunk_size = sc->chunk_size << SECTOR_SHIFT;
436
437 blk_limits_io_min(limits, chunk_size);
438 blk_limits_io_opt(limits, chunk_size * sc->stripes);
439 }
440
> 441 static struct target_type stripe_target = {
442 .name = "striped",
443 .version = {1, 5, 1},
444 .module = THIS_MODULE,
445 .ctr = stripe_ctr,
446 .dtr = stripe_dtr,
447 .map = stripe_map,
448 .end_io = stripe_end_io,
449 .status = stripe_status,
450 .iterate_devices = stripe_iterate_devices,
451 .io_hints = stripe_io_hints,
> 452 .direct_access = stripe_direct_access,
453 };
454
455 int __init dm_stripe_init(void)
---
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