* [PATCH 1 of 4] MD RAID10: Minor non-functional code changes
@ 2012-12-17 18:33 Jonathan Brassow
0 siblings, 0 replies; only message in thread
From: Jonathan Brassow @ 2012-12-17 18:33 UTC (permalink / raw)
To: linux-raid; +Cc: neilb, agk, jbrassow
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>
Index: linux-upstream/drivers/md/raid10.c
===================================================================
--- linux-upstream.orig/drivers/md/raid10.c
+++ linux-upstream/drivers/md/raid10.c
@@ -552,14 +552,13 @@ static void __raid10_find_phys(struct ge
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-17 18:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 18:33 [PATCH 1 of 4] MD RAID10: Minor non-functional code changes Jonathan Brassow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox