1
0
Fork 0

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>
steinar/wifi_calib_4_9_kernel
Tomasz Majchrzak 2016-07-28 10:28:25 +02:00 committed by Shaohua Li
parent d761f3ed6e
commit 9b622e2bbc
1 changed files with 2 additions and 2 deletions

View File

@ -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 {
/*