* [PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err
2017-04-12 10:13 clean up a few end_request variants Christoph Hellwig
@ 2017-04-12 10:13 ` Christoph Hellwig
2017-04-13 8:20 ` Johannes Thumshirn
2017-04-12 10:13 ` [PATCH 2/3] block: remove blk_end_request_cur Christoph Hellwig
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2017-04-12 10:13 UTC (permalink / raw)
To: axboe; +Cc: linux-block
Both functions are entirely unused.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-core.c | 39 ---------------------------------------
include/linux/blkdev.h | 2 --
2 files changed, 41 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 4f95bdaa1e16..8aee417c1e4f 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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)
{
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f912ddc39020..3b6201b1cd0e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -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 *);
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err
2017-04-12 10:13 ` [PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err Christoph Hellwig
@ 2017-04-13 8:20 ` Johannes Thumshirn
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Thumshirn @ 2017-04-13 8:20 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, linux-block
On Wed, Apr 12, 2017 at 12:13:57PM +0200, Christoph Hellwig wrote:
> Both functions are entirely unused.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] block: remove blk_end_request_cur
2017-04-12 10:13 clean up a few end_request variants Christoph Hellwig
2017-04-12 10:13 ` [PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err Christoph Hellwig
@ 2017-04-12 10:13 ` Christoph Hellwig
2017-04-13 8:22 ` Johannes Thumshirn
2017-04-12 10:13 ` [PATCH 3/3] block: make __blk_end_bidi_request private Christoph Hellwig
2017-04-19 16:26 ` clean up a few end_request variants Jens Axboe
3 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2017-04-12 10:13 UTC (permalink / raw)
To: axboe; +Cc: linux-block
This function is not used anywhere in the kernel.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-core.c | 18 ------------------
include/linux/blkdev.h | 1 -
2 files changed, 19 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 8aee417c1e4f..a01af9ca0455 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 3b6201b1cd0e..f770a17d2fbf 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -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);
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] block: remove blk_end_request_cur
2017-04-12 10:13 ` [PATCH 2/3] block: remove blk_end_request_cur Christoph Hellwig
@ 2017-04-13 8:22 ` Johannes Thumshirn
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Thumshirn @ 2017-04-13 8:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, linux-block
On Wed, Apr 12, 2017 at 12:13:58PM +0200, Christoph Hellwig wrote:
> This function is not used anywhere in the kernel.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Looks good, though one could argue it can be merged into the last patch.
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] block: make __blk_end_bidi_request private
2017-04-12 10:13 clean up a few end_request variants Christoph Hellwig
2017-04-12 10:13 ` [PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err Christoph Hellwig
2017-04-12 10:13 ` [PATCH 2/3] block: remove blk_end_request_cur Christoph Hellwig
@ 2017-04-12 10:13 ` Christoph Hellwig
2017-04-19 16:26 ` clean up a few end_request variants Jens Axboe
3 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2017-04-12 10:13 UTC (permalink / raw)
To: axboe; +Cc: linux-block
blk_insert_flush should be using __blk_end_request to start with.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-core.c | 2 +-
block/blk-flush.c | 2 +-
block/blk.h | 2 --
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index a01af9ca0455..518f5d189436 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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))
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 4e951d3bf548..c4e0880b54bb 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -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;
}
diff --git a/block/blk.h b/block/blk.h
index 07d375183f31..35b3041eec1a 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -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)
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: clean up a few end_request variants
2017-04-12 10:13 clean up a few end_request variants Christoph Hellwig
` (2 preceding siblings ...)
2017-04-12 10:13 ` [PATCH 3/3] block: make __blk_end_bidi_request private Christoph Hellwig
@ 2017-04-19 16:26 ` Jens Axboe
3 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2017-04-19 16:26 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block
On 04/12/2017 04:13 AM, Christoph Hellwig wrote:
> Just some trivial cleanup patches that I'd like to offload from
> a big series in the pipe..
Added for 4.12, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread