All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "yigal@plexistor.com" <yigal@plexistor.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"snitzer@redhat.com" <snitzer@redhat.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>,
	"agk@redhat.com" <agk@redhat.com>
Subject: Re: [PATCH v2 1/3] block: add QUEUE_FLAG_DAX for devices to advertise their DAX support
Date: Thu, 23 Jun 2016 17:36:29 +0000	[thread overview]
Message-ID: <1466702773.3504.363.camel@hpe.com> (raw)
In-Reply-To: <CACTTzNYAxtY-d8+8Vo=Y2WpuXVaSkJk9PC7DcHXKJuU=gqvXFw@mail.gmail.com>

On Thu, 2016-06-23 at 19:31 +0300, Yigal Korman wrote:
> On Thu, Jun 23, 2016 at 2:54 AM, Toshi Kani <toshi.kani@hpe.com> wrote:
> > 
> > 
> > Currently, presence of direct_access() in block_device_operations
> > indicates support of DAX on its block device.  Because
> > block_device_operations is instantiated with 'const', this DAX
> > capablity may not be enabled conditinally.
> > 
> > In preparation for supporting DAX to device-mapper devices, add
> > QUEUE_FLAG_DAX to request_queue flags to advertise their DAX
> > support.  This will allow to set the DAX capability based on how
> > mapped device is composed.
> 
> Hi Toshi,
> This patch is very helpful!
> I think QUEUE_FLAG_DAX can also help with identifying dax devices in
> userspace.
> Perhaps you'd be willing to squash the patch below with this one or
> add it to your submission?

Hi Yigal,

Good idea.  Mike can probably take it into his tree, but I will include it
into the series if I needed to submit v3.

Acked-by: Toshi Kani <toshi.kani@hpe.com>

I have one minor comment below.

