From: Ingo Molnar <mingo@elte.hu>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Li Zefan <lizf@cn.fujitsu.com>,
Steven Rostedt <srostedt@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] blktrace: swap arg name "from" and "to" of blk_add_trace_remap
Date: Thu, 30 Apr 2009 08:47:34 +0200 [thread overview]
Message-ID: <20090430064734.GE9559@elte.hu> (raw)
In-Reply-To: <20090430133627.D217.A69D9226@jp.fujitsu.com>
* KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> Subject: [PATCH] blktrace: swap arg name "from" and "to" of blk_add_trace_remap
>
> Impact: cleanup for improve readability
>
> Currently, blk_add_trace_remap has following prototype.
>
> static void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
> dev_t dev, sector_t from, sector_t to)
>
> but caller pass "from" secter as 4th arg, "to" sector as 5th arg.
>
> example,
> --------------------------------------------------------
> static inline void blk_partition_remap(struct bio *bio)
> {
> struct block_device *bdev = bio->bi_bdev;
>
> if (bio_sectors(bio) && bdev != bdev->bd_contains) {
> struct hd_struct *p = bdev->bd_part;
>
> bio->bi_sector += p->start_sect;
> bio->bi_bdev = bdev->bd_contains;
>
> trace_block_remap(bdev_get_queue(bio->bi_bdev), bio,
> bdev->bd_dev, bio->bi_sector,
> bio->bi_sector - p->start_sect);
> }
> }
> --------------------------------------------------------
>
> Oh my god, it's reverse order.
> Fortunately, print logic reverse again. the twice reversing hide problem.
heh ... well spotted.
> but, but...
> It repeatedly confuse reviewer (include me!).
> Then, swapping argment name is better.
Agreed. Li, Jens, what do you think?
Ingo
next prev parent reply other threads:[~2009-04-30 6:48 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 [this message]
2009-04-30 16:56 ` Alan D. Brunelle
2009-04-30 16:58 ` Subject: [PATCH] from-sector redundant in trace_block_remap Alan D. Brunelle
2009-05-01 2:08 ` 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=20090430064734.GE9559@elte.hu \
--to=mingo@elte.hu \
--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=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