'\" t .\" Title: sb_start_pagefault .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: March 2017 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 4.10.7 .\" Language: English .\" .TH "SB_START_PAGEFAULT" "9" "March 2017" "Kernel Hackers Manual 4\&.10\&" "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" sb_start_pagefault \- get write access to a superblock from a page fault .SH "SYNOPSIS" .HP \w'void\ sb_start_pagefault('u .BI "void sb_start_pagefault(struct\ super_block\ *\ " "sb" ");" .SH "ARGUMENTS" .PP \fIsb\fR .RS 4 the super we write to .RE .SH "DESCRIPTION" .PP When a process starts handling write page fault, it should embed the operation into \fBsb_start_pagefault\fR \- \fBsb_end_pagefault\fR pair to get exclusion against file system freezing\&. This is needed since the page fault is going to dirty a page\&. This function increments number of running page faults preventing freezing\&. If the file system is already frozen, the function waits until the file system is thawed\&. .PP Since page fault freeze protection behaves as a lock, users have to preserve ordering of freeze protection and other filesystem locks\&. It is advised to put \fBsb_start_pagefault\fR close to mmap_sem in lock ordering\&. Page fault handling code implies lock dependency: .PP mmap_sem \-> sb_start_pagefault .SH "COPYRIGHT" .br