aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-02-06 04:39:51 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:18 -0500
commite691063a61f7f72a7d2882eb744b07a520cde23b (patch)
tree4f5ceb7ed310a7d1bb076271926260723ac5ee6d /include
parentb47490c9bc73d0b34e4c194db40de183e592e446 (diff)
md: support 'external' metadata for md arrays
- Add a state flag 'external' to indicate that the metadata is managed externally (by user-space) so important changes need to be left of user-space to handle. Alternates are non-persistant ('none') where there is no stable metadata - after the array is stopped there is no record of it's status - and internal which can be version 0.90 or version 1.x These are selected by writing to the 'metadata' attribute. - move the updating of superblocks (sync_sbs) to after we have checked if there are any superblocks or not. - New array state 'write_pending'. This means that the metadata records the array as 'clean', but a write has been requested, so the metadata has to be updated to record a 'dirty' array before the write can continue. This change is reported to md by writing 'active' to the array_state attribute. - tidy up marking of sb_dirty: - don't set sb_dirty when resync finishes as md_check_recovery calls md_update_sb when the sync thread finishes anyway. - Don't set sb_dirty in multipath_run as the array might not be dirty. - don't mark superblock dirty when switching to 'clean' if there is no internal superblock (if external, userspace can choose to update the superblock whenever it chooses to). Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/raid/md_k.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index dcb729244f4..b579cc62830 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -130,6 +130,9 @@ struct mddev_s
130 minor_version, 130 minor_version,
131 patch_version; 131 patch_version;
132 int persistent; 132 int persistent;
133 int external; /* metadata is
134 * managed externally */
135 char metadata_type[17]; /* externally set*/
133 int chunk_size; 136 int chunk_size;
134 time_t ctime, utime; 137 time_t ctime, utime;
135 int level, layout; 138 int level, layout;