From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH 08/12] block: move blk_steal_bios to blk-mq.c Date: Mon, 25 Oct 2021 09:05:13 +0200 [thread overview] Message-ID: <20211025070517.1548584-9-hch@lst.de> (raw) In-Reply-To: <20211025070517.1548584-1-hch@lst.de> Keep all the request based code together. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-core.c | 21 --------------------- block/blk-mq.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 1ee942266df8d..98cb9d69a4068 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1191,27 +1191,6 @@ void disk_end_io_acct(struct gendisk *disk, unsigned int op, } EXPORT_SYMBOL(disk_end_io_acct); -/* - * Steal bios from a request and add them to a bio list. - * The request must not have been partially completed before. - */ -void blk_steal_bios(struct bio_list *list, struct request *rq) -{ - if (rq->bio) { - if (list->tail) - list->tail->bi_next = rq->bio; - else - list->head = rq->bio; - list->tail = rq->biotail; - - rq->bio = NULL; - rq->biotail = NULL; - } - - rq->__data_len = 0; -} -EXPORT_SYMBOL_GPL(blk_steal_bios); - /** * blk_lld_busy - Check if underlying low-level drivers of a device are busy * @q : the queue of the device being checked diff --git a/block/blk-mq.c b/block/blk-mq.c index a0505099b2ce2..06fb74166aded 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2910,6 +2910,27 @@ int blk_rq_prep_clone(struct request *rq, struct request *rq_src, } EXPORT_SYMBOL_GPL(blk_rq_prep_clone); +/* + * Steal bios from a request and add them to a bio list. + * The request must not have been partially completed before. + */ +void blk_steal_bios(struct bio_list *list, struct request *rq) +{ + if (rq->bio) { + if (list->tail) + list->tail->bi_next = rq->bio; + else + list->head = rq->bio; + list->tail = rq->biotail; + + rq->bio = NULL; + rq->biotail = NULL; + } + + rq->__data_len = 0; +} +EXPORT_SYMBOL_GPL(blk_steal_bios); + static size_t order_to_size(unsigned int order) { return (size_t)PAGE_SIZE << order; -- 2.30.2
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH 08/12] block: move blk_steal_bios to blk-mq.c Date: Mon, 25 Oct 2021 09:05:13 +0200 [thread overview] Message-ID: <20211025070517.1548584-9-hch@lst.de> (raw) In-Reply-To: <20211025070517.1548584-1-hch@lst.de> Keep all the request based code together. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-core.c | 21 --------------------- block/blk-mq.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 1ee942266df8d..98cb9d69a4068 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1191,27 +1191,6 @@ void disk_end_io_acct(struct gendisk *disk, unsigned int op, } EXPORT_SYMBOL(disk_end_io_acct); -/* - * Steal bios from a request and add them to a bio list. - * The request must not have been partially completed before. - */ -void blk_steal_bios(struct bio_list *list, struct request *rq) -{ - if (rq->bio) { - if (list->tail) - list->tail->bi_next = rq->bio; - else - list->head = rq->bio; - list->tail = rq->biotail; - - rq->bio = NULL; - rq->biotail = NULL; - } - - rq->__data_len = 0; -} -EXPORT_SYMBOL_GPL(blk_steal_bios); - /** * blk_lld_busy - Check if underlying low-level drivers of a device are busy * @q : the queue of the device being checked diff --git a/block/blk-mq.c b/block/blk-mq.c index a0505099b2ce2..06fb74166aded 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2910,6 +2910,27 @@ int blk_rq_prep_clone(struct request *rq, struct request *rq_src, } EXPORT_SYMBOL_GPL(blk_rq_prep_clone); +/* + * Steal bios from a request and add them to a bio list. + * The request must not have been partially completed before. + */ +void blk_steal_bios(struct bio_list *list, struct request *rq) +{ + if (rq->bio) { + if (list->tail) + list->tail->bi_next = rq->bio; + else + list->head = rq->bio; + list->tail = rq->biotail; + + rq->bio = NULL; + rq->biotail = NULL; + } + + rq->__data_len = 0; +} +EXPORT_SYMBOL_GPL(blk_steal_bios); + static size_t order_to_size(unsigned int order) { return (size_t)PAGE_SIZE << order; -- 2.30.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-10-25 7:06 UTC|newest] Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-25 7:05 move all struct request releated code out of blk-core.c Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-25 7:05 ` [PATCH 01/12] block: move blk_rq_err_bytes to scsi Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-26 23:55 ` Chaitanya Kulkarni 2021-10-26 23:55 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 02/12] block: remove blk_{get,put}_request Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-26 23:56 ` Chaitanya Kulkarni 2021-10-26 23:56 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 03/12] block: remove rq_flush_dcache_pages Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-25 7:05 ` [PATCH 04/12] block: remove blk-exec.c Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-26 23:58 ` Chaitanya Kulkarni 2021-10-26 23:58 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 05/12] blk-mq: move blk_mq_flush_plug_list Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-27 0:00 ` Chaitanya Kulkarni 2021-10-27 0:00 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 06/12] block: move request based cloning helpers to blk-mq.c Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-27 0:01 ` Chaitanya Kulkarni 2021-10-27 0:01 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 07/12] block: move blk_rq_init " Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-27 0:01 ` Chaitanya Kulkarni 2021-10-27 0:01 ` Chaitanya Kulkarni 2021-10-25 7:05 ` Christoph Hellwig [this message] 2021-10-25 7:05 ` [PATCH 08/12] block: move blk_steal_bios " Christoph Hellwig 2021-10-27 0:02 ` Chaitanya Kulkarni 2021-10-27 0:02 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 09/12] block: move blk_account_io_{start,done} " Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-27 0:04 ` Chaitanya Kulkarni 2021-10-27 0:04 ` [PATCH 09/12] block: move blk_account_io_{start, done} " Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 10/12] block: move blk_dump_rq_flags " Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-27 0:04 ` Chaitanya Kulkarni 2021-10-27 0:04 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 11/12] block: move blk_print_req_error " Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-27 0:06 ` Chaitanya Kulkarni 2021-10-27 0:06 ` Chaitanya Kulkarni 2021-10-25 7:05 ` [PATCH 12/12] block: don't include blk-mq headers in blk-core.c Christoph Hellwig 2021-10-25 7:05 ` Christoph Hellwig 2021-10-27 0:07 ` Chaitanya Kulkarni 2021-10-27 0:07 ` Chaitanya Kulkarni 2021-10-29 12:52 ` (subset) move all struct request releated code out of blk-core.c Jens Axboe 2021-10-29 12:52 ` 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=20211025070517.1548584-9-hch@lst.de \ --to=hch@lst.de \ --cc=axboe@kernel.dk \ --cc=linux-block@vger.kernel.org \ --cc=linux-mtd@lists.infradead.org \ --cc=linux-scsi@vger.kernel.org \ --cc=martin.petersen@oracle.com \ --cc=miquel.raynal@bootlin.com \ --cc=richard@nod.at \ --cc=vigneshr@ti.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.