> [PATCH] block: expose QUEUE_FLAG_DAX in sysfs
> 
> There's currently no way to identify DAX enabled devices in userspace.
> 
> Signed-off-by: Yigal Korman <yigal@plexistor.com>
> ---
>  block/blk-sysfs.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index 9920596..d55126d 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -379,6 +379,15 @@ static ssize_t queue_wc_store(struct
> request_queue *q, const char *page,
>         return count;
>  }
> 
> +static ssize_t queue_dax_show(struct request_queue *q, char *page)
> +{
> +       int bit;
> +
> +       bit = test_bit(QUEUE_FLAG_DAX, &q->queue_flags);
> +
> +       return queue_var_show(bit, page);

This can be:
	return queue_var_show(blk_queue_dax(q), page);

Thanks,
-Toshi

> +}
> +
>  static struct queue_sysfs_entry queue_requests_entry = {
>         .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
>         .show = queue_requests_show,
> @@ -516,6 +525,11 @@ static struct queue_sysfs_entry queue_wc_entry = {
>         .store = queue_wc_store,
>  };
> 
> +static struct queue_sysfs_entry queue_dax_entry = {
> +       .attr = {.name = "dax", .mode = S_IRUGO },
> +       .show = queue_dax_show,
> +};
> +
>  static struct attribute *default_attrs[] = {
>         &queue_requests_entry.attr,
>         &queue_ra_entry.attr,
> @@ -542,6 +556,7 @@ static struct attribute *default_attrs[] = {
>         &queue_random_entry.attr,
>         &queue_poll_entry.attr,
>         &queue_wc_entry.attr,
> +       &queue_dax_entry.attr,
>         NULL,
>  };
> 
_______________________________________________
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-ZPxbGqLxI0U@public.gmane.org>
To: "yigal-/8YdC2HfS5554TAoqtyWWQ@public.gmane.org"
	<yigal-/8YdC2HfS5554TAoqtyWWQ@public.gmane.org>
Cc: "axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org"
	<axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>,
	"linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
	<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>,
	"heiko.carstens-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org"
	<heiko.carstens-tA70FqPdS9bQT0dZR+AlfA@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>,
	"viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org"
	<viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	"schwidefsky-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org"
	<schwidefsky-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
	"agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v2 1/3] block: add QUEUE_FLAG_DAX for devices to advertise their DAX support
Date: Thu, 23 Jun 2016 17:36:29 +0000	[thread overview]
Message-ID: <1466702773.3504.363.camel@hpe.com> (raw)
In-Reply-To: <CACTTzNYAxtY-d8+8Vo=Y2WpuXVaSkJk9PC7DcHXKJuU=gqvXFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, 2016-06-23 at 19:31 +0300, Yigal Korman wrote:
> On Thu, Jun 23, 2016 at 2:54 AM, Toshi Kani <toshi.kani@hpe.com> wrote:
> > 
> > 
> > Currently, presence of direct_access() in block_device_operations
> > indicates support of DAX on its block device.  Because
> > block_device_operations is instantiated with 'const', this DAX
> > capablity may not be enabled conditinally.
> > 
> > In preparation for supporting DAX to device-mapper devices, add
> > QUEUE_FLAG_DAX to request_queue flags to advertise their DAX
> > support.  This will allow to set the DAX capability based on how
> > mapped device is composed.
> 
> Hi Toshi,
> This patch is very helpful!
> I think QUEUE_FLAG_DAX can also help with identifying dax devices in
> userspace.
> Perhaps you'd be willing to squash the patch below with this one or
> add it to your submission?

Hi Yigal,

Good idea.  Mike can probably take it into his tree, but I will include it
into the series if I needed to submit v3.

Acked-by: Toshi Kani <toshi.kani@hpe.com>

I have one minor comment below.

> [PATCH] block: expose QUEUE_FLAG_DAX in sysfs
> 
> There's currently no way to identify DAX enabled devices in userspace.
> 
> Signed-off-by: Yigal Korman <yigal@plexistor.com>
> ---
>  block/blk-sysfs.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index 9920596..d55126d 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -379,6 +379,15 @@ static ssize_t queue_wc_store(struct
> request_queue *q, const char *page,
>         return count;
>  }
> 
> +static ssize_t queue_dax_show(struct request_queue *q, char *page)
> +{
> +       int bit;
> +
> +       bit = test_bit(QUEUE_FLAG_DAX, &q->queue_flags);
> +
> +       return queue_var_show(bit, page);

This can be:
	return queue_var_show(blk_queue_dax(q), page);

Thanks,
-Toshi

> +}
> +
>  static struct queue_sysfs_entry queue_requests_entry = {
>         .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
>         .show = queue_requests_show,
> @@ -516,6 +525,11 @@ static struct queue_sysfs_entry queue_wc_entry = {
>         .store = queue_wc_store,
>  };
> 
> +static struct queue_sysfs_entry queue_dax_entry = {
> +       .attr = {.name = "dax", .mode = S_IRUGO },
> +       .show = queue_dax_show,
> +};
> +
>  static struct attribute *default_attrs[] = {
>         &queue_requests_entry.attr,
>         &queue_ra_entry.attr,
> @@ -542,6 +556,7 @@ static struct attribute *default_attrs[] = {
>         &queue_random_entry.attr,
>         &queue_poll_entry.attr,
>         &queue_wc_entry.attr,
> +       &queue_dax_entry.attr,
>         NULL,
>  };
> 
_______________________________________________
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: "yigal@plexistor.com" <yigal@plexistor.com>
Cc: "linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"agk@redhat.com" <agk@redhat.com>,
	"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"snitzer@redhat.com" <snitzer@redhat.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>
Subject: Re: [PATCH v2 1/3] block: add QUEUE_FLAG_DAX for devices to advertise their DAX support
Date: Thu, 23 Jun 2016 17:36:29 +0000	[thread overview]
Message-ID: <1466702773.3504.363.camel@hpe.com> (raw)
In-Reply-To: <CACTTzNYAxtY-d8+8Vo=Y2WpuXVaSkJk9PC7DcHXKJuU=gqvXFw@mail.gmail.com>

On Thu, 2016-06-23 at 19:31 +0300, Yigal Korman wrote:
> On Thu, Jun 23, 2016 at 2:54 AM, Toshi Kani <toshi.kani@hpe.com> wrote:
> > 
> > 
> > Currently, presence of direct_access() in block_device_operations
> > indicates support of DAX on its block device.  Because
> > block_device_operations is instantiated with 'const', this DAX
> > capablity may not be enabled conditinally.
> > 
> > In preparation for supporting DAX to device-mapper devices, add
> > QUEUE_FLAG_DAX to request_queue flags to advertise their DAX
> > support.  This will allow to set the DAX capability based on how
> > mapped device is composed.
> 
> Hi Toshi,
> This patch is very helpful!
> I think QUEUE_FLAG_DAX can also help with identifying dax devices in
> userspace.
> Perhaps you'd be willing to squash the patch below with this one or
> add it to your submission?

Hi Yigal,

Good idea.  Mike can probably take it into his tree, but I will include it
into the series if I needed to submit v3.

Acked-by: Toshi Kani <toshi.kani@hpe.com>

I have one minor comment below.

> [PATCH] block: expose QUEUE_FLAG_DAX in sysfs
> 
> There's currently no way to identify DAX enabled devices in userspace.
> 
> Signed-off-by: Yigal Korman <yigal@plexistor.com>
> ---
>  block/blk-sysfs.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index 9920596..d55126d 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -379,6 +379,15 @@ static ssize_t queue_wc_store(struct
> request_queue *q, const char *page,
>         return count;
>  }
> 
> +static ssize_t queue_dax_show(struct request_queue *q, char *page)
> +{
> +       int bit;
> +
> +       bit = test_bit(QUEUE_FLAG_DAX, &q->queue_flags);
> +
> +       return queue_var_show(bit, page);

This can be:
	return queue_var_show(blk_queue_dax(q), page);

Thanks,
-Toshi

> +}
> +
>  static struct queue_sysfs_entry queue_requests_entry = {
>         .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
>         .show = queue_requests_show,
> @@ -516,6 +525,11 @@ static struct queue_sysfs_entry queue_wc_entry = {
>         .store = queue_wc_store,
>  };
> 
> +static struct queue_sysfs_entry queue_dax_entry = {
> +       .attr = {.name = "dax", .mode = S_IRUGO },
> +       .show = queue_dax_show,
> +};
> +
>  static struct attribute *default_attrs[] = {
>         &queue_requests_entry.attr,
>         &queue_ra_entry.attr,
> @@ -542,6 +556,7 @@ static struct attribute *default_attrs[] = {
>         &queue_random_entry.attr,
>         &queue_poll_entry.attr,
>         &queue_wc_entry.attr,
> +       &queue_dax_entry.attr,
>         NULL,
>  };
> 

  reply	other threads:[~2016-06-23 17:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 23:54 [PATCH v2 0/3] Support DAX for device-mapper dm-linear devices Toshi Kani
2016-06-22 23:54 ` Toshi Kani
2016-06-22 23:54 ` Toshi Kani
2016-06-22 23:54 ` [PATCH v2 1/3] block: add QUEUE_FLAG_DAX for devices to advertise their DAX support Toshi Kani
2016-06-22 23:54   ` Toshi Kani
2016-06-22 23:54   ` Toshi Kani
2016-06-23 16:31   ` Yigal Korman
2016-06-23 16:31     ` Yigal Korman
2016-06-23 16:31     ` Yigal Korman
2016-06-23 17:36     ` Kani, Toshimitsu [this message]
2016-06-23 17:36       ` Kani, Toshimitsu
2016-06-23 17:36       ` Kani, Toshimitsu
2016-06-23 18:05       ` Yigal Korman
2016-06-23 18:05         ` Yigal Korman
2016-06-23 18:05         ` Yigal Korman
2016-06-23 18:10         ` Dan Williams
2016-06-23 18:10           ` Dan Williams
2016-06-23 18:10           ` Dan Williams
2016-06-23 21:11       ` Mike Snitzer
2016-06-23 21:11         ` Mike Snitzer
2016-06-23 21:11         ` Mike Snitzer
2016-06-22 23:54 ` [PATCH v2 2/3] dm: add infrastructure for " Toshi Kani
2016-06-22 23:54   ` Toshi Kani
2016-06-22 23:54   ` Toshi Kani
2016-06-22 23:54 ` [PATCH v2 3/3] dm linear: add " Toshi Kani
2016-06-22 23:54   ` Toshi Kani
2016-06-22 23:54   ` Toshi Kani

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=1466702773.3504.363.camel@hpe.com \
    --to=toshi.kani@hpe.com \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=snitzer@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yigal@plexistor.com \
    /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.