On Wed, Sep 18, 2013 at 04:27:36PM +0800, Wang Shilong wrote:
> --- a/disk-io.c
> +++ b/disk-io.c
> @@ -982,7 +982,8 @@ int btrfs_setup_chunk_tree_and_device_map(struct 
> btrfs_fs_info *fs_info)
>  static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
>                                            u64 sb_bytenr,
>                                            u64 root_tree_bytenr, int writes,
> -                                          int partial, int restore)
> +                                          int partial, int restore,
> +                                          int run_ioctl)

Yet another parameter to __open_ctree_fd, this really needs a cleanup.
(Later is fine.)

> +     root = open_ctree_with_broken_super(record->device_name,
> +                                     record->bytenr, O_RDWR);

The last parameter is 'writes', I think it's 0/1, not the open() flags.

> +     BUG_ON(!root);

Is it a fatal error to BUG_ON here? Please add proper error handling.

thanks,
david
--
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

Reply via email to