All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kani, Toshimitsu" <toshi.kani-ZPxbGqLxI0U@public.gmane.org>
To: "snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org"
	<linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 1/2] dm: update table type check for dax
Date: Tue, 28 Jun 2016 20:23:24 +0000	[thread overview]
Message-ID: <1467145398.3504.439.camel@hpe.com> (raw)
In-Reply-To: <20160628200714.GC8300-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Tue, 2016-06-28 at 16:07 -0400, Mike Snitzer wrote:
> On Tue, Jun 28 2016 at  3:37pm -0400,
> Toshi Kani <toshi.kani@hpe.com> wrote:
 :
> You said in the 0th header: "Patch 1 solves an error when lvremove is
> made to a snapshot device."
> 
> I'm not seeing why this patch 1 fixes anything specific to snapshot
> device removal (but I can see why patch 2 makes snapshot creation
> "work").  I'll apply your 2nd patch and see if I can see what you mean.
> 
> I actually see this error, without either of your 2 proposed patches
> applied, when I try to create a snapshot of a DAX capable LV:
> 
> # lvcreate -s -n snap -L 100M pmem/lv
>   device-mapper: reload ioctl on (253:7) failed: Invalid argument
>   Failed to lock logical volume pmem/lv.
>   Aborting. Manual intervention required.
> Jun 28 15:57:28 rhel-storage-02 kernel: device-mapper: ioctl: can't change
> device type after initial table load.

Yes, patch 2 fixes this error.

I have not looked into why lvremove does this, but lvremove to a snapshot
device fails to reload DM table of "<dev>-lvsnap" device (which is marked as
DM_TYPE_BIO_BASED) with DM_TYPE_DAX_BIO_BASED.  Patch 1 fixes this error.  I
think it also generally makes sense to allow this case.

Thanks,
-Toshi
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "snitzer@redhat.com" <snitzer@redhat.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"linux-nvdimm@ml01.01.org" <linux-nvdimm@ml01.01.org>,
	"agk@redhat.com" <agk@redhat.com>
Subject: Re: [PATCH 1/2] dm: update table type check for dax
Date: Tue, 28 Jun 2016 20:23:24 +0000	[thread overview]
Message-ID: <1467145398.3504.439.camel@hpe.com> (raw)
In-Reply-To: <20160628200714.GC8300@redhat.com>

On Tue, 2016-06-28 at 16:07 -0400, Mike Snitzer wrote:
> On Tue, Jun 28 2016 at  3:37pm -0400,
> Toshi Kani <toshi.kani@hpe.com> wrote:
 :
> You said in the 0th header: "Patch 1 solves an error when lvremove is
> made to a snapshot device."
> 
> I'm not seeing why this patch 1 fixes anything specific to snapshot
> device removal (but I can see why patch 2 makes snapshot creation
> "work").  I'll apply your 2nd patch and see if I can see what you mean.
> 
> I actually see this error, without either of your 2 proposed patches
> applied, when I try to create a snapshot of a DAX capable LV:
> 
> # lvcreate -s -n snap -L 100M pmem/lv
>   device-mapper: reload ioctl on (253:7) failed: Invalid argument
>   Failed to lock logical volume pmem/lv.
>   Aborting. Manual intervention required.
> Jun 28 15:57:28 rhel-storage-02 kernel: device-mapper: ioctl: can't change
> device type after initial table load.

Yes, patch 2 fixes this error.

I have not looked into why lvremove does this, but lvremove to a snapshot
device fails to reload DM table of "<dev>-lvsnap" device (which is marked as
DM_TYPE_BIO_BASED) with DM_TYPE_DAX_BIO_BASED.  Patch 1 fixes this error.  I
think it also generally makes sense to allow this case.

Thanks,
-Toshi

  parent reply	other threads:[~2016-06-28 20:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 19:37 [PATCH 0/2] Support DAX for device-mapper dm-linear devices Toshi Kani
2016-06-28 19:37 ` Toshi Kani
2016-06-28 19:37 ` Toshi Kani
2016-06-28 19:37 ` [PATCH 1/2] dm: update table type check for dax Toshi Kani
2016-06-28 19:37   ` Toshi Kani
2016-06-28 19:37   ` Toshi Kani
     [not found]   ` <1467142636-21094-2-git-send-email-toshi.kani-ZPxbGqLxI0U@public.gmane.org>
2016-06-28 20:07     ` Mike Snitzer
2016-06-28 20:07       ` Mike Snitzer
     [not found]       ` <20160628200714.GC8300-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-28 20:23         ` Kani, Toshimitsu [this message]
2016-06-28 20:23           ` Kani, Toshimitsu
     [not found]           ` <1467145398.3504.439.camel-ZPxbGqLxI0U@public.gmane.org>
2016-06-29  0:40             ` Mike Snitzer
2016-06-29  0:40               ` Mike Snitzer
     [not found]               ` <20160629004049.GA9721-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-29 15:19                 ` Kani, Toshimitsu
2016-06-29 15:19                   ` Kani, Toshimitsu
2016-06-28 20:33   ` kbuild test robot
2016-06-28 20:33     ` kbuild test robot
2016-06-28 20:33     ` kbuild test robot
2016-06-28 19:37 ` [PATCH 2/2] dm snap: add fake origin_direct_access Toshi Kani
2016-06-28 19:37   ` Toshi Kani
2016-06-28 19:37   ` Toshi Kani
2016-06-28 20:27   ` kbuild test robot
2016-06-28 20:27     ` kbuild test robot
2016-06-28 20:27     ` kbuild test robot
2016-06-28 19:43 ` [PATCH 0/2] fix dm-snap for dax Kani, Toshimitsu
2016-06-28 19:43   ` Kani, Toshimitsu
2016-06-28 19:43   ` Kani, Toshimitsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467145398.3504.439.camel@hpe.com \
    --to=toshi.kani-zpxbgqlxi0u@public.gmane.org \
    --cc=agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org \
    --cc=linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.