All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org,
	toshi.kani-ZPxbGqLxI0U@public.gmane.org,
	dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org,
	dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org
Subject: [PATCH v3 2/4] block: expose QUEUE_FLAG_DAX in sysfs
Date: Thu, 23 Jun 2016 17:05:51 -0400	[thread overview]
Message-ID: <1466715953-40692-3-git-send-email-snitzer@redhat.com> (raw)
In-Reply-To: <1466715953-40692-1-git-send-email-snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

From: Yigal Korman <yigal-/8YdC2HfS5554TAoqtyWWQ@public.gmane.org>

Provides the ability to identify DAX enabled devices in userspace.

Signed-off-by: Yigal Korman <yigal-/8YdC2HfS5554TAoqtyWWQ@public.gmane.org>
Signed-off-by: Toshi Kani <toshi.kani-ZPxbGqLxI0U@public.gmane.org>
Acked-by: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 block/blk-sysfs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 9920596..f87a7e7 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -379,6 +379,11 @@ 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)
+{
+	return queue_var_show(blk_queue_dax(q), page);
+}
+
 static struct queue_sysfs_entry queue_requests_entry = {
 	.attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
 	.show = queue_requests_show,
@@ -516,6 +521,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 +552,7 @@ static struct attribute *default_attrs[] = {
 	&queue_random_entry.attr,
 	&queue_poll_entry.attr,
 	&queue_wc_entry.attr,
+	&queue_dax_entry.attr,
 	NULL,
 };
 
-- 
2.7.4 (Apple Git-66)

WARNING: multiple messages have this Message-ID (diff)
From: Mike Snitzer <snitzer@redhat.com>
To: axboe@kernel.dk, toshi.kani@hpe.com, dan.j.williams@intel.com
Cc: ross.zwisler@linux.intel.com, viro@zeniv.linux.org.uk,
	linux-nvdimm@ml01.01.org, dm-devel@redhat.com,
	linux-kernel@vger.kernel.org, yigal@plexistor.com
Subject: [PATCH v3 2/4] block: expose QUEUE_FLAG_DAX in sysfs
Date: Thu, 23 Jun 2016 17:05:51 -0400	[thread overview]
Message-ID: <1466715953-40692-3-git-send-email-snitzer@redhat.com> (raw)
In-Reply-To: <1466715953-40692-1-git-send-email-snitzer@redhat.com>

From: Yigal Korman <yigal@plexistor.com>

Provides the ability to identify DAX enabled devices in userspace.

Signed-off-by: Yigal Korman <yigal@plexistor.com>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
 block/blk-sysfs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 9920596..f87a7e7 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -379,6 +379,11 @@ 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)
+{
+	return queue_var_show(blk_queue_dax(q), page);
+}
+
 static struct queue_sysfs_entry queue_requests_entry = {
 	.attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
 	.show = queue_requests_show,
@@ -516,6 +521,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 +552,7 @@ static struct attribute *default_attrs[] = {
 	&queue_random_entry.attr,
 	&queue_poll_entry.attr,
 	&queue_wc_entry.attr,
+	&queue_dax_entry.attr,
 	NULL,
 };
 
-- 
2.7.4 (Apple Git-66)

  parent reply	other threads:[~2016-06-23 21:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 21:05 [PATCH v3 0/4] Support DAX for device-mapper linear devices Mike Snitzer
2016-06-23 21:05 ` Mike Snitzer
     [not found] ` <1466715953-40692-1-git-send-email-snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-23 21:05   ` [PATCH v3 1/4] block: add QUEUE_FLAG_DAX for devices to advertise their DAX support Mike Snitzer
2016-06-23 21:05     ` Mike Snitzer
2016-06-23 21:05   ` Mike Snitzer [this message]
2016-06-23 21:05     ` [PATCH v3 2/4] block: expose QUEUE_FLAG_DAX in sysfs Mike Snitzer
2016-06-23 21:05   ` [PATCH v3 3/4] dm: add infrastructure for DAX support Mike Snitzer
2016-06-23 21:05     ` Mike Snitzer
     [not found]     ` <1466715953-40692-4-git-send-email-snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-23 23:36       ` Kani, Toshimitsu
2016-06-23 23:36         ` Kani, Toshimitsu
     [not found]         ` <1466724984.3504.380.camel-ZPxbGqLxI0U@public.gmane.org>
2016-06-24  1:49           ` Mike Snitzer
2016-06-24  1:49             ` Mike Snitzer
     [not found]             ` <20160624014930.GA10540-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-24 15:40               ` Kani, Toshimitsu
2016-06-24 15:40                 ` Kani, Toshimitsu
     [not found]                 ` <1466782822.3504.391.camel-ZPxbGqLxI0U@public.gmane.org>
2016-06-24 15:44                   ` Mike Snitzer
2016-06-24 15:44                     ` Mike Snitzer
     [not found]                     ` <20160624154446.GB13898-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-24 15:56                       ` Kani, Toshimitsu
2016-06-24 15:56                         ` Kani, Toshimitsu
2016-06-23 21:05   ` [PATCH v3 4/4] dm linear: add " Mike Snitzer
2016-06-23 21:05     ` Mike Snitzer
2016-06-30 17:00   ` [PATCH v3 0/4] Support DAX for device-mapper linear devices Mike Snitzer
2016-06-30 17:00     ` Mike Snitzer
     [not found]     ` <20160630170053.GA20750-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-08 19:30       ` Mike Snitzer
2016-07-08 19:30         ` Mike Snitzer

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=1466715953-40692-3-git-send-email-snitzer@redhat.com \
    --to=snitzer-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@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=toshi.kani-ZPxbGqLxI0U@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@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.