Re: [md PATCH 0/5] Stop using bi_phys_segments as a counter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 23 2016, Christoph Hellwig wrote:

> On Wed, Nov 23, 2016 at 01:08:38PM +1100, NeilBrown wrote:
>> For raid1/raid10 we could do a very similar thing.  There is an
>> awkwardness in raid1 w.r.t waiting for bi_phys_segments to reach 1, but
>> that might disappear if Coly's resync changes go through.
>> Alternately it might make sense to use bio_split so there is one r1_bio
>> per bio.
>> I might try the raid10 version and see what it looks like.
>
> For RAID1 reads there already is one r1_bio per bio

unless the bad-block-log records some bad/missing blocks in the middle
of the range being read.

> - in fact I have
> a hack that doesn't allocate a r1_bio at all, but that one currently
> does not handle reads from degraded arrays at all.  Due you remember
> why we only mark a leg fail for a given bio instead of on a per-device
> or at least per sector-range?

When we detect a read error, we try to "correct" it by reading the data
From elsewhere and over-writing the "bad" block.  If that works, there
was no need to mark the whole device as faulty.  If it does fail, that
is when the device is failed.

We could have a "soft-write-mostly" flag to discourage reads from a
questionable device, until it has been properly tested.

>
> For writes it would make sense to allocate the new bio for each mirror
> using a bio_set with front_pad for raid1-specific data, but I haven't
> really looked into the details yet.

Yes, you could.  I don't know if it would be an improvement, or just a
change.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux