other versions
BDEV_WRITE_PAGE(9) | The Linux VFS | BDEV_WRITE_PAGE(9) |
NAME¶
bdev_write_page - Start writing a page to a block deviceSYNOPSIS¶
int bdev_write_page(struct block_device * bdev, sector_t sector, struct page * page, struct writeback_control * wbc);
ARGUMENTS¶
struct block_device * bdevThe device to write the page to
sector_t sector
The offset on the device to write the page to (need not
be aligned)
struct page * page
The page to write
struct writeback_control * wbc
The writeback_control for the write
DESCRIPTION¶
On entry, the page should be locked and not currently under writeback. On exit, if the write started successfully, the page will be unlocked and under writeback. If the write failed already (eg the driver failed to queue the page to the device), the page will still be locked. If the caller is a ->writepage implementation, it will need to unlock the page.Errors returned by this function are usually “soft”, eg out of memory, or queue full; callers should try a different route to write this page rather than propagate an error back up the stack.
RETURN¶
negative errno if an error occurs, 0 if submission was successful.COPYRIGHT¶
July 2017 | Kernel Hackers Manual 4.11 |