Name

__bread_gfp — reads a specified block and returns the bh

Synopsis

struct buffer_head * __bread_gfp (struct block_device * bdev,
 sector_t block,
 unsigned size,
 gfp_t gfp);
 

Arguments

struct block_device * bdev

the block_device to read from

sector_t block

number of block

unsigned size

size (in bytes) to read

gfp_t gfp

page allocation flag

Description

Reads a specified block, and returns buffer head that contains it. The page cache can be allocated from non-movable area not to prevent page migration if you set gfp to zero. It returns NULL if the block was unreadable.