NeilBrown <neilb@xxxxxxxx> writes: > There is no need to request write access when opening > the md device, as we never write to it, and none of the > ioctls we use require write access. > > If we do open with write access, then when we close, udev notices that > the device was closed after being open for write access, and it > generates a CHANGE event. > > This is generally unwanted, and particularly problematic when mdadm is > trying to --stop the array, as the CHANGE event can cause the array to > be re-opened before it completely closed, which results in a new mddev > being allocated. > > So just use O_RDONLY instead of O_RDWR. > > Reported-by: Marc Smith <marc.smith@xxxxxxx> > Signed-off-by: NeilBrown <neilb@xxxxxxxx> > --- > mdassemble.c | 2 +- > mdopen.c | 4 +--- > 2 files changed, 2 insertions(+), 4 deletions(-) Applied! Thanks, Jes -- 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