diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-06-21 20:17:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:45 -0400 |
commit | 77ad4bc706fe6c52ab953f31c287a6af712d080c (patch) | |
tree | 6823261d0e111a93c5190ebb1f2ecd8c4905a559 /include/linux/raid/bitmap.h | |
parent | bfb39fba4e8cdda091f9ebee29fbb8331c4bb605 (diff) |
[PATCH] md: enable the bitmap write-back daemon and wait for it.
Currently we don't wait for updates to the bitmap to be flushed to disk
properly. The infrastructure all there, but it isn't being used....
A separate kernel thread (bitmap_writeback_daemon) is needed to wait for each
page as we cannot get callbacks when a page write completes.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid/bitmap.h')
-rw-r--r-- | include/linux/raid/bitmap.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index f785cf26cbad..cfe60cfc8f3d 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -233,21 +233,12 @@ struct bitmap { | |||
233 | unsigned long daemon_sleep; /* how many seconds between updates? */ | 233 | unsigned long daemon_sleep; /* how many seconds between updates? */ |
234 | 234 | ||
235 | /* | 235 | /* |
236 | * bitmap write daemon - this daemon performs writes to the bitmap file | 236 | * bitmap_writeback_daemon waits for file-pages that have been written, |
237 | * this thread is only needed because of a limitation in ext3 (jbd) | 237 | * as there is no way to get a call-back when a page write completes. |
238 | * that does not allow a task to have two journal transactions ongoing | ||
239 | * simultaneously (even if the transactions are for two different | ||
240 | * filesystems) -- in the case of bitmap, that would be the filesystem | ||
241 | * that the bitmap file resides on and the filesystem that is mounted | ||
242 | * on the md device -- see current->journal_info in jbd/transaction.c | ||
243 | */ | 238 | */ |
244 | mdk_thread_t *writeback_daemon; | 239 | mdk_thread_t *writeback_daemon; |
245 | spinlock_t write_lock; | 240 | spinlock_t write_lock; |
246 | struct semaphore write_ready; | ||
247 | struct semaphore write_done; | ||
248 | unsigned long writes_pending; | ||
249 | wait_queue_head_t write_wait; | 241 | wait_queue_head_t write_wait; |
250 | struct list_head write_pages; | ||
251 | struct list_head complete_pages; | 242 | struct list_head complete_pages; |
252 | mempool_t *write_pool; | 243 | mempool_t *write_pool; |
253 | }; | 244 | }; |