Introduce a new function, btrfs_check_rw_degradable(), to check if all
chunks in btrfs is OK for degraded rw mount.
It provides the new basis for accurate btrfs mount/remount and even
runtime degraded mount check other than old one-size-fit-all method.
Sorry for late response. But this patch has a bug (calls free
with the lock held) and fixed in this patch [1].
[1]
[PATCH] btrfs: fix btrfs_check_degradable() to free extent map
https://patchwork.kernel.org/patch/8868761/
the last version of this patch is here [2] and it did contain the
above fix [1] but it missed my sign-off and change commit log
update (sorry for that)
[2] http://www.spinics.net/lists/linux-btrfs/msg55038.html
Can you pls squash [1] to this patch.
With that.
Looks good.
Reviewed-by: Anand Jain <anand.jain@xxxxxxxxxx>
While you are here, can you also consider..
-----
@@ -6843,7 +6843,7 @@ bool btrfs_check_rw_degradable(struct
btrfs_fs_info *fs_info,
int max_tolerated;
int i;
- map = (struct map_lookup *) em->bdev;
+ map = em->map_lookup;
max_tolerated =
btrfs_get_num_tolerated_disk_barrier_failures(
map->type);
------
Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html