On Wed, Jul 18, 2007 at 04:15:46PM +0200, Matthias Koenig wrote:
> Let mkswap, mkfs.bfs, mkfs.minix open with O_EXCL if
> used on block devices to prevent writing to the device
> even if they are busy.
"busy" -- do you mean mounted?
BTW, mkswap and mkfs.minix are checking against /etc/mtab.
The O_EXCL is not real exclusive lock, it's exclusive lock against
others O_EXCT accesses only. Fortunately, in-kernel mount/swapon
code uses O_EXCT-like locks too. (Unfortunately, this is not true for
2.4 kernels where O_EXCT has zero effect for block devices.)
It seems like a good patch. Thanks.
Karel
--
Karel Zak <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html