summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-07-14 13:59:56 -0700
committerDan Williams <dan.j.williams@intel.com>2008-07-14 13:59:56 -0700
commit2da8544a396adc9f6b1cd1935fc3520b6ed41170 (patch)
tree99680d17baa52777f7b2d235cc1e2e4d1780f65f /super-intel.c
parentef6ffaded436cc15c9e12cdb36fad1c3e9767ec1 (diff)
downloadmdadm-2da8544a396adc9f6b1cd1935fc3520b6ed41170.tar.gz
mdadm-2da8544a396adc9f6b1cd1935fc3520b6ed41170.tar.xz
mdadm-2da8544a396adc9f6b1cd1935fc3520b6ed41170.zip
imsm: metadata only supports a global 'data_offset'
When creating a volume a drive must have free space starting at the same location as all the other drives in the array.
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index 42d93f6..41f44d0 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1388,9 +1388,11 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
if (!dev) {
/* General test: make sure there is space for
- * 'raiddisks' device extents of size 'size'.
+ * 'raiddisks' device extents of size 'size' at a given
+ * offset
*/
unsigned long long minsize = size*2 /* convert to blocks */;
+ unsigned long long start_offset = ~0ULL;
int dcnt = 0;
if (minsize == 0)
minsize = MPB_SECTOR_CNT + IMSM_RESERVED_SECTORS;
@@ -1406,6 +1408,13 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
esize = e[i].start - pos;
if (esize >= minsize)
found = 1;
+ if (found && start_offset == ~0ULL) {
+ start_offset = pos;
+ break;
+ } else if (found && pos != start_offset) {
+ found = 0;
+ break;
+ }
pos = e[i].start + e[i].size;
i++;
} while (e[i-1].size);