---
name: "sync_page_range"
section: "9"
platform: "linux"
package: "linux-manual-2.6.26"
version: "2.6.26-29"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/sync_page_range"
---

# sync\_page\_range(9)

write and wait on all pages in the passed range

## NAME

sync\_page\_range - write and wait on all pages in the passed range

## SYNOPSIS

**int sync\_page\_range(struct inode \*** *inode***, struct address\_space \*** *mapping***, loff\_t** *pos***, loff\_t** *count***);**

## ARGUMENTS

*inode*

target inode

*mapping*

target address\_space

*pos*

beginning offset in pages to write

*count*

number of bytes to write

## DESCRIPTION

Write and wait upon all the pages in the passed range. This is a “data integrity” operation. It waits upon in-flight writeout before starting and waiting upon new writeout. If there was an IO error, return it.

We need to re-take i\_mutex during the generic\_osync\_inode list walk because it is otherwise livelockable.

## COPYRIGHT
