bdi: invert BDI_CAP_NO_ACCT_WB
[linux-2.6-microblaze.git] / include / linux / backing-dev-defs.h
index 7367150..fff9367 100644 (file)
@@ -33,8 +33,6 @@ enum wb_congested_state {
        WB_sync_congested,      /* The sync queue is getting full */
 };
 
-typedef int (congested_fn)(void *, int);
-
 enum wb_stat_item {
        WB_RECLAIMABLE,
        WB_WRITEBACK,
@@ -87,26 +85,6 @@ struct wb_completion {
 #define DEFINE_WB_COMPLETION(cmpl, bdi)        \
        struct wb_completion cmpl = WB_COMPLETION_INIT(bdi)
 
-/*
- * For cgroup writeback, multiple wb's may map to the same blkcg.  Those
- * wb's can operate mostly independently but should share the congested
- * state.  To facilitate such sharing, the congested state is tracked using
- * the following struct which is created on demand, indexed by blkcg ID on
- * its bdi, and refcounted.
- */
-struct bdi_writeback_congested {
-       unsigned long state;            /* WB_[a]sync_congested flags */
-       refcount_t refcnt;              /* nr of attached wb's and blkg */
-
-#ifdef CONFIG_CGROUP_WRITEBACK
-       struct backing_dev_info *__bdi; /* the associated bdi, set to NULL
-                                        * on bdi unregistration. For memcg-wb
-                                        * internal use only! */
-       int blkcg_id;                   /* ID of the associated blkcg */
-       struct rb_node rb_node;         /* on bdi->cgwb_congestion_tree */
-#endif
-};
-
 /*
  * Each wb (bdi_writeback) can perform writeback operations, is measured
  * and throttled, independently.  Without cgroup writeback, each bdi
@@ -140,7 +118,7 @@ struct bdi_writeback {
 
        struct percpu_counter stat[NR_WB_STAT_ITEMS];
 
-       struct bdi_writeback_congested *congested;
+       unsigned long congested;        /* WB_[a]sync_congested flags */
 
        unsigned long bw_time_stamp;    /* last time write bw is updated */
        unsigned long dirtied_stamp;
@@ -190,10 +168,6 @@ struct backing_dev_info {
        struct list_head bdi_list;
        unsigned long ra_pages; /* max readahead in PAGE_SIZE units */
        unsigned long io_pages; /* max allowed IO size */
-       congested_fn *congested_fn; /* Function pointer if device is md/dm */
-       void *congested_data;   /* Pointer to aux data for congested func */
-
-       const char *name;
 
        struct kref refcnt;     /* Reference counter for the structure */
        unsigned int capabilities; /* Device capabilities */
@@ -210,11 +184,8 @@ struct backing_dev_info {
        struct list_head wb_list; /* list of all wbs */
 #ifdef CONFIG_CGROUP_WRITEBACK
        struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */
-       struct rb_root cgwb_congested_tree; /* their congested states */
        struct mutex cgwb_release_mutex;  /* protect shutdown of wb structs */
        struct rw_semaphore wb_switch_rwsem; /* no cgwb switch while syncing */
-#else
-       struct bdi_writeback_congested *wb_congested;
 #endif
        wait_queue_head_t wb_waitq;
 
@@ -234,18 +205,8 @@ enum {
        BLK_RW_SYNC     = 1,
 };
 
-void clear_wb_congested(struct bdi_writeback_congested *congested, int sync);
-void set_wb_congested(struct bdi_writeback_congested *congested, int sync);
-
-static inline void clear_bdi_congested(struct backing_dev_info *bdi, int sync)
-{
-       clear_wb_congested(bdi->wb.congested, sync);
-}
-
-static inline void set_bdi_congested(struct backing_dev_info *bdi, int sync)
-{
-       set_wb_congested(bdi->wb.congested, sync);
-}
+void clear_bdi_congested(struct backing_dev_info *bdi, int sync);
+void set_bdi_congested(struct backing_dev_info *bdi, int sync);
 
 struct wb_lock_cookie {
        bool locked;