Christoph Hellwig wrote: > If you want to provide > protection against mounting the image on the host or scribbling over it > using mkfs you need to open the block device node with O_EXCL on Linux > as that's the mechanisms most tools and the filesystem code us for > exclusion.
Due to that I do suggest opening block devices with O_EXCL when exclusive locking is requested. -- Jamie