Hi, Josef Bacik

We noticed an error in 5.10.x backport of 'btrfs: fix possible free
space tree corruption with online conversion'

It is wrong in 5.10.13, but right in 5.11.

5.10.13
@@ -146,6 +146,9 @@ enum {
        BTRFS_FS_STATE_DEV_REPLACING,
        /* The btrfs_fs_info created for self-tests */
        BTRFS_FS_STATE_DUMMY_FS_INFO,
+
+       /* Indicate that we can't trust the free space tree for caching yet */
+       BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,
 };

the usage sample of this enum:
set_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, &fs_info->fs_state);


5.11
enum{
..
    /* Indicate that the discard workqueue can service discards. */
    BTRFS_FS_DISCARD_RUNNING,

    /* Indicate that we need to cleanup space cache v1 */
    BTRFS_FS_CLEANUP_SPACE_CACHE_V1,

    /* Indicate that we can't trust the free space tree for caching yet */
    BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,
};

the usage sample of this enum:
set_bit(BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED, &fs_info->flags);

Best Regards
Wang Yugui (wangyu...@e16-tech.com)
2021/02/19


Reply via email to