mm: add support for a filesystem to activate swap files and use direct_IO for writing...
[linux-2.6-block.git] / Documentation / filesystems / vfs.txt
index aa754e01464e1c71f55869da9d5222ef763518d7..065aa2dc083538dcf05a9e2863e8b14fddb9b514 100644 (file)
@@ -592,6 +592,8 @@ struct address_space_operations {
        int (*migratepage) (struct page *, struct page *);
        int (*launder_page) (struct page *);
        int (*error_remove_page) (struct mapping *mapping, struct page *page);
+       int (*swap_activate)(struct file *);
+       int (*swap_deactivate)(struct file *);
 };
 
   writepage: called by the VM to write a dirty page to backing store.
@@ -760,6 +762,16 @@ struct address_space_operations {
        Setting this implies you deal with pages going away under you,
        unless you have them locked or reference counts increased.
 
+  swap_activate: Called when swapon is used on a file to allocate
+       space if necessary and pin the block lookup information in
+       memory. A return value of zero indicates success,
+       in which case this file can be used to back swapspace. The
+       swapspace operations will be proxied to this address space's
+       ->swap_{out,in} methods.
+
+  swap_deactivate: Called during swapoff on files where swap_activate
+       was successful.
+
 
 The File Object
 ===============