public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: xfs@oss.sgi.com
Subject: [RFC PATCH 0/4] xfs: add support for tracking inodes with post-EOF speculative preallocation
Date: Mon, 27 Aug 2012 15:51:47 -0400	[thread overview]
Message-ID: <1346097111-4476-1-git-send-email-bfoster@redhat.com> (raw)

Hi all,

The following patchset adds support for tracking and clearing inodes with
post-EOF space due to speculative preallocation. The purpose of this work is to
add some flexibility and management control over inodes in this state. The
specific impetus for this work is to support improved quota management in the
glusterfs cluster filesystem. For example, this provides the ability to
potentially free up a significant amount of unwritten space when at or near
EDQUOT (FWIW, I'm also working on a patch to support prealloc throttling near
EDQUOT, but I'm considering that separate). Despite the motivation, this work is
intended to be generic and hopefully useful for other XFS users.

We track inodes with post-EOF space via a new tag in the per-ag inode radix
tree. The tag management, introduced in patch 1, is generally lazy in an
attempt to keep things simple. Patch 2 implements scanning functionality to
locate and potentially trim inodes with post-EOF space. Patch 3 adds a new
ioctl() to extend support to userspace. Patch 4 adds background scanning based
on the existing syncd workqueue. 

This patchset is marked RFC because aside from general review, I have some
questions on the best approach for several bits (marked with 'TODO' comments),
most notably whether we should include new tunables for the background scanning.
Some further testing is warranted, but I suspect that using the syncd default of
30s might be a bit too aggressive for large files.

These patches have been lightly unit tested and run through xfstests. Thoughts
appreciated.

Brian

P.S., Credit to Dave Chinner for early review and guidance on design.

Brian Foster (4):
  xfs: add EOFBLOCKS inode tagging/untagging
  xfs: create function to scan and clear EOFBLOCKS inodes
  xfs: add FREE_EOFBLOCKS ioctl
  xfs: add background scanning to clear EOFBLOCKS inodes

 fs/xfs/xfs_ag.h       |    1 +
 fs/xfs/xfs_fs.h       |   10 ++
 fs/xfs/xfs_inode.h    |    8 ++-
 fs/xfs/xfs_ioctl.c    |   25 +++++
 fs/xfs/xfs_iomap.c    |    7 ++
 fs/xfs/xfs_iops.c     |    3 +
 fs/xfs/xfs_mount.h    |    2 +
 fs/xfs/xfs_quota.h    |    1 +
 fs/xfs/xfs_quotaops.c |    2 +-
 fs/xfs/xfs_sync.c     |  277 +++++++++++++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_sync.h     |    9 ++
 fs/xfs/xfs_trace.h    |    5 +
 fs/xfs/xfs_vnodeops.c |   16 ++-
 fs/xfs/xfs_vnodeops.h |    2 +
 14 files changed, 362 insertions(+), 6 deletions(-)

-- 
1.7.7.6

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2012-08-27 19:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 19:51 Brian Foster [this message]
2012-08-27 19:51 ` [RFC PATCH 1/4] xfs: add EOFBLOCKS inode tagging/untagging Brian Foster
2012-09-03  4:20   ` Dave Chinner
2012-08-27 19:51 ` [RFC PATCH 2/4] xfs: create function to scan and clear EOFBLOCKS inodes Brian Foster
2012-09-03  5:06   ` Dave Chinner
2012-09-04 14:10     ` Brian Foster
2012-09-05  6:42       ` Dave Chinner
2012-09-05 12:22         ` Brian Foster
2012-08-27 19:51 ` [RFC PATCH 3/4] xfs: add FREE_EOFBLOCKS ioctl Brian Foster
2012-09-03  5:17   ` Dave Chinner
2012-09-04 14:10     ` Brian Foster
2012-09-05  6:49       ` Dave Chinner
2012-09-05 12:22         ` Brian Foster
2012-08-27 19:51 ` [RFC PATCH 4/4] xfs: add background scanning to clear EOFBLOCKS inodes Brian Foster
2012-09-03  5:28   ` Dave Chinner
2012-09-04 14:10     ` Brian Foster
2012-09-05  7:00       ` Dave Chinner
2012-09-05 12:22         ` Brian Foster
2012-09-05 23:43           ` 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=1346097111-4476-1-git-send-email-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=xfs@oss.sgi.com \
    /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