From: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
To: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
LKML <linux-kernel@vger.kernel.org>,
Li Zefan <lizf@cn.fujitsu.com>, Ingo Molnar <mingo@elte.hu>,
Steven Rostedt <srostedt@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Subject: [PATCH] from-sector redundant in trace_block_remap
Date: Thu, 30 Apr 2009 12:58:52 -0400 [thread overview]
Message-ID: <49F9D8CC.7010502@hp.com> (raw)
In-Reply-To: <49F9D82D.50901@hp.com>
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0001-from-sector-redundant-in-trace_block_remap.patch --]
[-- Type: text/x-diff, Size: 3158 bytes --]
>From f167379b6c2cbad5f4fe8492052693825980ec19 Mon Sep 17 00:00:00 2001
From: Alan D. Brunelle <alan.brunelle@hp.com>
Date: Thu, 30 Apr 2009 11:22:55 -0400
Subject: [PATCH] from-sector redundant in trace_block_remap
Removed redundant from-sector parameter: it's /always/ the bio's sector
passed in.
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
block/blk-core.c | 5 ++---
drivers/md/dm.c | 3 +--
include/trace/block.h | 4 ++--
kernel/trace/blktrace.c | 7 ++++---
4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 2998fe3..d028baf 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1277,7 +1277,7 @@ static inline void blk_partition_remap(struct bio *bio)
bio->bi_bdev = bdev->bd_contains;
trace_block_remap(bdev_get_queue(bio->bi_bdev), bio,
- bdev->bd_dev, bio->bi_sector,
+ bdev->bd_dev,
bio->bi_sector - p->start_sect);
}
}
@@ -1446,8 +1446,7 @@ static inline void __generic_make_request(struct bio *bio)
goto end_io;
if (old_sector != -1)
- trace_block_remap(q, bio, old_dev, bio->bi_sector,
- old_sector);
+ trace_block_remap(q, bio, old_dev, old_sector);
trace_block_bio_queue(q, bio);
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 424f7b0..e2ee4a7 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -656,8 +656,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
/* the bio has been remapped so dispatch it */
trace_block_remap(bdev_get_queue(clone->bi_bdev), clone,
- tio->io->bio->bi_bdev->bd_dev,
- clone->bi_sector, sector);
+ tio->io->bio->bi_bdev->bd_dev, sector);
generic_make_request(clone);
} else if (r < 0 || r == DM_MAPIO_REQUEUE) {
diff --git a/include/trace/block.h b/include/trace/block.h
index 25b7068..8ac945b 100644
--- a/include/trace/block.h
+++ b/include/trace/block.h
@@ -70,7 +70,7 @@ DECLARE_TRACE(block_split,
DECLARE_TRACE(block_remap,
TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev,
- sector_t from, sector_t to),
- TP_ARGS(q, bio, dev, from, to));
+ sector_t to),
+ TP_ARGS(q, bio, dev, to));
#endif
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 921ef5d..6eaef3b 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -817,7 +817,7 @@ static void blk_add_trace_split(struct request_queue *q, struct bio *bio,
*
**/
static void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
- dev_t dev, sector_t from, sector_t to)
+ dev_t dev, sector_t to)
{
struct blk_trace *bt = q->blk_trace;
struct blk_io_trace_remap r;
@@ -829,8 +829,9 @@ static void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
r.device_from = cpu_to_be32(bio->bi_bdev->bd_dev);
r.sector = cpu_to_be64(to);
- __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP,
- !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
+ __blk_add_trace(bt, bio->bi_sector, bio->bi_size, bio->bi_rw,
+ BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE),
+ sizeof(r), &r);
}
/**
--
1.6.0.4
next prev parent reply other threads:[~2009-04-30 16:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 4:37 [PATCH] blktrace: swap arg name "from" and "to" of blk_add_trace_remap KOSAKI Motohiro
2009-04-30 6:47 ` Ingo Molnar
2009-04-30 16:56 ` Alan D. Brunelle
2009-04-30 16:58 ` Alan D. Brunelle [this message]
2009-05-01 2:08 ` Subject: [PATCH] from-sector redundant in trace_block_remap KOSAKI Motohiro
2009-05-01 12:41 ` Alan D. Brunelle
2009-05-04 5:46 ` Li Zefan
2009-04-30 16:59 ` [PATCH] blktrace: correct remap names Alan D. Brunelle
2009-05-04 5:47 ` Li Zefan
2009-05-06 9:53 ` Ingo Molnar
2009-05-06 11:30 ` Alan D. Brunelle
2009-05-06 12:10 ` Ingo Molnar
2009-05-01 2:13 ` [PATCH] blktrace: swap arg name "from" and "to" of blk_add_trace_remap KOSAKI Motohiro
2009-05-01 12:44 ` Alan D. Brunelle
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=49F9D8CC.7010502@hp.com \
--to=alan.brunelle@hp.com \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=srostedt@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox