NeilBrown <neilb@xxxxxxx> wrote: > > static ssize_t > +md_show_scan(mddev_t *mddev, char *page) > +{ > + char *type = "none"; > + if (mddev->recovery & > + ((1<<MD_RECOVERY_RUNNING) || (1<<MD_RECOVERY_NEEDED))) { Shouldn't this be a bitwise OR? > + if (mddev->recovery & (1<<MD_RECOVERY_SYNC)) { > + if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) > + type = "resync"; > + else if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) > + type = "check"; > + else > + type = "repair"; > + } else > + type = "recover"; > + } > + return sprintf(page, "%s\n", type); > +} > + > +static ssize_t > +md_store_scan(mddev_t *mddev, const char *page, size_t len) > +{ > + int canscan=0; > + if (mddev->recovery & > + ((1<<MD_RECOVERY_RUNNING) || (1<<MD_RECOVERY_NEEDED))) And this? > + return -EBUSY; - 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