hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/fs/btrfs/super.c
....@@ -1692,8 +1692,6 @@
16921692 } else {
16931693 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
16941694 btrfs_sb(s)->bdev_holder = fs_type;
1695
- if (!strstr(crc32c_impl(), "generic"))
1696
- set_bit(BTRFS_FS_CSUM_IMPL_FAST, &fs_info->flags);
16971695 error = btrfs_fill_super(s, fs_devices, data);
16981696 }
16991697 if (!error)
....@@ -2269,7 +2267,7 @@
22692267 * calculated f_bavail.
22702268 */
22712269 if (!mixed && block_rsv->space_info->full &&
2272
- total_free_meta - thresh < block_rsv->size)
2270
+ (total_free_meta < thresh || total_free_meta - thresh < block_rsv->size))
22732271 buf->f_bavail = 0;
22742272
22752273 buf->f_type = BTRFS_SUPER_MAGIC;