]> asedeno.scripts.mit.edu Git - linux.git/commit
md/raid1, raid10: move rXbio accounting closer to allocation.
authorNeilBrown <neilb@suse.com>
Wed, 15 Mar 2017 03:05:13 +0000 (14:05 +1100)
committerShaohua Li <shli@fb.com>
Thu, 23 Mar 2017 02:17:24 +0000 (19:17 -0700)
commit6b6c8110e173ce10f2b169d82a6670001f7184d1
treed7d2603e322b4671f50a4fe3a4e904013deea686
parent97d53438081edd25ccb1de34051efe084d240828
md/raid1, raid10: move rXbio accounting closer to allocation.

When raid1 or raid10 find they will need to allocate a new
r1bio/r10bio, in order to work around a known bad block, they
account for the allocation well before the allocation is
made.  This separation makes the correctness less obvious
and requires comments.

The accounting needs to be a little before: before the first
rXbio is submitted, but that is all.

So move the accounting down to where it makes more sense.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid1.c
drivers/md/raid10.c