Hello David, > 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.) I have considered about this, __open_ctree_fd() is a *static* helper, if i don't add another parameter to it. I have to move out of __open_ctree_fd() into open_ctree_with_broken_super() which also seems not good! > >> + 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. Yeah, will fix it. > >> + BUG_ON(!root); > > Is it a fatal error to BUG_ON here? Please add proper error handling. Yes, BUG_ON() is not really friendly, let me see if i can handle it more gracefully. Thanks, Wang > > thanks, > david > -- > 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 -- 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
