On Thu, Apr 11, 2019 at 5:40 PM NeilBrown <neilb@xxxxxxxx> wrote: > > 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 Neil and Pawel! Applying the patch. Song > > > > > Thanks, > > Song