writeback: implement unlocked_inode_to_wb transaction and use it for stat updates
[cascardo/linux.git] / include / linux / fs.h
index 740126d..b5e1dcf 100644 (file)
@@ -1815,6 +1815,11 @@ struct super_operations {
  *
  * I_DIO_WAKEUP                Never set.  Only used as a key for wait_on_bit().
  *
+ * I_WB_SWITCH         Cgroup bdi_writeback switching in progress.  Used to
+ *                     synchronize competing switching instances and to tell
+ *                     wb stat updates to grab mapping->tree_lock.  See
+ *                     inode_switch_wb_work_fn() for details.
+ *
  * Q: What is the difference between I_WILL_FREE and I_FREEING?
  */
 #define I_DIRTY_SYNC           (1 << 0)
@@ -1834,6 +1839,7 @@ struct super_operations {
 #define I_DIRTY_TIME           (1 << 11)
 #define __I_DIRTY_TIME_EXPIRED 12
 #define I_DIRTY_TIME_EXPIRED   (1 << __I_DIRTY_TIME_EXPIRED)
+#define I_WB_SWITCH            (1 << 13)
 
 #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES)
 #define I_DIRTY_ALL (I_DIRTY | I_DIRTY_TIME)