From: NeilBrown <neilb@suse.com>
To: Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: [md PATCH 1/4] md: add block tracing for bio_remapping
Date: Thu, 17 Nov 2016 16:33:33 +1100 [thread overview]
Message-ID: <87twb6hdqq.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20161116192922.ylqx32zocag4xp4b@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]
On Thu, Nov 17 2016, Shaohua Li wrote:
> 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
Oh yes, of course. in the common case 'split == bio' so when
split->bi_iter.bi_sector is adjusted, bio->.... is as well.
I'll fix that, and also add calls to trace_block_split() as appropriate.
> - in raid1/raid10, r1_bio->sector is updated before the bio is sent.
Here I really think my code is correct. r1_bio->sector is always the
address in the array of the request. It is only set once for each
r1_bio, and that is before the call to trace_block_io_remap().
Thanks,
NeilBrown
>
> Thanks,
> Shaohua
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
next prev parent reply other threads:[~2016-11-17 5:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 5:30 [md PATCH 0/4] Improve blktrace tracing of md NeilBrown
2016-11-14 5:30 ` [md PATCH 3/4] md/bitmap: add blktrace event for writes to the bitmap NeilBrown
2016-11-16 19:31 ` Shaohua Li
2016-11-14 5:30 ` [md PATCH 2/4] md: add bio completion tracing for raid1/raid10 NeilBrown
2016-11-16 14:32 ` Christoph Hellwig
2016-11-17 5:35 ` NeilBrown
2016-11-17 12:51 ` Christoph Hellwig
2016-11-14 5:30 ` [md PATCH 1/4] md: add block tracing for bio_remapping NeilBrown
2016-11-16 19:29 ` Shaohua Li
2016-11-17 5:33 ` NeilBrown [this message]
2016-11-17 18:04 ` Shaohua Li
2016-11-18 0:45 ` NeilBrown
2016-11-14 5:30 ` [md PATCH 4/4] md/raid1, raid10: add blktrace records when IO is delayed NeilBrown
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=87twb6hdqq.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=shli@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;
as well as URLs for NNTP newsgroup(s).