From: Guoqing Jiang <gqjiang@suse.com>
To: NeilBrown <neilb@suse.com>, Shaohua Li <shli@kernel.org>,
Coly Li <colyli@suse.de>
Cc: linux-raid@vger.kernel.org, Shaohua Li <shli@fb.com>,
Neil Brown <neilb@suse.de>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [RFC PATCH 1/2] RAID1: a new I/O barrier implementation to remove resync window
Date: Thu, 24 Nov 2016 14:05:45 +0800 [thread overview]
Message-ID: <58368339.4050508@suse.com> (raw)
In-Reply-To: <871sy1bfd9.fsf@notabene.neil.brown.name>
On 11/24/2016 01:45 PM, NeilBrown wrote:
>
>>> @@ -255,19 +257,14 @@ static void call_bio_endio(struct r1bio
>>> if (!test_bit(R1BIO_Uptodate, &r1_bio->state))
>>> bio->bi_error = -EIO;
>>>
>>> - if (done) {
>>> + if (done)
>>> bio_endio(bio);
>>> - /*
>>> - * Wake up any possible resync thread that waits for the device
>>> - * to go idle.
>>> - */
>>> - allow_barrier(conf, start_next_window, bi_sector);
>>> - }
>>> }
>>>
>>> static void raid_end_bio_io(struct r1bio *r1_bio)
>>> {
>>> struct bio *bio = r1_bio->master_bio;
>>> + struct r1conf *conf = r1_bio->mddev->private;
>>>
>>> /* if nobody has done the final endio yet, do it now */
>>> if (!test_and_set_bit(R1BIO_Returned, &r1_bio->state)) {
>>> @@ -278,6 +275,12 @@ static void raid_end_bio_io(struct r1bio
>>>
>>> call_bio_endio(r1_bio);
>>> }
>>> +
>>> + /*
>>> + * Wake up any possible resync thread that waits for the device
>>> + * to go idle.
>>> + */
>>> + allow_barrier(conf, r1_bio->sector);
>> Why this change?
> I wondered too. I think it may be correct, but it should be in a
> separate patch.
> When you have a write-mostly device, I think the current code will
> allow_barrier() before the writes to the write-mostly devices have
> completed.
>
Seems the change is moved from call_bio_endio, but call_bio_endio is
also called
from raid1_end_write_request, I think it is better to keep the original
code.
Thanks,
Guoqing
next prev parent reply other threads:[~2016-11-24 6:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 21:54 [RFC PATCH 1/2] RAID1: a new I/O barrier implementation to remove resync window Coly Li
2016-11-21 21:54 ` [RFC PATCH 2/2] RAID1: avoid unnecessary spin locks in I/O barrier code Coly Li
2016-11-22 21:58 ` Shaohua Li
2016-11-22 21:35 ` [RFC PATCH 1/2] RAID1: a new I/O barrier implementation to remove resync window Shaohua Li
2016-11-23 9:05 ` Guoqing Jiang
2016-11-24 5:45 ` NeilBrown
2016-11-24 6:05 ` Guoqing Jiang [this message]
2016-11-28 6:59 ` Coly Li
2016-11-28 6:42 ` Coly Li
2016-11-29 19:29 ` Shaohua Li
2016-11-30 2:57 ` Coly Li
2016-11-24 7:34 ` Guoqing Jiang
2016-11-28 7:33 ` Coly Li
2016-11-30 6:37 ` Guoqing Jiang
2016-11-30 7:19 ` Coly Li
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=58368339.4050508@suse.com \
--to=gqjiang@suse.com \
--cc=colyli@suse.de \
--cc=jthumshirn@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=neilb@suse.de \
--cc=shli@fb.com \
--cc=shli@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;
as well as URLs for NNTP newsgroup(s).