Commit b93a5b93 authored by Tomasz Majchrzak's avatar Tomasz Majchrzak Committed by Thadeu Lima de Souza Cascardo

raid10: increment write counter after bio is split

BugLink: http://bugs.launchpad.net/bugs/1677600

commit 9b622e2b upstream.

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: default avatarTomasz Majchrzak <tomasz.majchrzak@intel.com>
Reviewed-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent f72fbb1b
......@@ -1072,6 +1072,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.
......@@ -1455,8 +1457,6 @@ static void make_request(struct mddev *mddev, struct bio *bio)
return;
}
md_write_start(mddev, bio);
do {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment