summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-07-31 17:11:41 -0700
committerDan Williams <dan.j.williams@intel.com>2009-07-31 17:11:41 -0700
commit148acb7baaa810b68d55df4c1784d6bd0dfd1b78 (patch)
treec3b39f9c4961296d88de6761a55d33eb423743e2 /mdadm.h
parent329c82786932b2fbc56cd57ac0bfc185d83a04c9 (diff)
downloadmdadm-148acb7baaa810b68d55df4c1784d6bd0dfd1b78.tar.gz
mdadm-148acb7baaa810b68d55df4c1784d6bd0dfd1b78.tar.xz
mdadm-148acb7baaa810b68d55df4c1784d6bd0dfd1b78.zip
imsm: fix family number handling
The family_number field can change. The option-rom will change the family number when it starts a rebuild process (flags a container for rebuild). This was not seen previously as mdadm would usually start the rebuild process, preserving the family number. This is the mechanism that helps to prevent a prodigal array member from being returned to its original system and cause a rebuild to go in the wrong direction. With the change we will end up with a container that will fail to assemble unless the device with the incompatible family number is left out of the assembly. So, take several actions: 1/ Convert uuid generation to use orig_family_num, being careful to preserve the existing uuid in the case where orig_family_num is not set (i.e. previous mdadm created imsm arrays) 2/ Set orig_family_num at Create. For arrays created by mdadm prior to this release orig_family_num will be zero, so set it to family_num at the first metadata write. 3/ Add checks for orig_family_num to compare_super_imsm 4/ Update the family number when initiating rebuild 5/ The option-rom mixes some random data into the family number, add this functionality to the mdadm implementation. Reported-by: Marcin Labun <marcin.labun@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index e564dee..4111eaf 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -848,6 +848,7 @@ extern int open_container(int fd);
extern int mdmon_running(int devnum);
extern int signal_mdmon(int devnum);
extern int check_env(char *name);
+extern __u32 random32(void);
extern int start_mdmon(int devnum);
extern char *devnum2devname(int num);