Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3eccdff authored by David Sterba's avatar David Sterba Committed by Greg Kroah-Hartman
Browse files

btrfs: log message when rw remount is attempted with unclean tree-log



commit 10a3a3edc5b89a8cd095bc63495fb1e0f42047d9 upstream.

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: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2a902b48
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1857,6 +1857,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;
		}