All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Dongyang <lidongyang@novell.com>
To: Josef Bacik <josef@redhat.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Lukas Czerner <lczerner@redhat.com>
Subject: Re: [PATCH] Btrfs: Batched discard support for btrfs
Date: Thu, 24 Feb 2011 10:24:59 +0800	[thread overview]
Message-ID: <201102241024.59950.lidongyang@novell.com> (raw)
In-Reply-To: <20110221143315.GA2979@localhost.localdomain>

On Monday, February 21, 2011 10:33:16 PM Josef Bacik wrote:
> So you have just done 2 searches for the same thing.  Instead of doing
> btrfs_remove_free_space here, put
> 
> bitmap_clear_bits()
> 
> after the search_bitmap, and do a
> 
> unlink_free_space()
> 
> if it's not a bitmap, that way we don't race with the allocator (even
> though this isn't a problem, it just sucks) and we don't do the search
> twice.  Other than that it looks great, thank you,
yes we are searching the same extent for twice, once in btrfs_trim_block_group,
another once we call btrfs_remove_free_space, I'll get it fixed and post a new version,
Thanks a lot.
> 
> Josef

      reply	other threads:[~2011-02-24  2:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21  8:52 [PATCH] Btrfs: Batched discard support for btrfs Li Dongyang
2011-02-21 12:44 ` David Sterba
2011-02-21 13:37 ` Lukas Czerner
2011-02-24  2:24   ` Li Dongyang
2011-02-24  8:30     ` Lukas Czerner
2011-02-21 14:09 ` Chris Mason
2011-02-24  2:24   ` Li Dongyang
2011-02-21 14:33 ` Josef Bacik
2011-02-24  2:24   ` Li Dongyang [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=201102241024.59950.lidongyang@novell.com \
    --to=lidongyang@novell.com \
    --cc=josef@redhat.com \
    --cc=lczerner@redhat.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 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.