From: Miao Xie <miaox@cn.fujitsu.com>
To: Josef Bacik <jbacik@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: reset ret in record_one_backref
Date: Tue, 23 Jul 2013 09:53:22 +0800 [thread overview]
Message-ID: <51EDE212.8040708@cn.fujitsu.com> (raw)
In-Reply-To: <1374511955-1830-1-git-send-email-jbacik@fusionio.com>
On mon, 22 Jul 2013 12:52:35 -0400, Josef Bacik wrote:
> I was getting warnings when running find ./ -type f -exec btrfs fi defrag -f {}
> \; from record_one_backref because ret was set. Turns out it was because it was
> set to 1 because the search slot didn't come out exact and we never reset it.
> So reset it to 0 right after the search so we don't leak this and get
> uneccessary warnings. Thanks,
>
> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
> ---
> fs/btrfs/inode.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index dd05238..a3a6155 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -2132,6 +2132,7 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id,
> WARN_ON(1);
> return ret;
> }
> + ret = 0;
>
> while (1) {
> cond_resched();
> @@ -2181,8 +2182,6 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id,
> old->len || extent_offset + num_bytes <=
> old->extent_offset + old->offset)
> continue;
> -
> - ret = 0;
> break;
> }
>
>
prev parent reply other threads:[~2013-07-23 1:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 16:52 [PATCH] Btrfs: reset ret in record_one_backref Josef Bacik
2013-07-23 1:53 ` Miao Xie [this message]
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=51EDE212.8040708@cn.fujitsu.com \
--to=miaox@cn.fujitsu.com \
--cc=jbacik@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
/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).