other versions
- jessie-backports 4.9.88-1+deb9u1~bpo8+1
- stretch 4.9.144-3
BLKDEV_GET(9) | The Linux VFS | BLKDEV_GET(9) |
NAME¶
blkdev_get - open a block deviceSYNOPSIS¶
int
blkdev_get(struct block_device * bdev,
fmode_t mode,
void * holder);
ARGUMENTS¶
bdevblock_device to open
mode
FMODE_* mask
holder
exclusive holder identifier
DESCRIPTION¶
Open bdev with mode. If mode includes FMODE_EXCL, bdev is open with exclusive access. Specifying FMODE_EXCL with NULLholder is invalid. Exclusive opens may nest for the same holder. On success, the reference count of bdev is unchanged. On failure, bdev is put.CONTEXT¶
Might sleep.RETURN¶
0 on success, -errno on failure.COPYRIGHT¶
May 2018 | Kernel Hackers Manual 4.9. |