diff options
Diffstat (limited to 'Documentation/filesystems/Locking')
-rw-r--r-- | Documentation/filesystems/Locking | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index f424e0e5b46b..efca5c1bbb10 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -529,6 +529,7 @@ locking rules: | |||
529 | open: yes | 529 | open: yes |
530 | close: yes | 530 | close: yes |
531 | fault: yes can return with page locked | 531 | fault: yes can return with page locked |
532 | map_pages: yes | ||
532 | page_mkwrite: yes can return with page locked | 533 | page_mkwrite: yes can return with page locked |
533 | access: yes | 534 | access: yes |
534 | 535 | ||
@@ -540,6 +541,15 @@ the page, then ensure it is not already truncated (the page lock will block | |||
540 | subsequent truncate), and then return with VM_FAULT_LOCKED, and the page | 541 | subsequent truncate), and then return with VM_FAULT_LOCKED, and the page |
541 | locked. The VM will unlock the page. | 542 | locked. The VM will unlock the page. |
542 | 543 | ||
544 | ->map_pages() is called when VM asks to map easy accessible pages. | ||
545 | Filesystem should find and map pages associated with offsets from "pgoff" | ||
546 | till "max_pgoff". ->map_pages() is called with page table locked and must | ||
547 | not block. If it's not possible to reach a page without blocking, | ||
548 | filesystem should skip it. Filesystem should use do_set_pte() to setup | ||
549 | page table entry. Pointer to entry associated with offset "pgoff" is | ||
550 | passed in "pte" field in vm_fault structure. Pointers to entries for other | ||
551 | offsets should be calculated relative to "pte". | ||
552 | |||
543 | ->page_mkwrite() is called when a previously read-only pte is | 553 | ->page_mkwrite() is called when a previously read-only pte is |
544 | about to become writeable. The filesystem again must ensure that there are | 554 | about to become writeable. The filesystem again must ensure that there are |
545 | no truncate/invalidate races, and then return with the page locked. If | 555 | no truncate/invalidate races, and then return with the page locked. If |