carta
sb_start_pagefault(9)

sb_start_pagefault9

Get write access to a superblock from a page fault

Usage

void sb_start_pagefault(struct super_block * sb);

Arguments

sb

the super we write to

Overview

When a process starts handling write page fault, it should embed the operation into sb_start_pagefault - sb_end_pagefault 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.

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 sb_start_pagefault close to mmap_sem in lock ordering. Page fault handling code implies lock dependency:

mmap_sem -> sb_start_pagefault

History

  • Debian 9 (Stretch): the text shown here
  • Debian 8 (Jessie)

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.