Re: [PATCH] disk-utils: let mkfs tools open with O_EXCL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux