Skip to content

Commit

Permalink
dm raid: avoid superfluous memory barriers on static metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz Mauelshagen <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
mauelsha authored and snitm committed Jul 18, 2016
1 parent 7193a9d commit ff4a88b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,12 @@ static bool rs_is_reshapable(struct raid_set *rs)
/* Return true, if raid set in @rs is recovering */
static bool rs_is_recovering(struct raid_set *rs)
{
smp_rmb();
return rs->md.recovery_cp != MaxSector;
}

/* Return true, if raid set in @rs is reshaping */
static bool rs_is_reshaping(struct raid_set *rs)
{
smp_rmb();
return rs->md.reshape_position != MaxSector;
}

Expand Down Expand Up @@ -1484,7 +1482,6 @@ static int rs_check_takeover(struct raid_set *rs)
struct mddev *mddev = &rs->md;
unsigned int near_copies;

smp_rmb();
if (rs->md.degraded) {
rs->ti->error = "Can't takeover degraded raid set";
return -EPERM;
Expand Down Expand Up @@ -1758,8 +1755,6 @@ static int rs_check_reshape(struct raid_set *rs)
{
struct mddev *mddev = &rs->md;

smp_rmb(); /* Make sure we access recent reshape position */

if (!mddev->pers || !mddev->pers->check_reshape)
rs->ti->error = "Reshape not supported";
else if (mddev->degraded)
Expand Down

0 comments on commit ff4a88b

Please sign in to comment.