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. Thanks, Song