浏览代码

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>
Tomasz Majchrzak 9 年之前
父节点
当前提交
9b622e2bbc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/md/raid10.c

+ 2 - 2
drivers/md/raid10.c

@@ -1064,6 +1064,8 @@ static void __make_request(struct mddev *mddev, struct bio *bio)
 	int max_sectors;
 	int max_sectors;
 	int sectors;
 	int sectors;
 
 
+	md_write_start(mddev, bio);
+
 	/*
 	/*
 	 * Register the new request and wait if the reconstruction
 	 * Register the new request and wait if the reconstruction
 	 * thread has put up a bar for new requests.
 	 * 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;
 		return;
 	}
 	}
 
 
-	md_write_start(mddev, bio);
-
 	do {
 	do {
 
 
 		/*
 		/*