misc block cleanups
Subsystems (2)
Remove a few pointless helpers and unused exports.
PATCH 1/7 block: remove bio_set_prio and bio_prio
There is no good reason to not just use the fields directly.
--- block/blk-core.c | 2 +- block/blk-merge.c | 2 +- drivers/md/bcache/movinggc.c | 2 +- drivers/md/bcache/writeback.c | 2 +- include/linux/bio.h | 3 --- 5 files changed, 4 insertions(+), 7 deletions(-)
block/blk-core.c +1 -1
@@ -734,7 +734,7 @@ void blk_init_request_from_bio(struct request *req, struct bio *bio) req->cmd_flags |=REQ_FAILFAST_MASK ; req->__sector = bio->bi_iter.bi_sector; - req->ioprio =bio_prio (bio); + req->ioprio = bio->bi_ioprio; req->write_hint = bio->bi_write_hint;blk_rq_bio_prep (req->q, req, bio); }
block/blk-merge.c +1 -1
@@ -882,7 +882,7 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)if (rq->write_hint != bio->bi_write_hint)return false; -if (rq->ioprio !=bio_prio (bio)) +if (rq->ioprio != bio->bi_ioprio)return false;return true;
drivers/md/bcache/movinggc.c +1 -1
@@ -82,7 +82,7 @@ static void moving_init(struct moving_io *io)bio_init (bio, bio->bi_inline_vecs,DIV_ROUND_UP (KEY_SIZE (&io->w->key),PAGE_SECTORS ));bio_get (bio); -bio_set_prio (bio,IOPRIO_PRIO_VALUE (IOPRIO_CLASS_IDLE ,0 )); + bio->bi_ioprio =IOPRIO_PRIO_VALUE (IOPRIO_CLASS_IDLE ,0 ); bio->bi_iter.bi_size =KEY_SIZE (&io->w->key) <<9 ; bio->bi_private = &io->cl;
drivers/md/bcache/writeback.c +1 -1
@@ -250,7 +250,7 @@ static void dirty_init(struct keybuf_key *w)bio_init (bio, bio->bi_inline_vecs,DIV_ROUND_UP (KEY_SIZE (&w->key),PAGE_SECTORS ));if (!io->dc->writeback_percent) -bio_set_prio (bio,IOPRIO_PRIO_VALUE (IOPRIO_CLASS_IDLE ,0 )); + bio->bi_ioprio =IOPRIO_PRIO_VALUE (IOPRIO_CLASS_IDLE ,0 ); bio->bi_iter.bi_size =KEY_SIZE (&w->key) <<9 ; bio->bi_private = w;
include/linux/bio.h +0 -3
@@ -44,9 +44,6 @@#define BIO_MAX_PAGES 256#endif -#define bio_prio (bio) (bio)->bi_ioprio -#define bio_set_prio (bio, prio) ((bio)->bi_ioprio = prio) -#define bio_iter_iovec (bio, iter) \ bvec_iter_bvec((bio)->bi_io_vec, (iter))
Signature · 1 line
2.19.2
PATCH 2/7 block: remove the bio_phys_segments export
In reply to Christoph Hellwig--- block/bio.c | 3 +-- block/blk-merge.c | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-)
block/bio.c +1 -2
@@ -571,14 +571,13 @@ void bio_put(struct bio *bio) }EXPORT_SYMBOL (bio_put); -inline int bio_phys_segments (struct request_queue *q,struct bio *bio) +int bio_phys_segments (struct request_queue *q,struct bio *bio) {if (unlikely (!bio_flagged (bio,BIO_SEG_VALID )))blk_recount_segments (q, bio);return bio->bi_phys_segments; } -EXPORT_SYMBOL (bio_phys_segments);/** * __bio_clone_fast - clone a bio that shares the original bio's biovec
block/blk-merge.c +5 -1
@@ -264,7 +264,11 @@ void blk_queue_split(struct request_queue *q, struct bio **bio) }/* physical segments can be figured out during splitting */ - res = split ? split : *bio; +if (split) { + res = split; + }else { + res = *bio; + } res->bi_phys_segments = nsegs;bio_set_flag (res,BIO_SEG_VALID );
Signature · 1 line
2.19.2
Jens Axboe
maintainerRe: [PATCH 2/7] block: remove the bio_phys_segments export
Quoted 32 lines · Christoph Hellwig
Signed-off-by Christoph Hellwig <[email protected]>--- block/bio.c | 3 +-- block/blk-merge.c | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-)block/bio.c +1
-2@@ -571,14 +571,13 @@ void bio_put(struct bio *bio) }EXPORT_SYMBOL (bio_put); -inline int bio_phys_segments (struct request_queue *q,struct bio *bio) +int bio_phys_segments (struct request_queue *q,struct bio *bio) {if (unlikely (!bio_flagged (bio,BIO_SEG_VALID )))blk_recount_segments (q, bio);return bio->bi_phys_segments; } -EXPORT_SYMBOL (bio_phys_segments);/** * __bio_clone_fast - clone a bio that shares the original bio's biovec block/blk-merge.c +0
-0@@ -264,7 +264,11 @@ void blk_queue_split(struct request_queue *q, struct bio **bio) }
block/blk-merge.c void blk_queue_split(struct request_queue *q, struct bio **bio) · line 273
Quoted 10 lines
block/blk-merge.c +5
-1/* physical segments can be figured out during splitting */ - res = split ? split : *bio; +if (split) { + res = split; + }else { + res = *bio; + } res->bi_phys_segments = nsegs;bio_set_flag (res,BIO_SEG_VALID );
Unrelated hunk in this patch.
Signature · 1 line
Jens Axboe
PATCH 3/7 block: remove the blk_recount_segments export
In reply to Christoph Hellwig--- block/blk-merge.c | 1 - 1 file changed, 1 deletion(-)
block/blk-merge.c +0 -1
@@ -393,7 +393,6 @@ void blk_recount_segments(struct request_queue *q, struct bio *bio)bio_set_flag (bio,BIO_SEG_VALID ); } -EXPORT_SYMBOL (blk_recount_segments);static int blk_phys_contig_segment (struct request_queue *q,struct bio *bio,struct bio *nxt)
Signature · 1 line
2.19.2
PATCH 4/7 block: remove the unused bio_iov_iter_get_pages export
In reply to Christoph Hellwig--- block/bio.c | 1 - 1 file changed, 1 deletion(-)
block/bio.c +0 -1
@@ -901,7 +901,6 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)return 0 ; } -EXPORT_SYMBOL_GPL (bio_iov_iter_get_pages);static void submit_bio_wait_endio (struct bio *bio) {
Signature · 1 line
2.19.2
PATCH 5/7 block: remove the unused bio_set_pages_dirty and bio_check_pages_dirty exports
In reply to Christoph Hellwig--- block/bio.c | 2 -- 1 file changed, 2 deletions(-)
block/bio.c +0 -2
@@ -1590,7 +1590,6 @@ void bio_set_pages_dirty(struct bio *bio)set_page_dirty_lock (bvec->bv_page); } } -EXPORT_SYMBOL_GPL (bio_set_pages_dirty);static void bio_release_pages (struct bio *bio) {
@@ -1660,7 +1659,6 @@ void bio_check_pages_dirty(struct bio *bio)spin_unlock_irqrestore (&bio_dirty_lock, flags);schedule_work (&bio_dirty_work); } -EXPORT_SYMBOL_GPL (bio_check_pages_dirty);void update_io_ticks (struct hd_struct *part,unsigned long now) {
Signature · 1 line
2.19.2
PATCH 6/7 block: remove the bioset_integrity_free export
In reply to Christoph Hellwig--- block/bio-integrity.c | 1 - 1 file changed, 1 deletion(-)
block/bio-integrity.c +0 -1
@@ -460,7 +460,6 @@ void bioset_integrity_free(struct bio_set *bs)mempool_exit (&bs->bio_integrity_pool);mempool_exit (&bs->bvec_integrity_pool); } -EXPORT_SYMBOL (bioset_integrity_free);void __init bio_integrity_init (void ) {
Signature · 1 line
2.19.2
PATCH 7/7 block: remove the bio_integrity_advance export
In reply to Christoph Hellwig--- block/bio-integrity.c | 1 - 1 file changed, 1 deletion(-)
block/bio-integrity.c +0 -1
@@ -390,7 +390,6 @@ void bio_integrity_advance(struct bio *bio, unsigned int bytes_done) bip->bip_iter.bi_sector += bytes_done >>9 ;bvec_iter_advance (bip->bip_vec, &bip->bip_iter, bytes); } -EXPORT_SYMBOL (bio_integrity_advance);/** * bio_integrity_trim - Trim integrity vector
Signature · 1 line
2.19.2
Jens Axboe
maintainerQuoted 1 line · Christoph Hellwig
Remove a few pointless helpers and unused exports.
We've got quite a bit of churn this round, do you mind if we push #1 to next round? I'm fine with killing the exports, if they are not used, they should go.
Signature · 1 line
Jens Axboe
Quoted 6 lines · Jens Axboe
Quoted 1 line · Christoph Hellwig
Remove a few pointless helpers and unused exports.
We've got quite a bit of churn this round, do you mind if we push #1 to next round? I'm fine with killing the exports, if they are not used, they should go.
Sure, fine with me. Are you going to drop the accidental hunk yourself or should I resend?
Jens Axboe
maintainerQuoted 10 lines · Christoph Hellwig
Quoted 6 lines · Jens Axboe
Quoted 1 line · Christoph Hellwig
Remove a few pointless helpers and unused exports.
We've got quite a bit of churn this round, do you mind if we push #1 to next round? I'm fine with killing the exports, if they are not used, they should go.
Sure, fine with me. Are you going to drop the accidental hunk yourself or should I resend?
I can drop it.
Signature · 1 line
Jens Axboe