From: Josef Bacik <jbacik@fusionio.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
Josef Bacik <JBacik@fusionio.com>
Subject: Re: [PATCH 1/2] Btrfs: cleanup extents after we finish logging inode
Date: Mon, 27 Aug 2012 13:05:29 -0400 [thread overview]
Message-ID: <20120827170529.GB4048@localhost.localdomain> (raw)
In-Reply-To: <1346086340-14776-1-git-send-email-bo.li.liu@oracle.com>
On Mon, Aug 27, 2012 at 10:52:19AM -0600, Liu Bo wrote:
> This is based on Josef's "Btrfs: turbo charge fsync".
>
> We should cleanup those extents after we've finished logging inode,
> otherwise we may do redundant work on them.
>
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
> ---
> fs/btrfs/tree-log.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index 5190cd6..e7365d7 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -3167,6 +3167,12 @@ next_slot:
> err = ret;
> goto out_unlock;
> }
> + } else {
> + struct extent_map_tree *tree = &BTRFS_I(inode)->extent_tree;
> + struct extent_map *em, *n;
> +
> + list_for_each_entry_safe(em, n, &tree->modified_extents, list)
> + list_del_init(&em->list);
> }
>
> if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {
> --
Ah thanks I had been meaning to do this but I kept forgetting. I'll add it to
btrfs-next. Thanks,
Josef
prev parent reply other threads:[~2012-08-27 17:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 16:52 [PATCH 1/2] Btrfs: cleanup extents after we finish logging inode Liu Bo
2012-08-27 16:52 ` [PATCH 2/2] Btrfs: improve fsync by filtering extents that we want Liu Bo
2012-08-27 17:12 ` Josef Bacik
2012-08-28 0:22 ` Liu Bo
2012-08-28 17:54 ` Josef Bacik
2012-08-27 17:05 ` Josef Bacik [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=20120827170529.GB4048@localhost.localdomain \
--to=jbacik@fusionio.com \
--cc=bo.li.liu@oracle.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).