Re: [PATCH 1/1] md: return -ENODEV if rdev has no mddev assigned

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

 



On Thu, Apr 11 2019, Song Liu wrote:

> On Thu, Apr 11, 2019 at 3:44 AM Pawel Baldysiak
> <pawel.baldysiak@xxxxxxxxx> wrote:
>>
>> On 4/11/19 00:34, Song Liu wrote>
>> > I think we should fix this in md.c:state_store(). rdev_attr_store() applies
>> > to all the files. Could you please look into this?
>> >
>> > Thanks,
>> > Song
>> >
>>
>> Hi Song,
>> I considered changing the return code in state_store, but if we do so -
>> it requires also changes in mdadm (to expect different errno). It will
>> be hard to guarantee that mdadm and kernel are in sync with each other.
>> I checked mdadm code - it looks like there are no other places that
>> expect EBUSY to be returned from other files related to rdev - that's
>> why I think that it is safe to change it in rdev_attr_store().
>>
>> Thanks
>> Pawel
>
> I see. This does make sense.
>
> Neil, could you please share your feedback on this change? Overall, I think
> this is the right way to go.

Yes, I agree that this patch is a good idea.
Certainly having a unique error code for the situation where a device is
being removed make sense.  I cannot see any way that mdadm would be
confused by this change.

Reviewed-by: NeilBrown <neilb@xxxxxxxx>

Thanks,
NeilBrown

>
> Thanks,
> Song

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