mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
Btrfs: Drop dirty roots created by log replay immediately when
The log replay produces dirty roots. These dirty roots should be dropped immediately if the fs is mounted as ro. Otherwise they can be added to the dirty root list again when remounting the fs as rw. Thank you, Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
This commit is contained in:
parent
4b4e25f2a6
commit
e556ce2c9d
1 changed files with 5 additions and 0 deletions
|
@ -1757,6 +1757,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
|
|||
generation + 1);
|
||||
ret = btrfs_recover_log_trees(log_tree_root);
|
||||
BUG_ON(ret);
|
||||
|
||||
if (sb->s_flags & MS_RDONLY) {
|
||||
ret = btrfs_commit_super(tree_root);
|
||||
BUG_ON(ret);
|
||||
}
|
||||
}
|
||||
|
||||
if (!(sb->s_flags & MS_RDONLY)) {
|
||||
|
|
Loading…
Reference in a new issue