summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>2016-07-28 08:28:25 (GMT)
committerShaohua Li <shli@fb.com>2016-07-30 21:09:30 (GMT)
commit9b622e2bbcf049c82e2550d35fb54ac205965f50 (patch)
tree5aa27a7bce8a781c488d108d9d1ed098eddaf0ca /drivers/md
parentd761f3ed6e71bcca724a6e9e39efcac65b7b4ac1 (diff)
downloadlinux-9b622e2bbcf049c82e2550d35fb54ac205965f50.tar.xz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index ed29fc8..1a632a8 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 {
/*