---
name: "bdev_write_page"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/bdev_write_page"
---

# bdev\_write\_page(9)

Start writing a page to a block device

## NAME

bdev\_write\_page - Start writing a page to a block device

## SYNOPSIS

**int bdev\_write\_page(struct block\_device \*** *bdev***, sector\_t** *sector***, struct page \*** *page***, struct writeback\_control \*** *wbc***);**

## ARGUMENTS

*bdev*

The device to write the page to

*sector*

The offset on the device to write the page to (need not be aligned)

*page*

The page to write

*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
