At 03/09/2017 02:26 AM, Anand Jain wrote:
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/
Thanks for the patch, while in v3, the memory leak is fixed.
However I still call free with read lock hold, I'll update it in v3.
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.
I'll add you signed-off-by tag in next version too.
Thanks,
Qu
With that.
Looks good.
Reviewed-by: Anand Jain <anand.j...@oracle.com>
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 majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html