summaryrefslogtreecommitdiffstats
path: root/include/linux/backing-dev.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-09-02 09:19:46 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-09-11 09:20:25 +0200
commit66f3b8e2e103a0b93b945764d98e9ba46cb926dd (patch)
tree442bf5664214f0a1448e4010b09868cc58fdd3d1 /include/linux/backing-dev.h
parentd8a8559cd7a9ccac98d5f6f13297a2ff68a43627 (diff)
downloadop-kernel-dev-66f3b8e2e103a0b93b945764d98e9ba46cb926dd.zip
op-kernel-dev-66f3b8e2e103a0b93b945764d98e9ba46cb926dd.tar.gz
writeback: move dirty inodes from super_block to backing_dev_info
This is a first step at introducing per-bdi flusher threads. We should have no change in behaviour, although sb_has_dirty_inodes() is now ridiculously expensive, as there's no easy way to answer that question. Not a huge problem, since it'll be deleted in subsequent patches. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/backing-dev.h')
-rw-r--r--include/linux/backing-dev.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 1d52425..928cd54 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -40,6 +40,8 @@ enum bdi_stat_item {
#define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids)))
struct backing_dev_info {
+ struct list_head bdi_list;
+
unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */
unsigned long state; /* Always use atomic bitops on this */
unsigned int capabilities; /* Device capabilities */
@@ -58,6 +60,10 @@ struct backing_dev_info {
struct device *dev;
+ struct list_head b_dirty; /* dirty inodes */
+ struct list_head b_io; /* parked for writeback */
+ struct list_head b_more_io; /* parked for more writeback */
+
#ifdef CONFIG_DEBUG_FS
struct dentry *debug_dir;
struct dentry *debug_stats;
@@ -72,6 +78,9 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev);
void bdi_unregister(struct backing_dev_info *bdi);
+extern struct mutex bdi_lock;
+extern struct list_head bdi_list;
+
static inline void __add_bdi_stat(struct backing_dev_info *bdi,
enum bdi_stat_item item, s64 amount)
{
OpenPOWER on IntegriCloud