Re: [PATCH] btrfs-progs: Don't return any fs_info that contain NULL tree_root or fs_root.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 30, 2014 at 10:39:22AM +0800, Qu Wenruo wrote:
> --- a/disk-io.c
> +++ b/disk-io.c
> @@ -1134,7 +1134,8 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
>  	return fs_info;
>  
>  out_failed:
> -	if (flags & OPEN_CTREE_PARTIAL)
> +	if (flags & OPEN_CTREE_PARTIAL &&
> +	    fs_info->tree_root && fs_info->fs_root)
>  		return fs_info;

I see a conflict with a pending patch
https://patchwork.kernel.org/patch/4254631/

that removes the check completely but fixes the crash in another way. I
like Wang's patch because it keeps the logic about partial open inside
btrfs_setup_all_roots(). Please test if it fixes the crash with the
corrupted image you have. Thanks.

>  out_chunk:
>  	btrfs_release_all_roots(fs_info);
--
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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux