From: NeilBrown <neilb@suse.com>
To: Shaohua Li <shli@kernel.org>, Mikulas Patocka <mpatocka@redhat.com>
Cc: linux-raid@vger.kernel.org, Shaohua Li <shli@fb.com>
Subject: Re: [PATCH] md: make suspend range wait timed out
Date: Fri, 23 Jun 2017 07:54:27 +1000 [thread overview]
Message-ID: <87fuer1yek.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20170621160704.xyiy6fea4rokag72@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 2535 bytes --]
On Wed, Jun 21 2017, Shaohua Li wrote:
> On Wed, Jun 21, 2017 at 10:09:08AM -0400, Mikulas Patocka wrote:
>>
>>
>> On Mon, 19 Jun 2017, Shaohua Li wrote:
>>
>> > > Write errors only get back to the application if it calls fsync(), and
>> > > many don't do that. Write errors can easily cause a filesystem to go
>> > > read-only, and require an fsck. I think we should be very cautious
>> > > about triggering write errors.
>> > >
>> > > NFS will hang indefinitely rather then return an error if the server is
>> > > not available. That can certainly be annoying, but the alternative has
>> > > been tried, and it leads to random data corruption.
>> > > The two cases are only comparable at a very high level, but I think
>> > > this result should encourage substantial caution.
>> >
>> > It's hard to say if an IO error or an infinite wait is better, but since there
>> > is better option in this case, I don't want to argue. I'll repost a patch to
>> > reset suspend range after a timeout, assume this is your suggestion.
>> >
>> > Thanks,
>> > Shaohua
>>
>> Automatically resetting the suspend range could result in data corruption,
>> so it is even worse than a deadlock.
>
> depending on how you look at this. a deadlock means you will eventually hard
> reset the system, and that will result in data corruption.
But in that circumstance (purely hypothetical at this stage) the
sysadmin knows that something has gone wrong. In the other, they might
not.
Invisible data corruption is much worse that visible.
The suspend functionality is used by user-space programs. If you think
the current interface is not ideal, maybe it would be better to design
an interface that a user-space program can use which is safe to use, but
also fails safe. Maybe it could give the kernel a PID with the meaning
"if you have to invalidate my suspend request, please kill the pid
first". That would have risks of its own of course.
The suspend interface is currently used:
- to enable backup of a region which it is being reshaped in-place.
As time goes on, this will be used less and less as the
change-data-offset approach to reshape doesn't need this.
- to stablise a region while raid6check performs parity calculations
and possibly "corrects" one block.
You at least need to analyse the failure modes of these before you can
justify making any change to the interface they use.
But again, I really don't think there is a problem that needs fixing.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2017-06-22 21:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 19:41 [PATCH] md: make suspend range wait timed out Shaohua Li
2017-06-16 3:26 ` NeilBrown
2017-06-16 15:52 ` Shaohua Li
2017-06-16 18:06 ` Brad Campbell
2017-06-16 19:07 ` Shaohua Li
2017-06-16 19:22 ` Brad Campbell
2017-06-16 19:37 ` Brad Campbell
2017-06-18 21:30 ` NeilBrown
2017-06-20 0:54 ` Shaohua Li
2017-06-21 14:09 ` Mikulas Patocka
2017-06-21 16:07 ` Shaohua Li
2017-06-22 21:54 ` NeilBrown [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=87fuer1yek.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=mpatocka@redhat.com \
--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).