-
Andrew Morton authored
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.
c366082d