Christoph Hellwig f4829a9b7a blk-mq: fix racy updates of rq->errors
blk_mq_complete_request may be a no-op if the request has already
been completed by others means (e.g. a timeout or cancellation), but
currently drivers have to set rq->errors before calling
blk_mq_complete_request, which might leave us with the wrong error value.

Add an error parameter to blk_mq_complete_request so that we can
defer setting rq->errors until we known we won the race to complete the
request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-10-01 10:10:55 +02:00
..
2015-09-11 18:15:18 -07:00
2015-09-08 14:35:59 -07:00
2015-02-11 10:28:45 -08:00
2015-09-11 18:15:18 -07:00
2015-05-18 13:35:56 -04:00
2015-09-02 12:22:54 -07:00
2015-09-08 14:35:59 -07:00
2015-06-19 16:57:51 -07:00
2015-06-23 15:55:44 -07:00
2015-04-27 10:10:19 -07:00
2015-04-27 10:10:19 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:05:55 -07:00
2015-04-27 10:05:55 -07:00
2015-04-17 10:13:56 -07:00
2014-11-20 09:11:11 +01:00
2015-07-31 13:31:10 +02:00
2014-07-17 22:07:37 +02:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
2014-11-24 16:13:16 +01:00
2014-11-20 09:11:10 +01:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2015-08-26 16:28:48 -07:00
2015-08-26 16:29:49 -07:00
2015-07-30 12:41:47 -07:00
2015-06-02 17:24:54 -07:00
2013-04-09 14:13:27 -04:00
2013-04-09 14:13:15 -04:00
2014-07-17 22:07:35 +02:00
2014-11-24 20:01:28 +01:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
2015-09-02 12:22:54 -07:00
2015-04-16 10:37:12 -07:00
2014-11-12 11:15:57 +01:00
2015-01-09 15:44:19 +01:00
2015-04-11 22:27:14 -04:00
2014-07-17 22:07:39 +02:00
2014-11-24 20:01:28 +01:00
2014-11-12 11:15:57 +01:00
2015-08-26 07:45:25 -07:00
2015-06-02 08:03:25 -07:00
2014-11-20 09:11:15 +01:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
2015-07-23 13:07:04 -07:00
2013-04-09 14:13:15 -04:00