From: Li Zefan <lizf@cn.fujitsu.com>
To: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
Cc: linux-kernel@vger.kernel.org,
device-mapper development <dm-devel@redhat.com>,
Jens Axboe <jens.axboe@oracle.com>,
Alasdair G Kergon <agk@redhat.com>
Subject: Re: [PATCH] Add a tracepoint for block request remapping
Date: Fri, 18 Sep 2009 13:57:28 +0800 [thread overview]
Message-ID: <4AB32148.3010004@cn.fujitsu.com> (raw)
In-Reply-To: <4AB2E57B.2090101@ce.jp.nec.com>
Jun'ichi Nomura wrote:
> Since 2.6.31 now has request-based device-mapper, it's useful to have
> a tracepoint for request-remapping as well as bio-remapping.
>
> This patch adds a tracepoint for request-remapping, trace_block_rq_remap().
> Existing trace_block_remap() is left unchanged but it might be better to
> rename it to trace_block_bio_remap().
Why not. ;)
> +static void blk_add_trace_rq_remap(struct request_queue *q,
> + struct request *rq, dev_t dev,
> + sector_t from)
> +{
> + struct blk_trace *bt = q->blk_trace;
> + struct blk_io_trace_remap r;
> +
> + if (likely(!bt))
> + return;
> +
> + r.device_from = cpu_to_be32(dev);
> + r.device_to = disk_devt(rq->rq_disk);
cpu_to_be32(dis_devt(...))
> + r.sector_from = cpu_to_be64(from);
> +
> + __blk_add_trace(bt, blk_rq_pos(rq), blk_rq_bytes(rq),
> + rq_data_dir(rq), BLK_TA_REMAP, !!rq->errors,
> + sizeof(r), &r);
> +}
next prev parent reply other threads:[~2009-09-18 5:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 1:42 [PATCH] Add a tracepoint for block request remapping Jun'ichi Nomura
2009-09-18 2:02 ` KOSAKI Motohiro
2009-09-18 5:57 ` Li Zefan [this message]
2009-09-18 14:34 ` Jun'ichi Nomura
2009-09-18 10:45 ` Jens Axboe
2009-09-18 17:05 ` Jun'ichi Nomura
-- strict thread matches above, loose matches on Subject: below --
2009-09-21 16:25 Jun'ichi Nomura
2009-09-21 19:11 ` 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=4AB32148.3010004@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.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