From: David Sterba Date: Wed, 5 Feb 2020 16:12:28 +0000 (+0100) Subject: btrfs: log message when rw remount is attempted with unclean tree-log X-Git-Tag: v5.10.7~3036^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10a3a3edc5b89a8cd095bc63495fb1e0f42047d9;p=platform%2Fkernel%2Flinux-rpi.git btrfs: log message when rw remount is attempted with unclean tree-log 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+ Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba --- diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0616a54..67c6385 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(fs_info, + "mount required to replay tree-log, cannot remount read-write"); ret = -EINVAL; goto restore; }