From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaohua Li Subject: Re: [md PATCH 1/4] md: add block tracing for bio_remapping Date: Wed, 16 Nov 2016 11:29:22 -0800 Message-ID: <20161116192922.ylqx32zocag4xp4b@kernel.org> References: <147910131504.27168.6566119701315109161.stgit@noble> <147910142095.27168.11356591734977480053.stgit@noble> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <147910142095.27168.11356591734977480053.stgit@noble> Sender: linux-raid-owner@vger.kernel.org To: NeilBrown Cc: linux-raid@vger.kernel.org List-Id: linux-raid.ids On Mon, Nov 14, 2016 at 04:30:21PM +1100, Neil Brown wrote: > The block tracing infrastructure (accessed with blktrace/blkparse) > supports the tracing of mapping bios from one device to another. > This is currently used when a bio in a partition is mapped to the > whole device, when bios are mapped by dm, and for mapping in md/raid5. > Other md personalities do not include this tracing yet, so add it. > > When a read-error is detected we redirect the request to a different device. > This could justifiably be seen as a new mapping for the originial bio, > or a secondary mapping for the bio that errors. This patch uses > the second option. > > When md is used under dm-raid, the mappings are not traced as we do > not have access to the block device number of the parent. Looks the the original sector (the last parameter of trace_block_bio_remap) isn't correct. - in linear/raid0, bio_split already updated bio->bi_iter.bi_sector - in raid1/raid10, r1_bio->sector is updated before the bio is sent. Thanks, Shaohua