Re: [PATCH] btrfs: log message when rw remount is attempted with unclean tree-log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx # 4.4+
Signed-off-by: David Sterba <dsterba@xxxxxxxx>
---
  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;
  		}





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux