Hi Neil, > > +int hot_remove_disk(int mdfd, unsigned long dev) > +{ > + int cnt = 5; > + int ret; > + > + /* HOT_REMOVE_DISK can fail with EBUSY if there are > + * outstanding IO requests to the device. > + * In this case, it can be helpful to wait a little while, > + * up to half a second, for that IO to flush. > + */ > + while ((ret = ioctl(mdfd, HOT_REMOVE_DISK, dev)) == -1 && > + errno == EBUSY && > + cnt-- > 0) > + usleep(10000); > + > + return ret; > +} The comments is different with the code, 50000 us = 50 ms not half a seconds. Other than that. It looks good to me! Reviewed-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx> Thanks, Jack > + > int set_array_info(int mdfd, struct supertype *st, struct mdinfo *info) > { > /* Initialise kernel's knowledge of array. > > > -- > 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 -- 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