From: Eric Sandeen <sandeen@redhat.com>
To: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Cc: Qu Wenruo <quwenruo@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Introduce new mount option to disable tree log replay
Date: Mon, 7 Dec 2015 11:29:22 -0600 [thread overview]
Message-ID: <5665C1F2.8020407@redhat.com> (raw)
In-Reply-To: <2856934.1tulUexfpA@localhost.localdomain>
On 12/7/15 10:52 AM, Chandan Rajendra wrote:
> On Monday 07 Dec 2015 10:27:05 Eric Sandeen wrote:
>> On 12/7/15 12:06 AM, Qu Wenruo wrote:
>>> Introduce a new mount option "nologreplay" to co-operate with "ro" mount
>>> option to get real readonly mount, like "norecovery" in ext* and xfs.
>>>
>>> Since the new parse_options() need to check new flags at remount time,
>>> so add a new parameter for parse_options().
>>>
>>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
>>> ---
>>>
>>> Documentation/filesystems/btrfs.txt | 5 +++++
>>> fs/btrfs/ctree.h | 4 +++-
>>> fs/btrfs/disk-io.c | 7 ++++---
>>> fs/btrfs/super.c | 20 +++++++++++++++++---
>>> 4 files changed, 29 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/Documentation/filesystems/btrfs.txt
>>> b/Documentation/filesystems/btrfs.txt index c772b47..ac4ed68 100644
>>> --- a/Documentation/filesystems/btrfs.txt
>>> +++ b/Documentation/filesystems/btrfs.txt
>>> @@ -168,6 +168,11 @@ Options with (*) are default options and will not
>>> show in the mount options.>
>>> notreelog
>>>
>>> Enable/disable the tree logging used for fsync and O_SYNC writes.
>>>
>>> + nologreplay
>>> + Disable the log tree replay at mount time for real read-only mount.
>>> + Must be use with "ro" mount option and can't be disabled by mount
>>> + option.
>>
>> This documentation is not clear to me - "can't be disabled by mount option?"
>>
>> I think you mean to talk about remount here? Perhaps something like:
>>
>> "... Must be used with 'ro' mount option. A filesystem mounted with the
>> 'nologreplay' option cannot transition to a read-write mount via
>> remount,rw - the filesystem must be unmounted and remounted if read-write
>> access is desired."
>>
> Eric, I had assumed the same logic with respect to the transition from 'ro' to
> 'rw' via remount. But when doing so, btrfs_remount() flags an error only when
> a valid 'tree log' tree is present in the filesystem
> i.e. btrfs_super_block->log_root has a non-zero value. Otherwise,
> btrfs_remount() does not seem to have any problem with the transition from
> 'ro' to 'rw'.
Ok, I don't know if that's intended - but I think the docs should be clarified
to explicitly state the expected behavior in any case.
FWIW, new mount options and their descriptions should be added to BTRFS-MOUNT(5)
as well.
-Eric
next prev parent reply other threads:[~2015-12-07 17:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 6:06 [PATCH] btrfs: Introduce new mount option to disable tree log replay Qu Wenruo
2015-12-07 15:38 ` Chandan Rajendra
2015-12-07 23:51 ` Qu Wenruo
2015-12-07 16:27 ` Eric Sandeen
2015-12-07 16:52 ` Chandan Rajendra
2015-12-07 17:29 ` Eric Sandeen [this message]
2015-12-07 20:54 ` Christoph Anton Mitterer
2015-12-07 23:06 ` Eric Sandeen
2015-12-08 0:00 ` Christoph Anton Mitterer
2015-12-08 12:15 ` Austin S Hemmelgarn
2015-12-08 19:20 ` Christoph Anton Mitterer
2015-12-08 20:29 ` Austin S Hemmelgarn
2015-12-07 16:36 ` Austin S Hemmelgarn
2015-12-08 6:08 ` Qu Wenruo
2015-12-08 12:16 ` Austin S Hemmelgarn
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=5665C1F2.8020407@redhat.com \
--to=sandeen@redhat.com \
--cc=chandan@linux.vnet.ibm.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.