Skip to content

Commit

Permalink
MD RAID10: Minor non-functional code changes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Brassow authored and NeilBrown committed Feb 26, 2013
1 parent c8dc9c6 commit 4c0ca26
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,14 +552,13 @@ static void __raid10_find_phys(struct geom *geo, struct r10bio *r10bio)
for (n = 0; n < geo->near_copies; n++) {
int d = dev;
sector_t s = sector;
r10bio->devs[slot].addr = sector;
r10bio->devs[slot].devnum = d;
r10bio->devs[slot].addr = s;
slot++;

for (f = 1; f < geo->far_copies; f++) {
d += geo->near_copies;
if (d >= geo->raid_disks)
d -= geo->raid_disks;
d %= geo->raid_disks;
s += geo->stride;
r10bio->devs[slot].devnum = d;
r10bio->devs[slot].addr = s;
Expand Down

0 comments on commit 4c0ca26

Please sign in to comment.