public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: Li Zefan <lizf@cn.fujitsu.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 23:34:48 +0900	[thread overview]
Message-ID: <4AB39A88.3040106@ce.jp.nec.com> (raw)
In-Reply-To: <4AB32148.3010004@cn.fujitsu.com>

Li Zefan wrote:
> 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. ;)

OK, I'll add a renaming patch.

>> +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(...))

Thank you! I'll fix that.

>> +	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);
>> +}

-- 
Jun'ichi Nomura, NEC Corporation

  reply	other threads:[~2009-09-18 14:59 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
2009-09-18 14:34   ` Jun'ichi Nomura [this message]
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=4AB39A88.3040106@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.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