1SB_START_WRITE(9)                The Linux VFS               SB_START_WRITE(9)
2
3
4

NAME

6       sb_start_write - get write access to a superblock
7

SYNOPSIS

9       void sb_start_write(struct super_block * sb);
10

ARGUMENTS

12       sb
13           the super we write to
14

DESCRIPTION

16       When a process wants to write data or metadata to a file system (i.e.
17       dirty a page or an inode), it should embed the operation in a
18       sb_start_write - sb_end_write pair to get exclusion against file system
19       freezing. This function increments number of writers preventing
20       freezing. If the file system is already frozen, the function waits
21       until the file system is thawed.
22
23       Since freeze protection behaves as a lock, users have to preserve
24       ordering of freeze protection and other filesystem locks. Generally,
25       freeze protection should be the outermost lock. In particular, we have:
26
27       sb_start_write -> i_mutex (write path, truncate, directory ops, ...) ->
28       s_umount (freeze_super, thaw_super)
29
31Kernel Hackers Manual 2.6.         June 2019                 SB_START_WRITE(9)
Impressum