ceph: writeback congestion control

Set bdi congestion bit when amount of write data in flight exceeds adjustable
threshold.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 2304bd2..62d9ae4 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -59,6 +59,7 @@
 	int wsize;
 	int rsize;            /* max readahead */
 	int max_readdir;      /* max readdir size */
+	int congestion_kb;      /* max readdir size */
 	int osd_timeout;
 	char *snapdir_name;   /* default ".snap" */
 	char *name;
@@ -136,6 +137,7 @@
 	struct workqueue_struct *wb_wq;
 	struct workqueue_struct *pg_inv_wq;
 	struct workqueue_struct *trunc_wq;
+	atomic_long_t writeback_count;
 
 	struct backing_dev_info backing_dev_info;
 
@@ -143,6 +145,7 @@
 	struct dentry *debugfs_monmap;
 	struct dentry *debugfs_mdsmap, *debugfs_osdmap;
 	struct dentry *debugfs_dir, *debugfs_dentry_lru, *debugfs_caps;
+	struct dentry *debugfs_congestion_kb;
 	struct dentry *debugfs_bdi;
 #endif
 };