[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AB32148.3010004@cn.fujitsu.com>
Date: Fri, 18 Sep 2009 13:57:28 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: "Jun'ichi Nomura" <j-nomura@...jp.nec.com>
CC: linux-kernel@...r.kernel.org,
device-mapper development <dm-devel@...hat.com>,
Jens Axboe <jens.axboe@...cle.com>,
Alasdair G Kergon <agk@...hat.com>
Subject: Re: [PATCH] Add a tracepoint for block request remapping
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);
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists