aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/Locking8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 790ef6fbe495..28bfea75bcf2 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -171,6 +171,7 @@ prototypes:
171 int (*releasepage) (struct page *, int); 171 int (*releasepage) (struct page *, int);
172 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 172 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
173 loff_t offset, unsigned long nr_segs); 173 loff_t offset, unsigned long nr_segs);
174 int (*launder_page) (struct page *);
174 175
175locking rules: 176locking rules:
176 All except set_page_dirty may block 177 All except set_page_dirty may block
@@ -188,6 +189,7 @@ bmap: yes
188invalidatepage: no yes 189invalidatepage: no yes
189releasepage: no yes 190releasepage: no yes
190direct_IO: no 191direct_IO: no
192launder_page: no yes
191 193
192 ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage() 194 ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
193may be called from the request handler (/dev/loop). 195may be called from the request handler (/dev/loop).
@@ -281,6 +283,12 @@ buffers from the page in preparation for freeing it. It returns zero to
281indicate that the buffers are (or may be) freeable. If ->releasepage is zero, 283indicate that the buffers are (or may be) freeable. If ->releasepage is zero,
282the kernel assumes that the fs has no private interest in the buffers. 284the kernel assumes that the fs has no private interest in the buffers.
283 285
286 ->launder_page() may be called prior to releasing a page if
287it is still found to be dirty. It returns zero if the page was successfully
288cleaned, or an error value if not. Note that in order to prevent the page
289getting mapped back in and redirtied, it needs to be kept locked
290across the entire operation.
291
284 Note: currently almost all instances of address_space methods are 292 Note: currently almost all instances of address_space methods are
285using BKL for internal serialization and that's one of the worst sources 293using BKL for internal serialization and that's one of the worst sources
286of contention. Normally they are calling library functions (in fs/buffer.c) 294of contention. Normally they are calling library functions (in fs/buffer.c)