Browse Source

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

Pull Ceph RBD fix from Sage Weil.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: end I/O the entire obj_request on error
Linus Torvalds 10 years ago
parent
commit
6fa72720a6
1 changed files with 5 additions and 0 deletions
  1. 5 0
      drivers/block/rbd.c

+ 5 - 0
drivers/block/rbd.c

@@ -2264,6 +2264,11 @@ static bool rbd_img_obj_end_request(struct rbd_obj_request *obj_request)
 			result, xferred);
 			result, xferred);
 		if (!img_request->result)
 		if (!img_request->result)
 			img_request->result = result;
 			img_request->result = result;
+		/*
+		 * Need to end I/O on the entire obj_request worth of
+		 * bytes in case of error.
+		 */
+		xferred = obj_request->length;
 	}
 	}
 
 
 	/* Image object requests don't own their page array */
 	/* Image object requests don't own their page array */