aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/Locking
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/Locking')
-rw-r--r--Documentation/filesystems/Locking11
1 files changed, 2 insertions, 9 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 75eea7ce3d7c..08086dc160d3 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -179,7 +179,6 @@ unlocks and drops the reference.
179prototypes: 179prototypes:
180 int (*writepage)(struct page *page, struct writeback_control *wbc); 180 int (*writepage)(struct page *page, struct writeback_control *wbc);
181 int (*readpage)(struct file *, struct page *); 181 int (*readpage)(struct file *, struct page *);
182 int (*sync_page)(struct page *);
183 int (*writepages)(struct address_space *, struct writeback_control *); 182 int (*writepages)(struct address_space *, struct writeback_control *);
184 int (*set_page_dirty)(struct page *page); 183 int (*set_page_dirty)(struct page *page);
185 int (*readpages)(struct file *filp, struct address_space *mapping, 184 int (*readpages)(struct file *filp, struct address_space *mapping,
@@ -208,7 +207,6 @@ locking rules:
208 PageLocked(page) i_mutex 207 PageLocked(page) i_mutex
209writepage: yes, unlocks (see below) 208writepage: yes, unlocks (see below)
210readpage: yes, unlocks 209readpage: yes, unlocks
211sync_page: maybe
212writepages: 210writepages:
213set_page_dirty no 211set_page_dirty no
214readpages: 212readpages:
@@ -226,8 +224,8 @@ error_remove_page: yes
226swap_activate: no 224swap_activate: no
227swap_deactivate: no 225swap_deactivate: no
228 226
229 ->write_begin(), ->write_end(), ->sync_page() and ->readpage() 227 ->write_begin(), ->write_end() and ->readpage() may be called from
230may be called from the request handler (/dev/loop). 228the request handler (/dev/loop).
231 229
232 ->readpage() unlocks the page, either synchronously or via I/O 230 ->readpage() unlocks the page, either synchronously or via I/O
233completion. 231completion.
@@ -283,11 +281,6 @@ will leave the page itself marked clean but it will be tagged as dirty in the
283radix tree. This incoherency can lead to all sorts of hard-to-debug problems 281radix tree. This incoherency can lead to all sorts of hard-to-debug problems
284in the filesystem like having dirty inodes at umount and losing written data. 282in the filesystem like having dirty inodes at umount and losing written data.
285 283
286 ->sync_page() locking rules are not well-defined - usually it is called
287with lock on page, but that is not guaranteed. Considering the currently
288existing instances of this method ->sync_page() itself doesn't look
289well-defined...
290
291 ->writepages() is used for periodic writeback and for syscall-initiated 284 ->writepages() is used for periodic writeback and for syscall-initiated
292sync operations. The address_space should start I/O against at least 285sync operations. The address_space should start I/O against at least
293*nr_to_write pages. *nr_to_write must be decremented for each page which is 286*nr_to_write pages. *nr_to_write must be decremented for each page which is