summaryrefslogtreecommitdiff
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2016-06-15 19:39:17 +0300
committerMike Snitzer <snitzer@redhat.com>2016-07-18 22:37:17 +0300
commitff4a88bf1cedbe73ece1a6fad34650f21c06167c (patch)
treed432dbe46b5fd0b2a2e194d211315f3bf1f9b1eb /drivers/md/dm-raid.c
parent7193a9defcab6f3d3f1eb64c68bad7534e5a39ad (diff)
downloadlinux-ff4a88bf1cedbe73ece1a6fad34650f21c06167c.tar.xz
dm raid: avoid superfluous memory barriers on static metadata
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.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 248053d84528..4bf7747a25a9 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -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;
}
@@ -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;
@@ -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)