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
commit83cd1e97cbc0c4749561b72864dbaaed3a014123 (patch)
tree88259eb678a8a63aa00f062ab8c5a05d75318139 /super0.c
parentaf4348ddd101b8cb0ffc303f43544f49419a1658 (diff)
Add data_offset arg to ->init_super and use it in super1.c
So if ->data_offset is already set, use that rather than computing one. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/super0.c b/super0.c
index 983ef853..4e6375f1 100644
--- a/super0.c
+++ b/super0.c
@@ -601,11 +601,16 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
static int init_super0(struct supertype *st, mdu_array_info_t *info,
unsigned long long size, char *ignored_name, char *homehost,
- int *uuid)
+ int *uuid, unsigned long long data_offset)
{
mdp_super_t *sb;
int spares;
+ if (data_offset != INVALID_SECTORS) {
+ fprintf(stderr, Name ": data-offset not support for 0.90\n");
+ return 0;
+ }
+
if (posix_memalign((void**)&sb, 4096,
MD_SB_BYTES + ROUND_UP(sizeof(bitmap_super_t), 4096)) != 0) {
pr_err("%s could not allocate superblock\n", __func__);