summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorTomasz Majchrzak2016-07-28 10:28:25 +0200
committerShaohua Li2016-07-30 23:09:30 +0200
commit9b622e2bbcf049c82e2550d35fb54ac205965f50 (patch)
tree5aa27a7bce8a781c488d108d9d1ed098eddaf0ca /drivers/md
parentMerge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/... (diff)
downloadkernel-qcow2-linux-9b622e2bbcf049c82e2550d35fb54ac205965f50.tar.gz
kernel-qcow2-linux-9b622e2bbcf049c82e2550d35fb54ac205965f50.tar.xz
kernel-qcow2-linux-9b622e2bbcf049c82e2550d35fb54ac205965f50.zip
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 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 {
/*