linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Eric Sandeen <sandeen@sandeen.net>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Trying to write to read-only block-device from XFS
Date: Tue, 28 Aug 2018 10:08:36 +1000	[thread overview]
Message-ID: <20180828000836.GI2234@dastard> (raw)
In-Reply-To: <20180827164342.4vlg3zaehkzcj6od@two.firstfloor.org>

On Mon, Aug 27, 2018 at 09:43:43AM -0700, Andi Kleen wrote:
> 
> Adding linux-fsdevel. Keeping full quote for context.
> 
> On Mon, Aug 27, 2018 at 10:12:54AM +0200, Carlos Maiolino wrote:
> > Essentially, this isn't a XFS problem, and most likely you are using XFS on top
> > of some layer like LVM, and/or using snapshots, and your underlying volume went
> > read-only behind XFS for some reason.
> 
> Ok, so the blame is assigned, but the question is still how to avoid the
> warning:
> 
> (1) either XFS needs to check for read only underlying more often
> or
> (2) the warning needs to be removed.
> 
> I assume (2) is far easier. Is (1) even possible without races? 

I doubt (1) is possible to handle at all.

e.g. What's the filesystem supposed to do when the device goes RO
under it without warning? We've now got a heap of dirty state in
memory that we can't write, so in reality if this ever happens our
only option is to shutdown the filesystem, toss everything away and
unmount it.

And because the device is now read only, we can't get the filesystem
back into a consistent state by mounting it again because it can't
run log recovery as that requires writing to the device.

IOWs, having devices turn read only underneath active read/write
filesystems without warning is an unrecoverable failure from the
filesystem perspective.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  parent reply	other threads:[~2018-08-28  3:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180824233756.kkvmkmm5mdlx77je@two.firstfloor.org>
     [not found] ` <a4d32107-abc0-60d3-8306-b091fbffefd8@sandeen.net>
     [not found]   ` <20180825140951.a3dsz3efwnjsj2pz@two.firstfloor.org>
     [not found]     ` <c6bcbef0-0c5b-a7a1-adb6-38085db98ce9@sandeen.net>
     [not found]       ` <20180827081254.zat4lvxqviwgd4zn@odin.usersys.redhat.com>
2018-08-27 16:43         ` Trying to write to read-only block-device from XFS Andi Kleen
2018-08-27 16:53           ` Eric Sandeen
2018-08-28  0:08           ` Dave Chinner [this message]
2018-08-28  7:54           ` Carlos Maiolino
2018-08-29  2:40             ` Andi Kleen
2018-08-29  4:19               ` Dave Chinner
2018-08-29  9:17                 ` Carlos Maiolino

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=20180828000836.GI2234@dastard \
    --to=david@fromorbit.com \
    --cc=andi@firstfloor.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).