Re: [patch 2/8] raid5: lockless access raid5 overrided bi_phys_segments

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

 



On Wed, Jun 6, 2012 at 6:06 PM, NeilBrown <neilb@xxxxxxx> wrote:
> On Mon, 04 Jun 2012 16:01:54 +0800 Shaohua Li <shli@xxxxxxxxxx> wrote:
>
>> Raid5 overrides bio->bi_phys_segments, accessing it is with device_lock hold,
>> which is unnecessary, We can make it lockless actually.
>>
>> Signed-off-by: Shaohua Li <shli@xxxxxxxxxxxx>
>
> I cannot say that I like this (casting fields in the bio structure), but I
> can see the value and it should work.  'atomic_t' is currently always the same
> size as an 'int', and I doubt that will change.
>
> So maybe I'll get used to the idea.

I think we should just bite the bullet and acknowledge that this field
has other meanings depending on the context and make it a union of int
and atomic_t..

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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