diff options
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r-- | drivers/md/dm-raid.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index c2907d836e4e..86cb7e5d83d5 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c | |||
@@ -56,7 +56,8 @@ struct raid_dev { | |||
56 | struct raid_set { | 56 | struct raid_set { |
57 | struct dm_target *ti; | 57 | struct dm_target *ti; |
58 | 58 | ||
59 | uint64_t print_flags; | 59 | uint32_t bitmap_loaded; |
60 | uint32_t print_flags; | ||
60 | 61 | ||
61 | struct mddev md; | 62 | struct mddev md; |
62 | struct raid_type *raid_type; | 63 | struct raid_type *raid_type; |
@@ -1085,7 +1086,7 @@ static int raid_status(struct dm_target *ti, status_type_t type, | |||
1085 | raid_param_cnt += 2; | 1086 | raid_param_cnt += 2; |
1086 | } | 1087 | } |
1087 | 1088 | ||
1088 | raid_param_cnt += (hweight64(rs->print_flags & ~DMPF_REBUILD) * 2); | 1089 | raid_param_cnt += (hweight32(rs->print_flags & ~DMPF_REBUILD) * 2); |
1089 | if (rs->print_flags & (DMPF_SYNC | DMPF_NOSYNC)) | 1090 | if (rs->print_flags & (DMPF_SYNC | DMPF_NOSYNC)) |
1090 | raid_param_cnt--; | 1091 | raid_param_cnt--; |
1091 | 1092 | ||
@@ -1197,7 +1198,12 @@ static void raid_resume(struct dm_target *ti) | |||
1197 | { | 1198 | { |
1198 | struct raid_set *rs = ti->private; | 1199 | struct raid_set *rs = ti->private; |
1199 | 1200 | ||
1200 | bitmap_load(&rs->md); | 1201 | if (!rs->bitmap_loaded) { |
1202 | bitmap_load(&rs->md); | ||
1203 | rs->bitmap_loaded = 1; | ||
1204 | } else | ||
1205 | md_wakeup_thread(rs->md.thread); | ||
1206 | |||
1201 | mddev_resume(&rs->md); | 1207 | mddev_resume(&rs->md); |
1202 | } | 1208 | } |
1203 | 1209 | ||