diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2016-06-16 03:15:49 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-07-18 21:37:22 +0200 |
commit | 9d9d939c80eb96bb2072a5eaee51d9bf29a0910c (patch) | |
tree | 7ef1761b431c472363f311351394523647d00dfc /drivers/md/dm-raid.c | |
parent | dm raid: enhance comments in takeover checks (diff) | |
download | linux-9d9d939c80eb96bb2072a5eaee51d9bf29a0910c.tar.xz linux-9d9d939c80eb96bb2072a5eaee51d9bf29a0910c.zip |
dm raid: make rs_set_capacity to work on shrinking reshape
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r-- | drivers/md/dm-raid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index cc6eb7c27a7d..62e31b47400c 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -617,9 +617,7 @@ static void rs_set_capacity(struct raid_set *rs) { struct mddev *mddev = &rs->md; - /* Make sure we access most actual mddev properties */ - smp_rmb(); - if (rs->ti->len != mddev->array_sectors && !rs_is_reshaping(rs)) { + if (rs->ti->len != mddev->array_sectors) { struct gendisk *gendisk = dm_disk(dm_table_get_md(rs->ti->table)); set_capacity(gendisk, mddev->array_sectors); @@ -1471,7 +1469,9 @@ static void do_table_event(struct work_struct *ws) { struct raid_set *rs = container_of(ws, struct raid_set, md.event_work); - rs_set_capacity(rs); + smp_rmb(); /* Make sure we access most actual mddev properties */ + if (!rs_is_reshaping(rs)) + rs_set_capacity(rs); dm_table_event(rs->ti->table); } |