From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: Re: [PATCH] Btrfs: optimize check for stale device
Date: Wed, 07 Oct 2015 16:59:35 +0800 [thread overview]
Message-ID: <5614DEF7.3050202@oracle.com> (raw)
In-Reply-To: <1444035437-9442-1-git-send-email-anand.jain@oracle.com>
On 10/05/2015 04:57 PM, Anand Jain wrote:
> optimize check for stale device to only be checked when there
> is device added or changed. If there is no update to the
> device, there is no need to call btrfs_free_stale_device().
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> fs/btrfs/volumes.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index b8b1171..ec1fcfa 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -620,7 +620,8 @@ static noinline int device_list_add(const char *path,
> * if there is new btrfs on an already registered device,
> * then remove the stale device entry.
> */
> - btrfs_free_stale_device(device);
> + if (ret > 0)
> + btrfs_free_stale_device(device);
>
> *fs_devices_ret = fs_devices;
>
>
I have to withdraw this. The ret is 0 when there is new fsid on a
previously known device that means we need to clear the stale. v.sorry.
Thanks, Anand
next prev parent reply other threads:[~2015-10-07 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 8:57 [PATCH] Btrfs: optimize check for stale device Anand Jain
2015-10-07 8:59 ` Anand Jain [this message]
2015-10-07 9:08 ` David Sterba
2015-10-07 9:01 ` David Sterba
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=5614DEF7.3050202@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--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).