documentation: document the is_dirty_writeback aops callback
authorMel Gorman <mgorman@suse.de>
Wed, 3 Jul 2013 22:04:46 +0000 (15:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:40 +0000 (16:07 -0700)
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/filesystems/vfs.txt

index fc5d2a1..f93a882 100644 (file)
@@ -582,6 +582,7 @@ struct address_space_operations {
        int (*launder_page) (struct page *);
        int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
                                        unsigned long);
        int (*launder_page) (struct page *);
        int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
                                        unsigned long);
+       void (*is_dirty_writeback) (struct page *, bool *, bool *);
        int (*error_remove_page) (struct mapping *mapping, struct page *page);
        int (*swap_activate)(struct file *);
        int (*swap_deactivate)(struct file *);
        int (*error_remove_page) (struct mapping *mapping, struct page *page);
        int (*swap_activate)(struct file *);
        int (*swap_deactivate)(struct file *);
@@ -746,6 +747,15 @@ struct address_space_operations {
        block is up to date then the read can complete without needing the IO
        to bring the whole page up to date.
 
        block is up to date then the read can complete without needing the IO
        to bring the whole page up to date.
 
+  is_dirty_writeback: Called by the VM when attempting to reclaim a page.
+       The VM uses dirty and writeback information to determine if it needs
+       to stall to allow flushers a chance to complete some IO. Ordinarily
+       it can use PageDirty and PageWriteback but some filesystems have
+       more complex state (unstable pages in NFS prevent reclaim) or
+       do not set those flags due to locking problems (jbd). This callback
+       allows a filesystem to indicate to the VM if a page should be
+       treated as dirty or writeback for the purposes of stalling.
+
   error_remove_page: normally set to generic_error_remove_page if truncation
        is ok for this address space. Used for memory failure handling.
        Setting this implies you deal with pages going away under you,
   error_remove_page: normally set to generic_error_remove_page if truncation
        is ok for this address space. Used for memory failure handling.
        Setting this implies you deal with pages going away under you,