public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Stewart Smith <stewart@flamingspork.com>
To: Eric Sandeen <sandeen@redhat.com>,
	Qu Wenruo <quwenruo@cn.fujitsu.com>,
	fsdevel <linux-fsdevel@vger.kernel.org>
Cc: linux-ext4@vger.kernel.org, btrfs <linux-btrfs@vger.kernel.org>,
	xfs@oss.sgi.com
Subject: Re: Ideas on unified real-ro mount option across all filesystems
Date: Thu, 24 Dec 2015 10:22:31 +1100	[thread overview]
Message-ID: <87twn8vjgo.fsf@flamingspork.com> (raw)
In-Reply-To: <567228EF.80007@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1456 bytes --]

Eric Sandeen <sandeen@redhat.com> writes:
>> 3) A lot of user even don't now mount ro can still modify device
>>    Yes, I didn't know this point until I checked the log replay code of
>>    btrfs.
>>    Adding such mount option alias may raise some attention of users.
>
> Given that nothing in the documentation implies that the block device itself
> must remain unchanged on a read-only mount, I don't see any problem which
> needs fixing.  MS_RDONLY rejects user IO; that's all.
>
> If you want to be sure your block device rejects all IO for forensics or
> what have you, I'd suggest # blockdev --setro /dev/whatever prior to mount,
> and take it out of the filesystem's control.  Or better yet, making an
> image and not touching the original.

What we do for the petitboot bootloader in POWER and OpenPower firmware
(a linux+initramfs that does kexec to boot) is that we use device mapper
to make a snapshot in memory where we run recovery (for some
filesystems, notably XFS is different due to journal not being endian
safe). We also have to have an option *not* to do that, just in case
there's a bug in journal replay... and we're lucky in the fact that we
probably do have enough memory to complete replay, this solution could
be completely impossible on lower memory machines.

As such, I believe we're the only bit of firmware/bootloader ever that
has correctly parsed a journalling filesystem.

-- 
Stewart Smith

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2015-12-23 23:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <567212DA.8050808@cn.fujitsu.com>
2015-12-17  3:15 ` Ideas on unified real-ro mount option across all filesystems Eric Sandeen
2015-12-17  3:26   ` Darrick J. Wong
2015-12-17 14:35     ` Carlos E. R.
2015-12-17 14:58     ` Carlos E. R.
2015-12-17 14:08   ` Karel Zak
2015-12-18  1:29   ` Qu Wenruo
2015-12-18  2:01     ` Christoph Anton Mitterer
2015-12-18  2:51       ` Eric Sandeen
2015-12-18  4:20         ` Christoph Anton Mitterer
2015-12-23 23:22   ` Stewart Smith [this message]
2015-12-26 22:53     ` Dave Chinner

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=87twn8vjgo.fsf@flamingspork.com \
    --to=stewart@flamingspork.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.com \
    /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