From: zhouminqiang <zhouminqiang2@huawei.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: <song@kernel.org>, <yukuai@fygo.io>, <neilb@suse.com>,
<artur.paszkiewicz@intel.com>, <shli@kernel.org>,
<axboe@kernel.dk>, <linux-raid@vger.kernel.org>,
<chengzhihao1@huawei.com>, <yangerkun@huawei.com>,
<yi.zhang@huawei.com>
Subject: Re: [PATCH] md/raid10: reset bi_offset in sync_request_write()
Date: Thu, 26 Nov 2026 17:00:45 +0800 [thread overview]
Message-ID: <8888a9f6-8f8a-4c3f-a91d-e130fbb84d53@huawei.com> (raw)
In-Reply-To: <awZsJ5H6uEH4so8D@infradead.org>
Hi,
bio_reuse() is indeed the right helper. v2 has been sent:
https://lore.kernel.org/all/20261126080632.1598653-1-zhouminqiang2@huawei.com/
在 2026/11/25 13:03, Christoph Hellwig 写道:
> On Tue, Nov 24, 2026 at 02:08:56PM +0800, Zhou Minqiang wrote:
>> +++ b/drivers/md/raid10.c
>> @@ -2330,6 +2330,7 @@ static void sync_request_write(struct mddev *mddev, struct r10bio *r10_bio)
>> fbio = r10_bio->devs[i].bio;
>> fbio->bi_iter.bi_size = r10_bio->sectors << 9;
>> fbio->bi_iter.bi_idx = 0;
>> + fbio->bi_iter.bi_offset = 0;
>> fpages = get_resync_pages(fbio)->pages;
>
> Directly messing with the iterator is a really bad idea. This needs to
> use bio_reuse or bio_reset.
Thanks.
prev parent reply other threads:[~2026-11-26 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 6:08 [PATCH] md/raid10: reset bi_offset in sync_request_write() Zhou Minqiang
2026-11-25 5:03 ` Christoph Hellwig
2026-11-26 9:00 ` zhouminqiang [this message]
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=8888a9f6-8f8a-4c3f-a91d-e130fbb84d53@huawei.com \
--to=zhouminqiang2@huawei.com \
--cc=artur.paszkiewicz@intel.com \
--cc=axboe@kernel.dk \
--cc=chengzhihao1@huawei.com \
--cc=hch@infradead.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=shli@kernel.org \
--cc=song@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai@fygo.io \
/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