diff options
author | NeilBrown <neilb@suse.de> | 2012-10-04 08:34:20 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-04 08:34:20 +0200 |
commit | 83cd1e97cbc0c4749561b72864dbaaed3a014123 (patch) | |
tree | 88259eb678a8a63aa00f062ab8c5a05d75318139 /super0.c | |
parent | Add data_offset arg to ->validate_geometry. (diff) | |
download | mdadm-83cd1e97cbc0c4749561b72864dbaaed3a014123.tar.xz mdadm-83cd1e97cbc0c4749561b72864dbaaed3a014123.zip |
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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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__); |