aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2013-02-20 21:28:09 -0500
committerNeilBrown <neilb@suse.de>2013-02-25 19:55:27 -0500
commit4c0ca26bd260dddf3b9781758cb5e2df3f74d4a3 (patch)
treeb9d8fc9c62a075db9ef41a4df1c22b0e31f6955c
parentc8dc9c654794a765ca61baed07f84ed8aaa7ca8c (diff)
MD RAID10: Minor non-functional code changes
Changes include assigning 'addr' from 's' instead of 'sector' to be consistent with the way the code does it just a few lines later and using '%=' vs a conditional and subtraction. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--drivers/md/raid10.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 1a74c12f0a6e..de174ad6f8bd 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -552,14 +552,13 @@ static void __raid10_find_phys(struct geom *geo, struct r10bio *r10bio)
552 for (n = 0; n < geo->near_copies; n++) { 552 for (n = 0; n < geo->near_copies; n++) {
553 int d = dev; 553 int d = dev;
554 sector_t s = sector; 554 sector_t s = sector;
555 r10bio->devs[slot].addr = sector;
556 r10bio->devs[slot].devnum = d; 555 r10bio->devs[slot].devnum = d;
556 r10bio->devs[slot].addr = s;
557 slot++; 557 slot++;
558 558
559 for (f = 1; f < geo->far_copies; f++) { 559 for (f = 1; f < geo->far_copies; f++) {
560 d += geo->near_copies; 560 d += geo->near_copies;
561 if (d >= geo->raid_disks) 561 d %= geo->raid_disks;
562 d -= geo->raid_disks;
563 s += geo->stride; 562 s += geo->stride;
564 r10bio->devs[slot].devnum = d; 563 r10bio->devs[slot].devnum = d;
565 r10bio->devs[slot].addr = s; 564 r10bio->devs[slot].addr = s;