Message ID | 1363097259-1860-1-git-send-email-jbacik@fusionio.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On Tue, Mar 12, 2013 at 10:07:39AM -0400, Josef Bacik wrote: > Dave fixed the fs_info to allocate the super copy instead of embedding it, but > he failed to notice that I open code open_ctree in btrfs-find-root so we end up > with a super that's not allocated, so we segfault whenever you try to run > btrfs-find-root. I've fixed this up and now we don't segfault anymore. Thanks, Sorry about that, patch queued. david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/find-root.c b/find-root.c index f99fb76..810d835 100644 --- a/find-root.c +++ b/find-root.c @@ -116,6 +116,7 @@ static struct btrfs_root *open_ctree_broken(int fd, const char *device) } memset(fs_info, 0, sizeof(*fs_info)); + fs_info->super_copy = calloc(1, BTRFS_SUPER_INFO_SIZE); fs_info->tree_root = tree_root; fs_info->extent_root = extent_root; fs_info->chunk_root = chunk_root;
Dave fixed the fs_info to allocate the super copy instead of embedding it, but he failed to notice that I open code open_ctree in btrfs-find-root so we end up with a super that's not allocated, so we segfault whenever you try to run btrfs-find-root. I've fixed this up and now we don't segfault anymore. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> --- find-root.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)