clean up a few end_request variants
Just some trivial cleanup patches that I'd like to offload from a big series in the pipe..
PATCH 1/3 block: remove blk_end_request_err and __blk_end_request_err
Both functions are entirely unused.
--- block/blk-core.c | 39 --------------------------------------- include/linux/blkdev.h | 2 -- 2 files changed, 41 deletions(-)
block/blk-core.c +0 -39
@@ -2856,25 +2856,6 @@ bool blk_end_request_cur(struct request *rq, int error)EXPORT_SYMBOL (blk_end_request_cur);/** -* blk_end_request_err - Finish a request till the next failure boundary. -* @rq: the request to finish till the next failure boundary for -* @error: must be negative errno -* -* Description: -* Complete @rq till the next failure boundary. -* -* Return: -* %false - we are done with this request -* %true - still buffers pending for this request -*/ -bool blk_end_request_err (struct request *rq,int error) -{ -WARN_ON (error >=0 ); -return blk_end_request (rq, error,blk_rq_err_bytes (rq)); -} -EXPORT_SYMBOL_GPL (blk_end_request_err); - -/** * __blk_end_request - Helper function for drivers to complete the request. * @rq: the request being processed * @error: %0 for success, < %0 for error
@@ -2933,26 +2914,6 @@ bool __blk_end_request_cur(struct request *rq, int error) }EXPORT_SYMBOL (__blk_end_request_cur); -/** -* __blk_end_request_err - Finish a request till the next failure boundary. -* @rq: the request to finish till the next failure boundary for -* @error: must be negative errno -* -* Description: -* Complete @rq till the next failure boundary. Must be called -* with queue lock held. -* -* Return: -* %false - we are done with this request -* %true - still buffers pending for this request -*/ -bool __blk_end_request_err (struct request *rq,int error) -{ -WARN_ON (error >=0 ); -return __blk_end_request (rq, error,blk_rq_err_bytes (rq)); -} -EXPORT_SYMBOL_GPL (__blk_end_request_err); -void blk_rq_bio_prep (struct request_queue *q,struct request *rq,struct bio *bio) {
include/linux/blkdev.h +0 -2
@@ -1128,12 +1128,10 @@ extern bool blk_end_request(struct request *rq, int error, unsigned int nr_bytes);extern void blk_end_request_all (struct request *rq,int error);extern bool blk_end_request_cur (struct request *rq,int error); -extern bool blk_end_request_err (struct request *rq,int error);extern bool __blk_end_request (struct request *rq,int error,unsigned int nr_bytes);extern void __blk_end_request_all (struct request *rq,int error);extern bool __blk_end_request_cur (struct request *rq,int error); -extern bool __blk_end_request_err (struct request *rq,int error);extern void blk_complete_request (struct request *);extern void __blk_complete_request (struct request *);
Signature · 1 line
2.11.0
Re: [PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err
Quoted 4 lines · Christoph Hellwig
Both functions are entirely unused.
Signed-off-by Christoph Hellwig <[email protected]>---
Looks good,
Signature · 6 lines
Johannes Thumshirn Storage [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg GF: Felix Imend�rffer, Jane Smithard, Graham Norton HRB 21284 (AG N�rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH 2/3 block: remove blk_end_request_cur
In reply to Christoph HellwigThis function is not used anywhere in the kernel.
--- block/blk-core.c | 18 ------------------ include/linux/blkdev.h | 1 - 2 files changed, 19 deletions(-)
block/blk-core.c +0 -18
@@ -2838,24 +2838,6 @@ void blk_end_request_all(struct request *rq, int error)EXPORT_SYMBOL (blk_end_request_all);/** -* blk_end_request_cur - Helper function to finish the current request chunk. -* @rq: the request to finish the current chunk for -* @error: %0 for success, < %0 for error -* -* Description: -* Complete the current consecutively mapped chunk from @rq. -* -* Return: -* %false - we are done with this request -* %true - still buffers pending for this request -*/ -bool blk_end_request_cur (struct request *rq,int error) -{ -return blk_end_request (rq, error,blk_rq_cur_bytes (rq)); -} -EXPORT_SYMBOL (blk_end_request_cur); - -/** * __blk_end_request - Helper function for drivers to complete the request. * @rq: the request being processed * @error: %0 for success, < %0 for error
include/linux/blkdev.h +0 -1
@@ -1127,7 +1127,6 @@ extern void blk_finish_request(struct request *rq, int error);extern bool blk_end_request (struct request *rq,int error,unsigned int nr_bytes);extern void blk_end_request_all (struct request *rq,int error); -extern bool blk_end_request_cur (struct request *rq,int error);extern bool __blk_end_request (struct request *rq,int error,unsigned int nr_bytes);extern void __blk_end_request_all (struct request *rq,int error);
Signature · 1 line
2.11.0
Re: [PATCH 2/3] block: remove blk_end_request_cur
Quoted 4 lines · Christoph Hellwig
This function is not used anywhere in the kernel.
Signed-off-by Christoph Hellwig <[email protected]>---
Looks good, though one could argue it can be merged into the last patch.
Signature · 6 lines
Johannes Thumshirn Storage [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg GF: Felix Imend�rffer, Jane Smithard, Graham Norton HRB 21284 (AG N�rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH 3/3 block: make __blk_end_bidi_request private
In reply to Christoph Hellwigblk_insert_flush should be using __blk_end_request to start with.
--- block/blk-core.c | 2 +- block/blk-flush.c | 2 +- block/blk.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-)
block/blk-core.c +1 -1
@@ -2785,7 +2785,7 @@ static bool blk_end_bidi_request(struct request *rq, int error,* %false - we are done with this request * %true - still buffers pending for this request **/ -bool __blk_end_bidi_request (struct request *rq,int error, +static bool __blk_end_bidi_request (struct request *rq,int error,unsigned int nr_bytes,unsigned int bidi_bytes) {if (blk_update_bidi_request (rq, error, nr_bytes, bidi_bytes))
block/blk-flush.c +1 -1
@@ -447,7 +447,7 @@ void blk_insert_flush(struct request *rq)if (q->mq_ops)blk_mq_end_request (rq,0 );else -__blk_end_bidi_request (rq,0 ,0 ,0 ); +__blk_end_request (rq,0 ,0 );return ; }
block/blk.h +0 -2
@@ -67,8 +67,6 @@ void blk_queue_bypass_start(struct request_queue *q);void blk_queue_bypass_end (struct request_queue *q);void blk_dequeue_request (struct request *rq);void __blk_queue_free_tags (struct request_queue *q); -bool __blk_end_bidi_request (struct request *rq,int error, -unsigned int nr_bytes,unsigned int bidi_bytes);void blk_freeze_queue (struct request_queue *q);static inline void blk_queue_enter_live (struct request_queue *q)
Signature · 1 line
2.11.0
Jens Axboe
maintainerQuoted 2 lines · Christoph Hellwig
Just some trivial cleanup patches that I'd like to offload from a big series in the pipe..
Added for 4.12, thanks.
Signature · 1 line
Jens Axboe