mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: Jens Axboe <jaxboe@fusionio.com>
Cc: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/2] blktrace: treat flush as barrier
Date: Fri, 27 May 2011 22:11:22 +0900	[thread overview]
Message-ID: <1306501883-23498-1-git-send-email-namhyung@gmail.com> (raw)

Since BARRIER requests have been converted to FLUSH/FUA, it would be
better for blktrace to recognize FLUSH requests as BARRIER for the
backward-compatibility IMHO.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
---
 kernel/trace/blktrace.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 6957aa298dfa..8635d332c50b 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -176,6 +176,7 @@ static const u32 ddir_act[2] = { BLK_TC_ACT(BLK_TC_READ),
 				 BLK_TC_ACT(BLK_TC_WRITE) };
 
 #define BLK_TC_RAHEAD		BLK_TC_AHEAD
+#define BLK_TC_FLUSH		BLK_TC_BARRIER
 
 /* The ilog2() calls fall out because they're constant */
 #define MASK_TC_BIT(rw, __name) ((rw & REQ_ ## __name) << \
@@ -206,6 +207,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
 	what |= MASK_TC_BIT(rw, RAHEAD);
 	what |= MASK_TC_BIT(rw, META);
 	what |= MASK_TC_BIT(rw, DISCARD);
+	what |= MASK_TC_BIT(rw, FLUSH);
 
 	pid = tsk->pid;
 	if (act_log_check(bt, what, sector, pid))
-- 
1.7.5.2


             reply	other threads:[~2011-05-27 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 13:11 Namhyung Kim [this message]
2011-05-27 13:11 ` [PATCH 2/2] block: add REQ_SECURE to REQ_COMMON_MASK Namhyung Kim
2011-05-27 13:12 ` [PATCH 1/2] blktrace: treat flush as barrier Christoph Hellwig
2011-05-27 13:57   ` Mike Snitzer
2011-05-27 15:13     ` Namhyung Kim
2011-05-27 20:17       ` Jens Axboe
2011-05-27 20:27         ` Christoph Hellwig
2011-05-28  2:09           ` Namhyung Kim
2011-05-28  7:44             ` Christoph Hellwig
2011-05-31 10:27               ` Namhyung Kim
2011-05-31 10:37             ` Jens Axboe

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=1306501883-23498-1-git-send-email-namhyung@gmail.com \
    --to=namhyung@gmail.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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

Powered by JetHome