diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-06-21 20:17:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:43 -0400 |
commit | 32a7627cf3a35396a8e834faf34e38ae9f3b1309 (patch) | |
tree | 3fe7764f5d8e39d835a397e1099358d924b02981 /include/linux/raid/md_k.h | |
parent | 57afd89f98a990747445f01c458ecae64263b2f8 (diff) |
[PATCH] md: optimised resync using Bitmap based intent logging
With this patch, the intent to write to some block in the array can be logged
to a bitmap file. Each bit represents some number of sectors and is set
before any update happens, and only cleared when all writes relating to all
sectors are complete.
After an unclean shutdown, information in this bitmap can be used to optimise
resync - only sectors which could be out-of-sync need to be updated.
Also if a drive is removed and then added back into an array, the recovery can
make use of the bitmap to optimise reconstruction. This is not implemented in
this patch.
Currently the bitmap is stored in a file which must (obviously) be stored on a
separate device.
The patch only provided infrastructure. It does not update any personalities
to bitmap intent logging.
Md arrays can still be used with no bitmap file. This patch has minimal
impact on such arrays.
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/md_k.h')
-rw-r--r-- | include/linux/raid/md_k.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index bce0032decff..16e94a9f0f8c 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -267,6 +267,9 @@ struct mddev_s | |||
267 | atomic_t writes_pending; | 267 | atomic_t writes_pending; |
268 | request_queue_t *queue; /* for plugging ... */ | 268 | request_queue_t *queue; /* for plugging ... */ |
269 | 269 | ||
270 | struct bitmap *bitmap; /* the bitmap for the device */ | ||
271 | struct file *bitmap_file; /* the bitmap file */ | ||
272 | |||
270 | struct list_head all_mddevs; | 273 | struct list_head all_mddevs; |
271 | }; | 274 | }; |
272 | 275 | ||
@@ -341,6 +344,7 @@ typedef struct mdk_thread_s { | |||
341 | unsigned long flags; | 344 | unsigned long flags; |
342 | struct completion *event; | 345 | struct completion *event; |
343 | struct task_struct *tsk; | 346 | struct task_struct *tsk; |
347 | unsigned long timeout; | ||
344 | const char *name; | 348 | const char *name; |
345 | } mdk_thread_t; | 349 | } mdk_thread_t; |
346 | 350 | ||