On 12/7/2010 3:07 AM, Hawrylewicz Czarnowski, Przemyslaw wrote:
I've applied this, but I'm not 100% sure it is completely safe.
mdmon holds the O_EXCL open to be sure that mdadm isn't creating or
assembling another array in the container.
mdadm will get an O_EXCL and then try sending a signal to mdmon. If it
succeeds, it knows mdmon is still running. But this patch might open a
window where mdadm can get O_EXCL, and a signal still works.
On the manual pages, behavior of O_EXCL is only defined in connection with O_CREAT flag, which is not present in open_dev_excl (of course:). I have just make test for open(name, O_RDWR | O_EXCL) few times on the same file and it does not block other processes...
Try the same test on a device special file.
--
Dan
--
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