'\" t .\" Title: mpage_writepages .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "MPAGE_WRITEPAGES" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "The Linux VFS" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" mpage_writepages \- walk the list of dirty pages of the given address space & \fBwritepage\fR all of them .SH "SYNOPSIS" .HP \w'int\ mpage_writepages('u .BI "int mpage_writepages(struct\ address_space\ *\ " "mapping" ", struct\ writeback_control\ *\ " "wbc" ", get_block_t\ " "get_block" ");" .SH "ARGUMENTS" .PP \fImapping\fR .RS 4 address space structure to write .RE .PP \fIwbc\fR .RS 4 subtract the number of written pages from *\fIwbc\fR\->nr_to_write .RE .PP \fIget_block\fR .RS 4 the filesystem\*(Aqs block mapper function\&. If this is NULL then use a_ops\->writepage\&. Otherwise, go direct\-to\-BIO\&. .RE .SH "DESCRIPTION" .PP This is a library function, which implements the \fBwritepages\fR address_space_operation\&. .PP If a page is already under I/O, \fBgeneric_writepages\fR skips it, even if it\*(Aqs dirty\&. This is desirable behaviour for memory\-cleaning writeback, but it is INCORRECT for data\-integrity system calls such as \fBfsync\fR\&. \fBfsync\fR and \fBmsync\fR need to guarantee that all the data which was dirty at the time the call was made get new I/O started against them\&. If wbc\->sync_mode is WB_SYNC_ALL then we were called for data integrity and we must wait for existing IO to complete\&. .SH "COPYRIGHT" .br