Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ab82d80 authored by Tomasz Majchrzak's avatar Tomasz Majchrzak Committed by Greg Kroah-Hartman
Browse files

raid10: increment write counter after bio is split



commit 9b622e2bbcf049c82e2550d35fb54ac205965f50 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>
parent b39ba71c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1171,6 +1171,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.
@@ -1556,8 +1558,6 @@ static void make_request(struct mddev *mddev, struct bio *bio)
		return;
	}

	md_write_start(mddev, bio);

	do {

		/*