---
name: "tag_pages_for_writeback"
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/tag_pages_for_writeback"
---

# tag\_pages\_for\_writeback(9)

tag pages to be written by write\_cache\_pages

## NAME

tag\_pages\_for\_writeback - tag pages to be written by write\_cache\_pages

## SYNOPSIS

**void tag\_pages\_for\_writeback(struct address\_space \*** *mapping***, pgoff\_t** *start***, pgoff\_t** *end***);**

## ARGUMENTS

*mapping*

address space structure to write

*start*

starting page index

*end*

ending page index (inclusive)

## DESCRIPTION

This function scans the page range from *start* to *end* (inclusive) and tags all pages that have DIRTY tag set with a special TOWRITE tag. The idea is that write\_cache\_pages (or whoever calls this function) will then use TOWRITE tag to identify pages eligible for writeback. This mechanism is used to avoid livelocking of writeback by a process steadily creating new dirty pages in the file (thus it is important for this function to be quick so that it can tag pages faster than a dirtying process can create them).

## COPYRIGHT
