diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
commit | 2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch) | |
tree | f8b3ee40674ce4acd5508a0a0bf52a30904caf6c /include/linux/backing-dev.h | |
parent | 7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff) | |
parent | de75d60d5ea235e6e09f4962ab22541ce0fe176a (diff) |
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
xen-blkfront: fix missing out label
blkdev: fix blkdev_issue_zeroout return value
block: update request stacking methods to support discards
block: fix missing export of blk_types.h
writeback: fix bad _bh spinlock nesting
drbd: revert "delay probes", feature is being re-implemented differently
drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
drbd: Disable delay probes for the upcomming release
writeback: cleanup bdi_register
writeback: add new tracepoints
writeback: remove unnecessary init_timer call
writeback: optimize periodic bdi thread wakeups
writeback: prevent unnecessary bdi threads wakeups
writeback: move bdi threads exiting logic to the forker thread
writeback: restructure bdi forker loop a little
writeback: move last_active to bdi
writeback: do not remove bdi from bdi_list
writeback: simplify bdi code a little
writeback: do not lose wake-ups in bdi threads
...
Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'include/linux/backing-dev.h')
-rw-r--r-- | include/linux/backing-dev.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index e9aec0d099df..7628219e5386 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -45,22 +45,21 @@ enum bdi_stat_item { | |||
45 | #define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids))) | 45 | #define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids))) |
46 | 46 | ||
47 | struct bdi_writeback { | 47 | struct bdi_writeback { |
48 | struct list_head list; /* hangs off the bdi */ | 48 | struct backing_dev_info *bdi; /* our parent bdi */ |
49 | |||
50 | struct backing_dev_info *bdi; /* our parent bdi */ | ||
51 | unsigned int nr; | 49 | unsigned int nr; |
52 | 50 | ||
53 | unsigned long last_old_flush; /* last old data flush */ | 51 | unsigned long last_old_flush; /* last old data flush */ |
52 | unsigned long last_active; /* last time bdi thread was active */ | ||
54 | 53 | ||
55 | struct task_struct *task; /* writeback task */ | 54 | struct task_struct *task; /* writeback thread */ |
56 | struct list_head b_dirty; /* dirty inodes */ | 55 | struct timer_list wakeup_timer; /* used for delayed bdi thread wakeup */ |
57 | struct list_head b_io; /* parked for writeback */ | 56 | struct list_head b_dirty; /* dirty inodes */ |
58 | struct list_head b_more_io; /* parked for more writeback */ | 57 | struct list_head b_io; /* parked for writeback */ |
58 | struct list_head b_more_io; /* parked for more writeback */ | ||
59 | }; | 59 | }; |
60 | 60 | ||
61 | struct backing_dev_info { | 61 | struct backing_dev_info { |
62 | struct list_head bdi_list; | 62 | struct list_head bdi_list; |
63 | struct rcu_head rcu_head; | ||
64 | unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */ | 63 | unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */ |
65 | unsigned long state; /* Always use atomic bitops on this */ | 64 | unsigned long state; /* Always use atomic bitops on this */ |
66 | unsigned int capabilities; /* Device capabilities */ | 65 | unsigned int capabilities; /* Device capabilities */ |
@@ -80,8 +79,7 @@ struct backing_dev_info { | |||
80 | unsigned int max_ratio, max_prop_frac; | 79 | unsigned int max_ratio, max_prop_frac; |
81 | 80 | ||
82 | struct bdi_writeback wb; /* default writeback info for this bdi */ | 81 | struct bdi_writeback wb; /* default writeback info for this bdi */ |
83 | spinlock_t wb_lock; /* protects update side of wb_list */ | 82 | spinlock_t wb_lock; /* protects work_list */ |
84 | struct list_head wb_list; /* the flusher threads hanging off this bdi */ | ||
85 | 83 | ||
86 | struct list_head work_list; | 84 | struct list_head work_list; |
87 | 85 | ||
@@ -105,9 +103,10 @@ void bdi_unregister(struct backing_dev_info *bdi); | |||
105 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | 103 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); |
106 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages); | 104 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages); |
107 | void bdi_start_background_writeback(struct backing_dev_info *bdi); | 105 | void bdi_start_background_writeback(struct backing_dev_info *bdi); |
108 | int bdi_writeback_task(struct bdi_writeback *wb); | 106 | int bdi_writeback_thread(void *data); |
109 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 107 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
110 | void bdi_arm_supers_timer(void); | 108 | void bdi_arm_supers_timer(void); |
109 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | ||
111 | 110 | ||
112 | extern spinlock_t bdi_lock; | 111 | extern spinlock_t bdi_lock; |
113 | extern struct list_head bdi_list; | 112 | extern struct list_head bdi_list; |