summaryrefslogtreecommitdiff
path: root/super0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-04 16:34:20 +1000
committerNeilBrown <neilb@suse.de>2012-10-04 16:34:20 +1000
commit387fcd593c7a257618fa11ed4cf57d655ace4ada (patch)
treeb5e6a792a4d2af72f1cebad4a92c3e6a58bd5ade /super0.c
parent822e393a050510b0002bdfb1b0554fa8d7860a99 (diff)
Add data_offset arg to ->avail_size
This is currently only useful for 1.x metadata and will allow an explicit --data-offset request on command line. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/super0.c b/super0.c
index 8ca82e1b..a26e2e00 100644
--- a/super0.c
+++ b/super0.c
@@ -975,8 +975,11 @@ static struct supertype *match_metadata_desc0(char *arg)
return NULL;
}
-static __u64 avail_size0(struct supertype *st, __u64 devsize)
+static __u64 avail_size0(struct supertype *st, __u64 devsize,
+ unsigned long long data_offset)
{
+ if (data_offset != 0 && data_offset != INVALID_SECTORS)
+ return 0ULL;
if (devsize < MD_RESERVED_SECTORS)
return 0ULL;
return MD_NEW_SIZE_SECTORS(devsize);