[PATCH] Allow O_EXCL on a block device to claim exclusive use.
From: NeilBrown <neilb@cse.unsw.edu.au> The blockdev layer has a concept of 'claiming' a device, so for example it can be claimed when a filesystem is mounted or when it is included into a raid array. Only one subsystem can claim it at a time. This patch matches this functionality available to user-space via the O_EXCL flag to open. This allows user-space programs to easily test if a device is currently mounted etc, and to prevent a device from being mounted or otherwise claimed.
Showing
Please register or sign in to comment