All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: Jan Schmidt <list.btrfs@jan-o-sch.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] Btrfs: use helper for logical resolve
Date: Thu, 16 Aug 2012 13:53:00 +0800	[thread overview]
Message-ID: <502C8ABC.2000202@oracle.com> (raw)
In-Reply-To: <502C80DE.3030008@jan-o-sch.net>

On 08/16/2012 01:10 PM, Jan Schmidt wrote:
> On Thu, August 16, 2012 at 06:42 (+0200), Liu Bo wrote:
>> We already have a helper, iterate_inodes_from_logical(), for logical resolve,
>> so just use it.
>>
>> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
>> ---
>>  fs/btrfs/ioctl.c |   20 +++-----------------
>>  1 files changed, 3 insertions(+), 17 deletions(-)
>>
>> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
>> index 405b279..f1ff21a 100644
>> --- a/fs/btrfs/ioctl.c
>> +++ b/fs/btrfs/ioctl.c
[...]
>> -	extent_item_pos = loi->logical - key.objectid;
>> -	ret = iterate_extent_inodes(root->fs_info, key.objectid,
>> -					extent_item_pos, 0, build_ino_list,
>> -					inodes);
>> -
>> +	path->search_commit_root = 0;
> 
> I came across that search_commit_root as well when re-reading
> iterate_inodes_from_logical. Wouldn't explicitly set the default value here,
> though. We don't do it before each and every call to btrfs_search_slot, either.
> 

ok, will remove the redundant default set.

>> +	ret = iterate_inodes_from_logical(loi->logical, root->fs_info, path,
>> +					  build_ino_list, inodes);
> 
> To maintain the current behavior, we should patch -EINVAL to -ENOENT here.
> 

oops, I should have noticed it.

Thanks for the comments, Jan :)

thanks,
liubo


  reply	other threads:[~2012-08-16  5:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  4:42 [PATCH 1/2] Btrfs: fix a bug in parsing return value in logical resolve Liu Bo
2012-08-16  4:42 ` [PATCH 2/2] Btrfs: use helper for " Liu Bo
2012-08-16  5:10   ` Jan Schmidt
2012-08-16  5:53     ` Liu Bo [this message]
2012-08-16  5:08 ` [PATCH 1/2] Btrfs: fix a bug in parsing return value in " 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=502C8ABC.2000202@oracle.com \
    --to=bo.li.liu@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.