From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/7] block: remove bio_set_prio and bio_prio
Date: Thu, 13 Dec 2018 21:32:08 +0100 [thread overview]
Message-ID: <20181213203214.10650-2-hch@lst.de> (raw)
In-Reply-To: <20181213203214.10650-1-hch@lst.de>
There is no good reason to not just use the fields directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
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(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 268d2b8e9843..34619001a5dd 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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);
}
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 9da5629d0887..09591daf4993 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -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;
diff --git a/drivers/md/bcache/movinggc.c b/drivers/md/bcache/movinggc.c
index 7891fb512736..3bc85277e284 100644
--- a/drivers/md/bcache/movinggc.c
+++ b/drivers/md/bcache/movinggc.c
@@ -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;
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
index 73f0efac2b9f..09620652c786 100644
--- a/drivers/md/bcache/writeback.c
+++ b/drivers/md/bcache/writeback.c
@@ -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;
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 7380b094dcca..261b15483c69 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -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))
--
2.19.2
next prev parent reply other threads:[~2018-12-13 20:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 20:32 misc block cleanups Christoph Hellwig
2018-12-13 20:32 ` Christoph Hellwig [this message]
2018-12-13 20:32 ` [PATCH 2/7] block: remove the bio_phys_segments export Christoph Hellwig
2018-12-14 4:27 ` Jens Axboe
2018-12-13 20:32 ` [PATCH 3/7] block: remove the blk_recount_segments export Christoph Hellwig
2018-12-13 20:32 ` [PATCH 4/7] block: remove the unused bio_iov_iter_get_pages export Christoph Hellwig
2018-12-13 20:32 ` [PATCH 5/7] block: remove the unused bio_set_pages_dirty and bio_check_pages_dirty exports Christoph Hellwig
2018-12-13 20:32 ` [PATCH 6/7] block: remove the bioset_integrity_free export Christoph Hellwig
2018-12-13 20:32 ` [PATCH 7/7] block: remove the bio_integrity_advance export Christoph Hellwig
2018-12-14 4:28 ` misc block cleanups Jens Axboe
2018-12-14 13:00 ` Christoph Hellwig
2018-12-14 13:02 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181213203214.10650-2-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox