diff options
Diffstat (limited to 'Documentation/filesystems/Locking')
-rw-r--r-- | Documentation/filesystems/Locking | 8 |
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 | ||
175 | locking rules: | 176 | locking rules: |
176 | All except set_page_dirty may block | 177 | All except set_page_dirty may block |
@@ -188,6 +189,7 @@ bmap: yes | |||
188 | invalidatepage: no yes | 189 | invalidatepage: no yes |
189 | releasepage: no yes | 190 | releasepage: no yes |
190 | direct_IO: no | 191 | direct_IO: no |
192 | launder_page: no yes | ||
191 | 193 | ||
192 | ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage() | 194 | ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage() |
193 | may be called from the request handler (/dev/loop). | 195 | may 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 | |||
281 | indicate that the buffers are (or may be) freeable. If ->releasepage is zero, | 283 | indicate that the buffers are (or may be) freeable. If ->releasepage is zero, |
282 | the kernel assumes that the fs has no private interest in the buffers. | 284 | the 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 | ||
287 | it is still found to be dirty. It returns zero if the page was successfully | ||
288 | cleaned, or an error value if not. Note that in order to prevent the page | ||
289 | getting mapped back in and redirtied, it needs to be kept locked | ||
290 | across 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 |
285 | using BKL for internal serialization and that's one of the worst sources | 293 | using BKL for internal serialization and that's one of the worst sources |
286 | of contention. Normally they are calling library functions (in fs/buffer.c) | 294 | of contention. Normally they are calling library functions (in fs/buffer.c) |