public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] btrfs: log message when rw remount is attempted with unclean tree-log
Date: Thu, 6 Feb 2020 11:51:04 +0800	[thread overview]
Message-ID: <9a74f394-8afc-bd34-08a1-e194440746d5@oracle.com> (raw)
In-Reply-To: <20200205161228.24378-1-dsterba@suse.com>

On 2/6/20 12:12 AM, David Sterba wrote:
> A remount to a read-write filesystem is not safe when there's tree-log
> to be replayed. Files that could be opened until now might be affected
> by the changes in the tree-log.
> 
> A regular mount is needed to replay the log so the filesystem presents
> the consistent view with the pending changes included.
> 
> CC: stable@vger.kernel.org # 4.4+
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
>   fs/btrfs/super.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 580ba7db67e5..a2554c651548 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -1834,6 +1834,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
>   		}
>   
>   		if (btrfs_super_log_root(fs_info->super_copy) != 0) {



> +			btrfs_warn(f_info,

                                  ^^^^
                               fs_info,

Thanks, Anand

> +		"mount required to replay tree-log, cannot remount read-write");
>   			ret = -EINVAL;
>   			goto restore;
>   		}
> 


  reply	other threads:[~2020-02-06  3:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 16:12 [PATCH] btrfs: log message when rw remount is attempted with unclean tree-log David Sterba
2020-02-06  3:51 ` Anand Jain [this message]
2020-02-06  6:16 ` kbuild test robot
2020-02-06  7:49 ` kbuild test robot

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=9a74f394-8afc-bd34-08a1-e194440746d5@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=stable@vger.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