summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2021-06-10 23:44:36 +0200
committerJens Axboe <axboe@kernel.dk>2021-06-30 23:35:45 +0200
commitfb9b16e15cd70e21d8af7f03d700deb9509c2ce8 (patch)
treeec3125ef22da616b79e1036cdb05fd2f077263ad /include
parentnvme: use blk_execute_rq() for passthrough commands (diff)
downloadlinux-fb9b16e15cd70e21d8af7f03d700deb9509c2ce8.tar.xz
linux-fb9b16e15cd70e21d8af7f03d700deb9509c2ce8.zip
block: return errors from blk_execute_rq()
The synchronous blk_execute_rq() had not provided a way for its callers to know if its request was successful or not. Return the blk_status_t result of the request. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210610214437.641245-4-kbusch@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index d199e51524eb..c454fb446fd0 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -909,10 +909,12 @@ extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, uns
extern int blk_rq_map_user_iov(struct request_queue *, struct request *,
struct rq_map_data *, const struct iov_iter *,
gfp_t);
-extern void blk_execute_rq(struct gendisk *, struct request *, int);
extern void blk_execute_rq_nowait(struct gendisk *,
struct request *, int, rq_end_io_fn *);
+blk_status_t blk_execute_rq(struct gendisk *bd_disk, struct request *rq,
+ int at_head);
+
/* Helper to convert REQ_OP_XXX to its string format XXX */
extern const char *blk_op_str(unsigned int op);