From: Kent Overstreet <kent.overstreet@gmail.com>
To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
linux-mm@kvack.org, Jens Axboe <axboe@kernel.dk>,
Ingo Molnar <mingo@kernel.org>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Subject: [PATCH 10/10] block: Add sysfs entry for fua support
Date: Tue, 8 May 2018 21:33:58 -0400 [thread overview]
Message-ID: <20180509013358.16399-11-kent.overstreet@gmail.com> (raw)
In-Reply-To: <20180509013358.16399-1-kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
---
block/blk-sysfs.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index cbea895a55..d6dd7d8198 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -497,6 +497,11 @@ static ssize_t queue_wc_store(struct request_queue *q, const char *page,
return count;
}
+static ssize_t queue_fua_show(struct request_queue *q, char *page)
+{
+ return sprintf(page, "%u\n", test_bit(QUEUE_FLAG_FUA, &q->queue_flags));
+}
+
static ssize_t queue_dax_show(struct request_queue *q, char *page)
{
return queue_var_show(blk_queue_dax(q), page);
@@ -665,6 +670,11 @@ static struct queue_sysfs_entry queue_wc_entry = {
.store = queue_wc_store,
};
+static struct queue_sysfs_entry queue_fua_entry = {
+ .attr = {.name = "fua", .mode = S_IRUGO },
+ .show = queue_fua_show,
+};
+
static struct queue_sysfs_entry queue_dax_entry = {
.attr = {.name = "dax", .mode = S_IRUGO },
.show = queue_dax_show,
@@ -714,6 +724,7 @@ static struct attribute *default_attrs[] = {
&queue_random_entry.attr,
&queue_poll_entry.attr,
&queue_wc_entry.attr,
+ &queue_fua_entry.attr,
&queue_dax_entry.attr,
&queue_wb_lat_entry.attr,
&queue_poll_delay_entry.attr,
--
2.17.0
next prev parent reply other threads:[~2018-05-09 1:34 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 1:33 [PATCH 00/10] Misc block layer patches for bcachefs Kent Overstreet
2018-05-09 1:33 ` [PATCH 01/10] mempool: Add mempool_init()/mempool_exit() Kent Overstreet
2018-05-09 7:54 ` Johannes Thumshirn
2018-05-11 21:11 ` Jens Axboe
2018-05-14 19:11 ` Kent Overstreet
2018-05-09 1:33 ` [PATCH 02/10] block: Convert bio_set to mempool_init() Kent Overstreet
2018-05-18 16:20 ` Christoph Hellwig
2018-05-18 16:21 ` Christoph Hellwig
2018-05-18 17:36 ` Kent Overstreet
2018-05-09 1:33 ` [PATCH 03/10] block: Add bioset_init()/bioset_exit() Kent Overstreet
2018-05-09 1:33 ` [PATCH 04/10] block: Use bioset_init() for fs_bio_set Kent Overstreet
2018-05-09 1:33 ` [PATCH 05/10] block: Add bio_copy_data_iter(), zero_fill_bio_iter() Kent Overstreet
2018-05-09 1:33 ` [PATCH 06/10] block: Split out bio_list_copy_data() Kent Overstreet
2018-05-09 1:33 ` [PATCH 07/10] block: Add missing flush_dcache_page() call Kent Overstreet
2018-05-09 1:33 ` [PATCH 08/10] block: Add warning for bi_next not NULL in bio_endio() Kent Overstreet
2018-05-09 1:33 ` [PATCH 09/10] block: Export bio check/set pages_dirty Kent Overstreet
2018-05-09 1:33 ` Kent Overstreet [this message]
2018-05-11 21:13 ` [PATCH 00/10] Misc block layer patches for bcachefs Jens Axboe
2018-05-18 16:23 ` Christoph Hellwig
2018-05-18 16:33 ` Jens Axboe
2018-05-14 19:24 ` Jens Axboe
2018-05-14 19:24 ` Kent Overstreet
2018-05-17 20:54 ` Bart Van Assche
2018-05-18 9:06 ` Kent Overstreet
2018-05-18 15:12 ` Bart Van Assche
2018-05-20 22:17 ` Kent Overstreet
2018-05-20 22:19 ` Bart Van Assche
2018-05-20 22:31 ` Kent Overstreet
2018-05-20 22:35 ` Bart Van Assche
2018-05-20 23:00 ` Kent Overstreet
2018-05-20 23:10 ` Bart Van Assche
2018-05-20 23:21 ` Kent Overstreet
2018-05-20 23:40 ` Bart Van Assche
2018-05-20 23:58 ` Kent Overstreet
2018-05-21 15:11 ` Bart Van Assche
2018-05-21 18:37 ` Omar Sandoval
2018-05-21 18:46 ` Bart Van Assche
2018-05-22 22:01 ` Bart Van Assche
[not found] <20180518074918.13816-1-kent.overstreet@gmail.com>
2018-05-18 7:49 ` [PATCH 10/10] block: Add sysfs entry for fua support Kent Overstreet
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=20180509013358.16399-11-kent.overstreet@gmail.com \
--to=kent.overstreet@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).