linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Miao Xie <miaox@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 04/12] Btrfs-progs: cleanup similar code in open_ctree_* and close_ctree
Date: Sun, 04 Aug 2013 11:04:15 -0500	[thread overview]
Message-ID: <51FE7B7F.2090206@redhat.com> (raw)
In-Reply-To: <1372857920-4678-5-git-send-email-miaox@cn.fujitsu.com>

On 7/3/13 8:25 AM, Miao Xie wrote:
> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
> ---
>  btrfs-find-root.c | 137 +++-------------
>  disk-io.c         | 473 +++++++++++++++++++++++++++++++-----------------------
>  disk-io.h         |  12 ++
>  3 files changed, 307 insertions(+), 315 deletions(-)

This broke at least btrfs-convert:

> ./btrfs-convert fsfile
> No valid Btrfs found on fsfile
> unable to open ctree
> conversion aborted.

I read the detailed changelog carefully but it didn't help me
understand the change, or how it might have broken.  (yes,
that's sarcasm ;) ).

Can you take a look & see what is wrong with your change?

Also, I guess we need a regression test for btrfs-convert.

-Eric

> diff --git a/btrfs-find-root.c b/btrfs-find-root.c
> index da22c1d..f2cc1bf 100644
> --- a/btrfs-find-root.c
> +++ b/btrfs-find-root.c
> @@ -67,74 +67,31 @@ int csum_block(void *buf, u32 len)
>  
>  static struct btrfs_root *open_ctree_broken(int fd, const char *device)
>  {
> -	u32 sectorsize;
> -	u32 nodesize;
> -	u32 leafsize;
> -	u32 blocksize;
> -	u32 stripesize;
> -	u64 generation;
> -	struct btrfs_root *tree_root = malloc(sizeof(struct btrfs_root));
> -	struct btrfs_root *extent_root = malloc(sizeof(struct btrfs_root));
> -	struct btrfs_root *chunk_root = malloc(sizeof(struct btrfs_root));
> -	struct btrfs_root *dev_root = malloc(sizeof(struct btrfs_root));
> -	struct btrfs_root *csum_root = malloc(sizeof(struct btrfs_root));
> -	struct btrfs_fs_info *fs_info = malloc(sizeof(*fs_info));
> -	int ret;
<giant snip>



  reply	other threads:[~2013-08-04 16:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 13:25 [RFC PATCH 00/12] Btrfs-progs: introduce chunk recover function Miao Xie
2013-07-03 13:25 ` [PATCH 01/12] Btrfs-progs: fix missing recow roots when making btrfs filesystem Miao Xie
2013-07-03 13:25 ` [PATCH 02/12] Btrfs-progs: don't close the file descriptor 0 when closing a device Miao Xie
2013-07-03 14:17   ` Filipe David Manana
2013-07-04  1:30     ` Miao Xie
2013-07-04  8:30       ` Filipe David Manana
2013-07-03 13:25 ` [PATCH 03/12] Btrfs-progs: Don't free the devices when close the ctree Miao Xie
2013-07-08  4:59   ` Anand Jain
2013-07-15  4:58     ` Anand Jain
2013-07-03 13:25 ` [PATCH 04/12] Btrfs-progs: cleanup similar code in open_ctree_* and close_ctree Miao Xie
2013-08-04 16:04   ` Eric Sandeen [this message]
2013-08-04 23:24     ` Wang Shilong
2013-08-04 23:43       ` Eric Sandeen
2013-07-03 13:25 ` [PATCH 05/12] Btrfs-progs: introduce common insert/search/delete functions for rb-tree Miao Xie
2013-07-03 13:25 ` [PATCH 06/12] Btrfs-progs: use rb-tree instead of extent cache tree for fs/file roots Miao Xie
2013-07-03 13:25 ` [PATCH 07/12] Btrfs-progs: extend the extent cache for the device extent Miao Xie
2013-07-03 13:25 ` [PATCH 08/12] Btrfs-progs: Add block group check funtion Miao Xie
2013-07-03 13:25 ` [PATCH 09/12] Btrfs-progs: Add chunk recover function - using old chunk items Miao Xie
2013-08-01 20:30   ` David Sterba
2013-07-03 13:25 ` [PATCH 10/12] Btrfs-progs: introduce list_{first, next}_entry/list_splice_tail{_init} Miao Xie
2013-07-03 13:25 ` [PATCH 11/12] Btrfs-progs: Add chunk rebuild function for RAID1/SINGLE/DUP Miao Xie
2013-07-03 13:25 ` [PATCH 12/12] Btrfs-progs: recover raid0/raid10/raid5/raid6 metadata chunk Miao Xie
2013-07-03 20:36 ` [RFC PATCH 00/12] Btrfs-progs: introduce chunk recover function Chris Mason
2013-07-04  4:06   ` Liu Bo
2013-07-05 14:00     ` Chris Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51FE7B7F.2090206@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=miaox@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).