 address_space      ,  
 .   ,   host    -
 .    host  NULL,    
  ; ,  address_space   
    (swapper).

 a_ops         ,
      VFS.     -
  struct address_space_operations,    
<linux/fs.h>  .

struct address space operations {

int (*writepage)(struct page *, struct writeback_control *);

int (*readpage) (struct file *, struct page *);

int (*sync page) (struct page *);

int (*writepages) (struct address_space *,

struct writeback control *);

int (*set_page_dirty) (struct page *);

int (*readpages) (struct file *, struct address_space *,

struct list_head *, unsigned);

int (*prepare write) (struct file *, struct page *,

unsigned, unsigned);

int (*commit write) (struct file *, struct page *,

unsigned, unsigned);

sector t (*bmap)(struct address space *, sector t) ;

int (*invalidatepage) (struct page *, unsigned long) ;

int (*releasepage) (struct page *, int) ;

int (*direct_IO) (int, struct kiocb *, const struct iovec *,

loff t, unsigned long) ;

};

 read_page  write_page   . 
,      .

       :  address_
space  .        -
    .

page = find_get_page(mapping, index) ;

  mapping     , a index   -
  .

      ,     -
      .

struct page *cached page;

int error;

cached_page = page_cache_alloc_cold(mapping);

if (!cached_page)

/*    */
error = add_to page cache Iru(cached page, mapping, index, GFP KERNEL);

if (error)

/*        */

334                                                                    15