linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 0/3] clean up speculative preallocation tracking and tagging
Date: Tue, 22 Nov 2016 08:00:59 -0500	[thread overview]
Message-ID: <1479819662-64416-1-git-send-email-bfoster@redhat.com> (raw)

Hi all,

These are a few patches that resulted from the following discussion with
regard to how to tag reflink inodes correctly for COW fork
preallocation:

  http://www.spinics.net/lists/linux-xfs/msg02155.html

The problem with the current code is that xfs_reflink_reserve_cow()
doesn't consider preallocation due to start offset alignment. The
problem with the first pass patch above is that the same function
doesn't distinguish between extent preallocation and extent merge.

The solution in this series pushes down the incorporation of
preallocation to the bmapi call, where it already has the additional
context to identify whether an extent allocation was widened due to
cowextszhint alignment. The callers are still responsible for defining
how much to preallocate, to throttle, retry if necessary, etc.

Note that this series is based on top of Christoph's recent extent
lookup cleanup patches. This survives xfstests for me on a reflink=1 fs.
Thoughts, reviews, flames appreciated.

Brian

Brian Foster (3):
  xfs: track preallocation separately in xfs_bmapi_reserve_delalloc()
  xfs: clean up cow fork reservation and tag inodes correctly
  xfs: pass post-eof speculative prealloc blocks to bmapi

 fs/xfs/libxfs/xfs_bmap.c | 23 +++++++++++++++++++++--
 fs/xfs/libxfs/xfs_bmap.h |  2 +-
 fs/xfs/xfs_iomap.c       | 33 +++++++++++++--------------------
 fs/xfs/xfs_reflink.c     | 29 +++--------------------------
 4 files changed, 38 insertions(+), 49 deletions(-)

-- 
2.7.4


             reply	other threads:[~2016-11-22 13:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 13:00 Brian Foster [this message]
2016-11-22 13:01 ` [PATCH 1/3] xfs: track preallocation separately in xfs_bmapi_reserve_delalloc() Brian Foster
2016-11-22 13:01 ` [PATCH 2/3] xfs: clean up cow fork reservation and tag inodes correctly Brian Foster
2016-11-22 13:01 ` [PATCH 3/3] xfs: pass post-eof speculative prealloc blocks to bmapi Brian Foster
2016-11-28  4:01 ` [PATCH 0/3] clean up speculative preallocation tracking and tagging Dave Chinner

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=1479819662-64416-1-git-send-email-bfoster@redhat.com \
    --to=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;
as well as URLs for NNTP newsgroup(s).