summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-05-27 15:18:07 +1000
committerNeilBrown <neilb@suse.de>2013-05-28 16:58:18 +1000
commit26bf55874d9fa6ca856455a6f112225825fde3c9 (patch)
treeb7c63a5ce4997a77d05f63dad90356e37f2148f6 /super1.c
parentf9b08fecd8fc05fb05471925bbec89fbd1a56e01 (diff)
super1: set RESHAPE_NO_BACKUP based on new_offset.
We need to check for a backup iff the data_offset has changed. Testing against level==10 was an effective but short-sighted approach. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/super1.c b/super1.c
index d92e5945..a9ca2169 100644
--- a/super1.c
+++ b/super1.c
@@ -1006,7 +1006,8 @@ static void getinfo_super1(struct supertype *st, struct mdinfo *info, char *map)
if (sb->feature_map & __le32_to_cpu(MD_FEATURE_RESHAPE_ACTIVE)) {
info->reshape_active = 1;
- if (info->array.level == 10)
+ if ((sb->feature_map & __le32_to_cpu(MD_FEATURE_NEW_OFFSET)) &&
+ sb->new_offset != 0)
info->reshape_active |= RESHAPE_NO_BACKUP;
info->reshape_progress = __le64_to_cpu(sb->reshape_position);
info->new_level = __le32_to_cpu(sb->new_level);