quota: drop remount argument to ->quota_on and ->quota_off
[safe/jmp/linux-2.6] / include / linux / writeback.h
index 66ebddc..cc97d6c 100644 (file)
@@ -34,6 +34,9 @@ struct writeback_control {
        enum writeback_sync_modes sync_mode;
        unsigned long *older_than_this; /* If !NULL, only write back inodes
                                           older than this */
+       unsigned long wb_start;         /* Time writeback_inodes_wb was
+                                          called. This is needed to avoid
+                                          extra jobs and livelock */
        long nr_to_write;               /* Write this many pages, and decrement
                                           this for each page written */
        long pages_skipped;             /* Pages which were not written */
@@ -49,6 +52,7 @@ struct writeback_control {
        unsigned nonblocking:1;         /* Don't get stuck on request queues */
        unsigned encountered_congestion:1; /* An output: a queue is full */
        unsigned for_kupdate:1;         /* A kupdate writeback */
+       unsigned for_background:1;      /* A background writeback */
        unsigned for_reclaim:1;         /* Invoked from the page allocator */
        unsigned range_cyclic:1;        /* range_start is cyclic */
        unsigned more_io:1;             /* more io to be dispatched */
@@ -61,6 +65,15 @@ struct writeback_control {
         * so we use a single control to update them
         */
        unsigned no_nrwrite_index_update:1;
+
+       /*
+        * For WB_SYNC_ALL, the sb must always be pinned. For WB_SYNC_NONE,
+        * the writeback code will pin the sb for the caller. However,
+        * for eg umount, the caller does WB_SYNC_NONE but already has
+        * the sb pinned. If the below is set, caller already has the
+        * sb pinned.
+        */
+       unsigned sb_pinned:1;
 };
 
 /*
@@ -69,6 +82,8 @@ struct writeback_control {
 struct bdi_writeback;
 int inode_wait(void *);
 void writeback_inodes_sb(struct super_block *);
+void writeback_inodes_sb_locked(struct super_block *);
+int writeback_inodes_sb_if_idle(struct super_block *);
 void sync_inodes_sb(struct super_block *);
 void writeback_inodes_wbc(struct writeback_control *wbc);
 long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
@@ -78,8 +93,7 @@ void wakeup_flusher_threads(long nr_pages);
 static inline void wait_on_inode(struct inode *inode)
 {
        might_sleep();
-       wait_on_bit(&inode->i_state, __I_LOCK, inode_wait,
-                                                       TASK_UNINTERRUPTIBLE);
+       wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE);
 }
 static inline void inode_sync_wait(struct inode *inode)
 {
@@ -92,8 +106,14 @@ static inline void inode_sync_wait(struct inode *inode)
 /*
  * mm/page-writeback.c
  */
-void laptop_io_completion(void);
+#ifdef CONFIG_BLOCK
+void laptop_io_completion(struct backing_dev_info *info);
 void laptop_sync_completion(void);
+void laptop_mode_sync(struct work_struct *work);
+void laptop_mode_timer_fn(unsigned long data);
+#else
+static inline void laptop_sync_completion(void) { }
+#endif
 void throttle_vm_writeout(gfp_t gfp_mask);
 
 /* These are exported to sysctl. */