From: Mark Fasheh <mfasheh@suse.de>
To: Jan Schmidt <list.btrfs@jan-o-sch.net>
Cc: chris.mason@fusionio.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: extended inode refs support for send mechanism
Date: Thu, 11 Oct 2012 14:39:29 -0700 [thread overview]
Message-ID: <20121011213928.GY8097@wotan.suse.de> (raw)
In-Reply-To: <1349868091-23041-1-git-send-email-list.btrfs@jan-o-sch.net>
Hi Jan!
On Wed, Oct 10, 2012 at 01:21:31PM +0200, Jan Schmidt wrote:
> @@ -1574,11 +1599,22 @@ static int get_first_ref(struct send_ctx *sctx,
> goto out;
> }
>
> - iref = btrfs_item_ptr(path->nodes[0], path->slots[0],
> - struct btrfs_inode_ref);
> - len = btrfs_inode_ref_name_len(path->nodes[0], iref);
> - ret = fs_path_add_from_extent_buffer(name, path->nodes[0],
> - (unsigned long)(iref + 1), len);
> + if (key.type == BTRFS_INODE_REF_KEY) {
> + struct btrfs_inode_ref *iref;
> + iref = btrfs_item_ptr(path->nodes[0], path->slots[0],
> + struct btrfs_inode_ref);
> + len = btrfs_inode_ref_name_len(path->nodes[0], iref);
> + ret = fs_path_add_from_extent_buffer(name, path->nodes[0],
> + (unsigned long)(iref + 1),
> + len);
> + } else {
> + struct btrfs_inode_extref *extref;
> + extref = btrfs_item_ptr(path->nodes[0], path->slots[0],
> + struct btrfs_inode_extref);
> + len = btrfs_inode_extref_name_len(path->nodes[0], extref);
> + ret = fs_path_add_from_extent_buffer(name, path->nodes[0],
> + (unsigned long)&extref->name, len);
> + }
> if (ret < 0)
> goto out;
> btrfs_release_path(path);
Ok there's the following line in get_first_ref() which I believe was missed:
*dir = found_key.offset;
that will have to account for an extended ref.
The rest of the patch looks pretty good to me. Thanks for writing this up!
--Mark
--
Mark Fasheh
next prev parent reply other threads:[~2012-10-11 21:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 11:21 [PATCH] Btrfs: extended inode refs support for send mechanism Jan Schmidt
2012-10-11 11:11 ` Alex Lyakas
2012-10-15 6:45 ` Jan Schmidt
2012-10-11 21:39 ` Mark Fasheh [this message]
2012-10-15 6:50 ` Jan Schmidt
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=20121011213928.GY8097@wotan.suse.de \
--to=mfasheh@suse.de \
--cc=chris.mason@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=list.btrfs@jan-o-sch.net \
/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).