aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/raid
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-06-26 03:27:57 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:39 -0400
commit42543769142d2375f2b5f8fc9cac999f84bd4c4c (patch)
tree404606c37da872639111c5b641f07fff2ded1dff /include/linux/raid
parent07d84d109d8beedd68df9da2e4e9f25c8217e7fb (diff)
[PATCH] md: Don't write dirty/clean update to spares - leave them alone
- record the 'event' count on each individual device (they might sometimes be slightly different now) - add a new value for 'sb_dirty': '3' means that the super block only needs to be updated to record a clean<->dirty transition. - Prefer odd event numbers for dirty states and even numbers for clean states - Using all the above, don't update the superblock on a spare device if the update is just doing a clean-dirty transition. To accomodate this, a transition from dirty back to clean might now decrement the events counter if nothing else has changed. The net effect of this is that spare drives will not see any IO requests during normal running of the array, so they can go to sleep if that is what they want to do. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid')
-rw-r--r--include/linux/raid/md_k.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 682574f3bd36..c1e0ac55bab5 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -58,6 +58,7 @@ struct mdk_rdev_s
58 58
59 struct page *sb_page; 59 struct page *sb_page;
60 int sb_loaded; 60 int sb_loaded;
61 __u64 sb_events;
61 sector_t data_offset; /* start of data in array */ 62 sector_t data_offset; /* start of data in array */
62 sector_t sb_offset; 63 sector_t sb_offset;
63 int sb_size; /* bytes in the superblock */ 64 int sb_size; /* bytes in the superblock */