pm: Add pm_writeback_pages()
[akaros.git] / kern / include / pagemap.h
index 5146310..140ffbb 100644 (file)
@@ -22,13 +22,13 @@ struct page_map_operations;
  * currently in memory.  It is a map, per object, from index to physical page
  * frame. */
 struct page_map {
+       qlock_t                                         pm_qlock;               /* for the radix tree nr_pgs */
        struct fs_file                          *pm_file;
        struct radix_tree                       pm_tree;                /* tracks present pages */
        unsigned long                           pm_num_pages;   /* how many pages are present */
        struct page_map_operations      *pm_op;
-       spinlock_t                                      pm_lock;
+       spinlock_t                                      pm_lock;                /* for the VMR list */
        struct vmr_tailq                        pm_vmrs;
-       atomic_t                                        pm_removal;
 };
 
 /* Operations performed on a page_map.  These are usually FS specific, which
@@ -62,6 +62,7 @@ int pm_remove_contig(struct page_map *pm, unsigned long index,
                      unsigned long nr_pgs);
 void pm_remove_or_zero_pages(struct page_map *pm, unsigned long start_idx,
                              unsigned long nr_pgs);
+void pm_writeback_pages(struct page_map *pm);
 void pm_destroy(struct page_map *pm);
 void pm_page_asserter(struct page *page, char *str);
 void print_page_map_info(struct page_map *pm);