X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=Incremental.c;h=c9372587f518dc57693b1d04d746a723423e57b2;hp=f548bad9785dbfe5e78ad67cc047ba16750db136;hb=8832342d3aad09d3c86af6dc9b137d6fd83af1ae;hpb=5dd29dafa26f1745ef055de1a035317d75c0e4ed diff --git a/Incremental.c b/Incremental.c index f548bad9..c9372587 100644 --- a/Incremental.c +++ b/Incremental.c @@ -588,10 +588,14 @@ int Incremental(struct mddev_dev *devlist, struct context *c, else rv = sysfs_set_str(sra, NULL, "array_state", "read-auto"); + /* Array might be O_EXCL which will interfere with + * fsck and mount. So re-open without O_EXCL. + */ + reopen_mddev(mdfd); if (rv == 0) { - if (c->export) { - printf("MD_STARTED=yes\n"); - } else if (c->verbose >= 0) + if (c->export) { + printf("MD_STARTED=yes\n"); + } else if (c->verbose >= 0) pr_err("%s attached to %s, which has been started.\n", devname, chosen_name); rv = 0;