xfs
[Top] [All Lists]

Re: Ideas on unified real-ro mount option across all filesystems

To: Eric Sandeen <sandeen@xxxxxxxxxx>, Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>, fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>
Subject: Re: Ideas on unified real-ro mount option across all filesystems
From: Stewart Smith <stewart@xxxxxxxxxxxxxxxx>
Date: Thu, 24 Dec 2015 10:22:31 +1100
Cc: linux-ext4@xxxxxxxxxxxxxxx, btrfs <linux-btrfs@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flamingspork.com; s=mail; t=1450912908; bh=G/8oaQMFhcukxx2bhwdgC++/lLms5mEu7/4CX+kZzy0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VEDEQvXE2hR3PBUOCU8DWe0cIdhCa3+Cy++m0Jm2cHvF9gfVS3eW0oUQQBkvcFhUy 3Z8P5zZAVmygDBsZGzywts2+nDoX+PSJpHOucqZAi0KWywdmwjKlllqWVp1QFRHCMU VxjWLfZwkBDMy9BZjFAVqSO9ClhVch4bK0euhpJo=
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flamingspork.com; s=mail; t=1450912906; bh=G/8oaQMFhcukxx2bhwdgC++/lLms5mEu7/4CX+kZzy0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=t659f9b1+stShIE7t2X5J84FqqGbMkjfeyDYyxIqvDqGXi42otWWzkW7jggxML3wc QqA49aOuNygzLiY7TqTGG+AIA+zXZoYmcTxvJ9ta/CjrQZGPgAnY2sZVRQidUUxk5R 9MluaMTp39eQvAVueNehvLZPaF0B0naT0aXFL2Lw=
In-reply-to: <567228EF.80007@xxxxxxxxxx>
References: <567212DA.8050808@xxxxxxxxxxxxxx> <567228EF.80007@xxxxxxxxxx>
User-agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-redhat-linux-gnu)
Eric Sandeen <sandeen@xxxxxxxxxx> 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: signature.asc
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>