1BLKDEV_GET(9)                    The Linux VFS                   BLKDEV_GET(9)
2
3
4

NAME

6       blkdev_get - open a block device
7

SYNOPSIS

9       int blkdev_get(struct block_device * bdev, fmode_t mode,
10                      void * holder);
11

ARGUMENTS

13       bdev
14           block_device to open
15
16       mode
17           FMODE_* mask
18
19       holder
20           exclusive holder identifier
21

DESCRIPTION

23       Open bdev with mode. If mode includes FMODE_EXCL, bdev is open with
24       exclusive access. Specifying FMODE_EXCL with NULLholder is invalid.
25       Exclusive opens may nest for the same holder.
26
27       On success, the reference count of bdev is unchanged. On failure, bdev
28       is put.
29

CONTEXT

31       Might sleep.
32

RETURNS

34       0 on success, -errno on failure.
35
37Kernel Hackers Manual 3.10         June 2019                     BLKDEV_GET(9)
Impressum