Hello,

The log replay products 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 <[EMAIL PROTECTED]>

---
diff -urp 1/fs/btrfs/disk-io.c 2/fs/btrfs/disk-io.c
--- 1/fs/btrfs/disk-io.c        2008-11-20 10:17:50.000000000 +0800
+++ 2/fs/btrfs/disk-io.c        2008-11-20 12:24:36.000000000 +0800
@@ -1756,6 +1756,11 @@ struct btrfs_root *open_ctree(struct sup
                                                      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)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to