btrfs: log message when rw remount is attempted with unclean tree-log
Subsystems (2)
David Sterba
maintainerPATCH v2 1/1 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 [email protected] # 4.4+
Signed-off-by David Sterba <[email protected]>
---
* fix typo in fs_info parameter
fs/btrfs/super.c | 2 ++ 1 file changed, 2 insertions(+)
fs/btrfs/super.c +2 -0
@@ -1841,6 +1841,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; }
Signature · 1 line
2.25.0
Reviewed-by Anand Jain <[email protected]>
Looks good,
Reviewed-by Johannes Thumshirn <[email protected]>