diff options
author | NeilBrown <neilb@suse.de> | 2012-10-04 16:34:20 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-04 16:34:20 +1000 |
commit | 387fcd593c7a257618fa11ed4cf57d655ace4ada (patch) | |
tree | b5e6a792a4d2af72f1cebad4a92c3e6a58bd5ade /super0.c | |
parent | 822e393a050510b0002bdfb1b0554fa8d7860a99 (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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |