aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2016-06-15 12:39:17 -0400
committerMike Snitzer <snitzer@redhat.com>2016-07-18 15:37:17 -0400
commitff4a88bf1cedbe73ece1a6fad34650f21c06167c (patch)
treed432dbe46b5fd0b2a2e194d211315f3bf1f9b1eb /drivers/md/dm-raid.c
parent7193a9defcab6f3d3f1eb64c68bad7534e5a39ad (diff)
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)
366/* Return true, if raid set in @rs is recovering */ 366/* Return true, if raid set in @rs is recovering */
367static bool rs_is_recovering(struct raid_set *rs) 367static bool rs_is_recovering(struct raid_set *rs)
368{ 368{
369 smp_rmb();
370 return rs->md.recovery_cp != MaxSector; 369 return rs->md.recovery_cp != MaxSector;
371} 370}
372 371
373/* Return true, if raid set in @rs is reshaping */ 372/* Return true, if raid set in @rs is reshaping */
374static bool rs_is_reshaping(struct raid_set *rs) 373static bool rs_is_reshaping(struct raid_set *rs)
375{ 374{
376 smp_rmb();
377 return rs->md.reshape_position != MaxSector; 375 return rs->md.reshape_position != MaxSector;
378} 376}
379 377
@@ -1484,7 +1482,6 @@ static int rs_check_takeover(struct raid_set *rs)
1484 struct mddev *mddev = &rs->md; 1482 struct mddev *mddev = &rs->md;
1485 unsigned int near_copies; 1483 unsigned int near_copies;
1486 1484
1487 smp_rmb();
1488 if (rs->md.degraded) { 1485 if (rs->md.degraded) {
1489 rs->ti->error = "Can't takeover degraded raid set"; 1486 rs->ti->error = "Can't takeover degraded raid set";
1490 return -EPERM; 1487 return -EPERM;
@@ -1758,8 +1755,6 @@ static int rs_check_reshape(struct raid_set *rs)
1758{ 1755{
1759 struct mddev *mddev = &rs->md; 1756 struct mddev *mddev = &rs->md;
1760 1757
1761 smp_rmb(); /* Make sure we access recent reshape position */
1762
1763 if (!mddev->pers || !mddev->pers->check_reshape) 1758 if (!mddev->pers || !mddev->pers->check_reshape)
1764 rs->ti->error = "Reshape not supported"; 1759 rs->ti->error = "Reshape not supported";
1765 else if (mddev->degraded) 1760 else if (mddev->degraded)