diff options
author | Tomasz Majchrzak <tomasz.majchrzak@intel.com> | 2016-07-28 10:28:25 +0200 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-07-30 14:09:30 -0700 |
commit | 9b622e2bbcf049c82e2550d35fb54ac205965f50 (patch) | |
tree | 5aa27a7bce8a781c488d108d9d1ed098eddaf0ca /drivers/md | |
parent | d761f3ed6e71bcca724a6e9e39efcac65b7b4ac1 (diff) | |
download | linux-9b622e2bbcf049c82e2550d35fb54ac205965f50.tar.bz2 |
raid10: increment write counter after bio is split
md pending write counter must be incremented after bio is split,
otherwise it gets decremented too many times in end bio callback and
becomes negative.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid10.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index ed29fc899f06..1a632a8c8005 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1064,6 +1064,8 @@ static void __make_request(struct mddev *mddev, struct bio *bio) int max_sectors; int sectors; + md_write_start(mddev, bio); + /* * Register the new request and wait if the reconstruction * thread has put up a bar for new requests. @@ -1445,8 +1447,6 @@ static void raid10_make_request(struct mddev *mddev, struct bio *bio) return; } - md_write_start(mddev, bio); - do { /* |