From patchwork Tue Dec 29 09:18:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Shih X-Patchwork-Id: 11992115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DFDDC433E6 for ; Tue, 29 Dec 2020 09:29:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75AA2208BA for ; Tue, 29 Dec 2020 09:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726277AbgL2J3L (ORCPT ); Tue, 29 Dec 2020 04:29:11 -0500 Received: from mail.synology.com ([211.23.38.101]:43844 "EHLO synology.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725986AbgL2J3K (ORCPT ); Tue, 29 Dec 2020 04:29:10 -0500 Received: from localhost.localdomain (unknown [10.17.198.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by synology.com (Postfix) with ESMTPSA id 1876FCE781A7; Tue, 29 Dec 2020 17:21:11 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synology.com; s=123; t=1609233671; bh=jpzBEgsS3XGxpGhcKo+9a8VwP0KuPU+cSqae0gJ3gEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bvBzQwdXzEtioLAnF6SsyCdog9JJo8iv5WsQpCP7CVXgKtzvUMjvT2S4CsGU7H59e a2U/7iyCP+5t/kJYgUqZIBb/A5dCnNbdgbCR8RaCrIPpG555B+YDHwCX4ITOT/fmUA HBJLOuNl1zNDwlqpe4aU3OpsSz/2a9kLBkB6ZTGI= From: dannyshih To: axboe@kernel.dk Cc: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, song@kernel.org, linux-block@vger.kernel.org, linux-raid@vger.kernel.org, Danny Shih Subject: [PATCH 1/4] block: introduce submit_bio_noacct_add_head Date: Tue, 29 Dec 2020 17:18:39 +0800 Message-Id: <1609233522-25837-2-git-send-email-dannyshih@synology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609233522-25837-1-git-send-email-dannyshih@synology.com> References: <1609233522-25837-1-git-send-email-dannyshih@synology.com> X-Synology-MCP-Status: no X-Synology-Spam-Flag: no X-Synology-Spam-Status: score=0, required 6, WHITELIST_FROM_ADDRESS 0 X-Synology-Virus-Status: no Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Danny Shih Porvide a way for stacking block device to re-submit the bio which sholud be handled firstly. Signed-off-by: Danny Shih Reviewed-by: Allen Peng Reviewed-by: Alex Wu --- block/blk-core.c | 44 +++++++++++++++++++++++++++++++++----------- include/linux/blkdev.h | 1 + 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 96e5fcd..693dc83 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1031,16 +1031,7 @@ static blk_qc_t __submit_bio_noacct_mq(struct bio *bio) return ret; } -/** - * submit_bio_noacct - re-submit a bio to the block device layer for I/O - * @bio: The bio describing the location in memory and on the device. - * - * This is a version of submit_bio() that shall only be used for I/O that is - * resubmitted to lower level drivers by stacking block drivers. All file - * systems and other upper level users of the block layer should use - * submit_bio() instead. - */ -blk_qc_t submit_bio_noacct(struct bio *bio) +static blk_qc_t do_submit_bio_noacct(struct bio *bio, bool add_head) { if (!submit_bio_checks(bio)) return BLK_QC_T_NONE; @@ -1052,7 +1043,10 @@ blk_qc_t submit_bio_noacct(struct bio *bio) * it is active, and then process them after it returned. */ if (current->bio_list) { - bio_list_add(¤t->bio_list[0], bio); + if (add_head) + bio_list_add_head(¤t->bio_list[0], bio); + else + bio_list_add(¤t->bio_list[0], bio); return BLK_QC_T_NONE; } @@ -1060,9 +1054,37 @@ blk_qc_t submit_bio_noacct(struct bio *bio) return __submit_bio_noacct_mq(bio); return __submit_bio_noacct(bio); } + +/** + * submit_bio_noacct - re-submit a bio to the block device layer for I/O + * @bio: The bio describing the location in memory and on the device. + * + * This is a version of submit_bio() that shall only be used for I/O that is + * resubmitted to lower level drivers by stacking block drivers. All file + * systems and other upper level users of the block layer should use + * submit_bio() instead. + */ +blk_qc_t submit_bio_noacct(struct bio *bio) +{ + return do_submit_bio_noacct(bio, false); +} EXPORT_SYMBOL(submit_bio_noacct); /** + * submit_bio_noacct - re-submit a bio, which needs to be handle firstly, + * to the block device layer for I/O + * @bio: The bio describing the location in memory and on the device. + * + * alternative submit_bio_noacct() which add bio to the head of + * current->bio_list. + */ +blk_qc_t submit_bio_noacct_add_head(struct bio *bio) +{ + return do_submit_bio_noacct(bio, true); +} +EXPORT_SYMBOL(submit_bio_noacct_add_head); + +/** * submit_bio - submit a bio to the block device layer for I/O * @bio: The &struct bio which describes the I/O * diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 070de09..b0080d0 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -905,6 +905,7 @@ static inline void rq_flush_dcache_pages(struct request *rq) extern int blk_register_queue(struct gendisk *disk); extern void blk_unregister_queue(struct gendisk *disk); blk_qc_t submit_bio_noacct(struct bio *bio); +blk_qc_t submit_bio_noacct_add_head(struct bio *bio); extern void blk_rq_init(struct request_queue *q, struct request *rq); extern void blk_put_request(struct request *); extern struct request *blk_get_request(struct request_queue *, unsigned int op, From patchwork Tue Dec 29 09:18:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Shih X-Patchwork-Id: 11992113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69DFEC433E9 for ; Tue, 29 Dec 2020 09:29:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CFE521D7F for ; Tue, 29 Dec 2020 09:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726242AbgL2J3K (ORCPT ); Tue, 29 Dec 2020 04:29:10 -0500 Received: from mail.synology.com ([211.23.38.101]:43842 "EHLO synology.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725866AbgL2J3J (ORCPT ); Tue, 29 Dec 2020 04:29:09 -0500 X-Greylist: delayed 436 seconds by postgrey-1.27 at vger.kernel.org; Tue, 29 Dec 2020 04:29:08 EST Received: from localhost.localdomain (unknown [10.17.198.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by synology.com (Postfix) with ESMTPSA id 2F468CE781A8; Tue, 29 Dec 2020 17:21:11 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synology.com; s=123; t=1609233671; bh=+HZP5cRN+7/h1y9v1UgB0m/4rcblDdZQnet7m+Cvsr8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ibOi+n8kxRmwMYYkbv1i5HuBGPg/p0V+t5xh1paJDG2ZhEQm13uL6lck2AWtJkzto bPE3dd0jUK79NZ8x7AP0MpVkK0IGTqiqfqRgJsIoohiqQL8bGoVWUqOYpxOJPKhqDf 72vkohsIU4shoTs06qKHbXnhEtRsmPBx9ccXKc2I= From: dannyshih To: axboe@kernel.dk Cc: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, song@kernel.org, linux-block@vger.kernel.org, linux-raid@vger.kernel.org, Danny Shih Subject: [PATCH 2/4] block: use submit_bio_noacct_add_head for split bio sending back Date: Tue, 29 Dec 2020 17:18:40 +0800 Message-Id: <1609233522-25837-3-git-send-email-dannyshih@synology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609233522-25837-1-git-send-email-dannyshih@synology.com> References: <1609233522-25837-1-git-send-email-dannyshih@synology.com> X-Synology-MCP-Status: no X-Synology-Spam-Flag: no X-Synology-Spam-Status: score=0, required 6, WHITELIST_FROM_ADDRESS 0 X-Synology-Virus-Status: no Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Danny Shih Use submit_bio_noacct_add_head when sending split bio back to itself. Otherwise, it might be handled after the lately split bio. Signed-off-by: Danny Shih Reviewed-by: Allen Peng Reviewed-by: Alex Wu --- block/blk-merge.c | 2 +- block/bounce.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 808768f..e6ddcef0 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -347,7 +347,7 @@ void __blk_queue_split(struct bio **bio, unsigned int *nr_segs) bio_chain(split, *bio); trace_block_split(split, (*bio)->bi_iter.bi_sector); - submit_bio_noacct(*bio); + submit_bio_noacct_add_head(*bio); *bio = split; } } diff --git a/block/bounce.c b/block/bounce.c index d3f51ac..0b4db65 100644 --- a/block/bounce.c +++ b/block/bounce.c @@ -308,7 +308,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, if (!passthrough && sectors < bio_sectors(*bio_orig)) { bio = bio_split(*bio_orig, sectors, GFP_NOIO, &bounce_bio_split); bio_chain(bio, *bio_orig); - submit_bio_noacct(*bio_orig); + submit_bio_noacct_add_head(*bio_orig); *bio_orig = bio; } bio = bounce_clone_bio(*bio_orig, GFP_NOIO, passthrough ? NULL : From patchwork Tue Dec 29 09:18:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Shih X-Patchwork-Id: 11992111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 345E7C433DB for ; Tue, 29 Dec 2020 09:29:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9951207D1 for ; Tue, 29 Dec 2020 09:29:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726261AbgL2J3K (ORCPT ); Tue, 29 Dec 2020 04:29:10 -0500 Received: from mail.synology.com ([211.23.38.101]:43858 "EHLO synology.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726161AbgL2J3J (ORCPT ); Tue, 29 Dec 2020 04:29:09 -0500 Received: from localhost.localdomain (unknown [10.17.198.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by synology.com (Postfix) with ESMTPSA id 42A66CE780A1; Tue, 29 Dec 2020 17:21:11 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synology.com; s=123; t=1609233671; bh=Qxu4vUKQKWL6/tjzR7ffoqsmtCLzkIMcEENQ3xILAzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=PPqsYzcSJbLZkxbveH10J50u+etbYati2u7k8Mv/Xo5+MTdqnXiXq6zsE8c9ZQ5EQ cQ2PpGFgP8n9LzwWvFtF7lEjlRVFWKQ5ChQTDsIDx0PhDzs7gfqohvrMjx04MZObis rXdvQm5NQFx4lyZM+vbHj4mxPuDluUW6l7+7ElBE= From: dannyshih To: axboe@kernel.dk Cc: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, song@kernel.org, linux-block@vger.kernel.org, linux-raid@vger.kernel.org, Danny Shih Subject: [PATCH 3/4] dm: use submit_bio_noacct_add_head for split bio sending back Date: Tue, 29 Dec 2020 17:18:41 +0800 Message-Id: <1609233522-25837-4-git-send-email-dannyshih@synology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609233522-25837-1-git-send-email-dannyshih@synology.com> References: <1609233522-25837-1-git-send-email-dannyshih@synology.com> X-Synology-MCP-Status: no X-Synology-Spam-Flag: no X-Synology-Spam-Status: score=0, required 6, WHITELIST_FROM_ADDRESS 0 X-Synology-Virus-Status: no Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Danny Shih Use submit_bio_noacct_add_head when sending split bio back to dm device. Otherwise, it might be handled after the lately split bio. Signed-off-by: Danny Shih Reviewed-by: Allen Peng Reviewed-by: Alex Wu --- drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index b3c3c8b..1a651d5 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1613,7 +1613,7 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, bio_chain(b, bio); trace_block_split(b, bio->bi_iter.bi_sector); - ret = submit_bio_noacct(bio); + ret = submit_bio_noacct_add_head(bio); break; } } From patchwork Tue Dec 29 09:18:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Shih X-Patchwork-Id: 11992117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E721C4332E for ; Tue, 29 Dec 2020 09:29:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFB5D208BA for ; Tue, 29 Dec 2020 09:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbgL2J3L (ORCPT ); Tue, 29 Dec 2020 04:29:11 -0500 Received: from mail.synology.com ([211.23.38.101]:43852 "EHLO synology.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726156AbgL2J3K (ORCPT ); Tue, 29 Dec 2020 04:29:10 -0500 Received: from localhost.localdomain (unknown [10.17.198.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by synology.com (Postfix) with ESMTPSA id 553B1CE781AC; Tue, 29 Dec 2020 17:21:11 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synology.com; s=123; t=1609233671; bh=uW8Adw4OvUpDdOcXBQ8eWpTQ3vZt8hQfYkYX0sMcN9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WjyLSyv1x3fJJQzV+FWwVvw6GU3jkWibYBBjm9PjUJ0OKVWNx+VF+yZXED5FK3bRm flgaGcBzEAi257bS/0CdUKgSWkLEfM8iOocZ48B46j8C5Ddekam2JcxhRDeAi857wK aJ0IapZ+0OR25ER98oHAfPjYEaDZhlVesWFPlEsA= From: dannyshih To: axboe@kernel.dk Cc: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, song@kernel.org, linux-block@vger.kernel.org, linux-raid@vger.kernel.org, Danny Shih Subject: [PATCH 4/4] md: use submit_bio_noacct_add_head for split bio sending back Date: Tue, 29 Dec 2020 17:18:42 +0800 Message-Id: <1609233522-25837-5-git-send-email-dannyshih@synology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609233522-25837-1-git-send-email-dannyshih@synology.com> References: <1609233522-25837-1-git-send-email-dannyshih@synology.com> X-Synology-MCP-Status: no X-Synology-Spam-Flag: no X-Synology-Spam-Status: score=0, required 6, WHITELIST_FROM_ADDRESS 0 X-Synology-Virus-Status: no Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Danny Shih Use submit_bio_noacct_add_head when sending split bio back to md device. Otherwise, it might be handled after the lately split bio. Signed-off-by: Danny Shih Reviewed-by: Allen Peng Reviewed-by: Alex Wu --- drivers/md/md-linear.c | 2 +- drivers/md/raid0.c | 4 ++-- drivers/md/raid1.c | 4 ++-- drivers/md/raid10.c | 4 ++-- drivers/md/raid5.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c index 68cac7d..24418ee 100644 --- a/drivers/md/md-linear.c +++ b/drivers/md/md-linear.c @@ -243,7 +243,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio) struct bio *split = bio_split(bio, end_sector - bio_sector, GFP_NOIO, &mddev->bio_set); bio_chain(split, bio); - submit_bio_noacct(bio); + submit_bio_noacct_add_head(bio); bio = split; } diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 67f157f..92e82d5 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -447,7 +447,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio) zone->zone_end - bio->bi_iter.bi_sector, GFP_NOIO, &mddev->bio_set); bio_chain(split, bio); - submit_bio_noacct(bio); + submit_bio_noacct_add_head(bio); bio = split; end = zone->zone_end; } else @@ -552,7 +552,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio) struct bio *split = bio_split(bio, sectors, GFP_NOIO, &mddev->bio_set); bio_chain(split, bio); - submit_bio_noacct(bio); + submit_bio_noacct_add_head(bio); bio = split; } diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index c034799..31cec76 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1282,7 +1282,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio, struct bio *split = bio_split(bio, max_sectors, gfp, &conf->bio_split); bio_chain(split, bio); - submit_bio_noacct(bio); + submit_bio_noacct_add_head(bio); bio = split; r1_bio->master_bio = bio; r1_bio->sectors = max_sectors; @@ -1453,7 +1453,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio, struct bio *split = bio_split(bio, max_sectors, GFP_NOIO, &conf->bio_split); bio_chain(split, bio); - submit_bio_noacct(bio); + submit_bio_noacct_add_head(bio); bio = split; r1_bio->master_bio = bio; r1_bio->sectors = max_sectors; diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index c5d88ef..c4dc970 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1177,7 +1177,7 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio, gfp, &conf->bio_split); bio_chain(split, bio); allow_barrier(conf); - submit_bio_noacct(bio); + submit_bio_noacct_add_head(bio); wait_barrier(conf); bio = split; r10_bio->master_bio = bio; @@ -1460,7 +1460,7 @@ static void raid10_write_request(struct mddev *mddev, struct bio *bio, GFP_NOIO, &conf->bio_split); bio_chain(split, bio); allow_barrier(conf); - submit_bio_noacct(bio); + submit_bio_noacct_add_head(bio); wait_barrier(conf); bio = split; r10_bio->master_bio = bio; diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 3a90cc0..17458ac 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -5490,7 +5490,7 @@ static struct bio *chunk_aligned_read(struct mddev *mddev, struct bio *raid_bio) struct r5conf *conf = mddev->private; split = bio_split(raid_bio, sectors, GFP_NOIO, &conf->bio_split); bio_chain(split, raid_bio); - submit_bio_noacct(raid_bio); + submit_bio_noacct_add_head(raid_bio); raid_bio = split; }