public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH RFC 3/4] xfs: defer agfl block frees on extent frees
Date: Fri, 8 Dec 2017 09:49:41 +1100	[thread overview]
Message-ID: <20171207224941.GK4094@dastard> (raw)
In-Reply-To: <20171207185810.48757-4-bfoster@redhat.com>

On Thu, Dec 07, 2017 at 01:58:09PM -0500, Brian Foster wrote:
> Defer AGFL block frees from deferred extent free context. This means
> that extents that are deferred freed via xfs_bmap_add_free() will
> add additional deferred items for AGFL block frees during completion
> processing. All such items complete before xfs_defer_finish()
> returns.
> 
> Update xfs_trans_free_extent() and xfs_free_extent() to receive an
> optional dfops pointer and pass it down to the AGFL fixup code via
> the allocation arguments structure. Update
> xfs_extent_free_finish_item() to pass along the dfops list currently
> being processed by xfs_defer_finish(). All other callers pass a NULL
> dfops and so do not change behavior.
> 
> Signed-off-by: Brian Foster <bfoster@redhat.com>
> ---
>  fs/xfs/libxfs/xfs_alloc.c          | 9 ++++++---
>  fs/xfs/libxfs/xfs_alloc.h          | 5 +++--
>  fs/xfs/libxfs/xfs_ialloc_btree.c   | 2 +-
>  fs/xfs/libxfs/xfs_refcount_btree.c | 2 +-
>  fs/xfs/libxfs/xfs_rmap.c           | 2 +-
>  fs/xfs/xfs_extfree_item.c          | 2 +-
>  fs/xfs/xfs_fsops.c                 | 2 +-
>  fs/xfs/xfs_trans.h                 | 3 ++-
>  fs/xfs/xfs_trans_extfree.c         | 7 ++++---
>  9 files changed, 20 insertions(+), 14 deletions(-)

Rather than passing the dfops structure around, I'm starting to
wonder it it makes more sense to attach it to the struct xfs_trans
we pass around to all these functions? That would mean it doesn't
need to be manually plumbed into any of this code - it would be
directly available in any transaction context that has a dfops
associated with it.

That would mean all agfl fixups would be able to be deferred without
modifying any of the intermediate code paths as all allocation/free
transactions require a dfops structure....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2017-12-07 22:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 18:58 [PATCH RFC 0/4] xfs: defer agfl block frees Brian Foster
2017-12-07 18:58 ` [PATCH RFC 1/4] xfs: create agfl block free helper function Brian Foster
2017-12-07 22:24   ` Dave Chinner
2017-12-07 18:58 ` [PATCH RFC 2/4] xfs: defer agfl block frees when dfops is available Brian Foster
2017-12-07 22:41   ` Dave Chinner
2017-12-07 22:54     ` Dave Chinner
2017-12-08 14:17       ` Brian Foster
2017-12-08 14:16     ` Brian Foster
2018-01-08 21:56       ` Brian Foster
2018-01-09 20:43         ` Darrick J. Wong
2018-01-10 12:58           ` Brian Foster
2018-01-10 19:08             ` Darrick J. Wong
2018-01-10 20:32               ` Brian Foster
2017-12-07 18:58 ` [PATCH RFC 3/4] xfs: defer agfl block frees on extent frees Brian Foster
2017-12-07 22:49   ` Dave Chinner [this message]
2017-12-08 14:20     ` Brian Foster
2017-12-07 18:58 ` [PATCH RFC 4/4] xfs: defer agfl frees on inobt allocs during chunk removal Brian Foster

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=20171207224941.GK4094@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=linux-xfs@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