]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md: Fix read balancing in RAID1 and RAID10 on drives > 2TB
authorNeilBrown <neilb@suse.de>
Fri, 7 May 2010 22:20:17 +0000 (08:20 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:08:43 +0000 (11:08 -0700)
commitf2a41e6807357c237ec2bbd61e79cb1558e48b8a
treeb6c3c4e8981de3d0766a64204546124d43b6c98a
parentfaeb8ec4bf76f163317e9b885c5eb35ee960f705
md: Fix read balancing in RAID1 and RAID10 on drives > 2TB

commit af3a2cd6b8a479345786e7fe5e199ad2f6240e56 upstream.

read_balance uses a "unsigned long" for a sector number which
will get truncated beyond 2TB.
This will cause read-balancing to be non-optimal, and can cause
data to be read from the 'wrong' branch during a resync.  This has a
very small chance of returning wrong data.

Reported-by: Jordan Russell <jr-list-2010@quo.to>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/raid1.c
drivers/md/raid10.c