public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Ben Myers <bpm@sgi.com>, xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: xfs_release don't free eofblocks with extsize hint
Date: Tue, 19 Jun 2012 03:48:13 -0400	[thread overview]
Message-ID: <20120619074813.GB30375@infradead.org> (raw)
In-Reply-To: <20120612011102.GJ22848@dastard>

On Tue, Jun 12, 2012 at 11:11:02AM +1000, Dave Chinner wrote:
> Alternatively, (and I think a better solution) is to treat files
> with extent size hints on them exactly the same as files with
> preallocation on them. i.e. in xfs_set_diflags() we set
> XFS_DIFLAG_PREALLOC at the same time we set the XFS_DIFLAG_EXTSIZE,
> and then all our truncate logic just works as expected for
> physical preallocation beyond EOF on extsize hint files without
> changing anything else....

I think that is a much better approach.  The user explicitly asked to
do allocation in the specified unit, so we should not truncate it down.

On something slightly related:  Currently the calls to
xfs_free_eofblocks in xfs_release and in xfs_inactive are guarded by
similar but not quite the same checks on the inode type/flags/allocated
blocks, etc.  It would be really good to factor the common parts into
a helper, and then document why the other checks need to be different.

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

      reply	other threads:[~2012-06-19  7:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 19:29 [PATCH] xfs: xfs_release don't free eofblocks with extsize hint Ben Myers
2012-06-12  1:11 ` Dave Chinner
2012-06-19  7:48   ` Christoph Hellwig [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=20120619074813.GB30375@infradead.org \
    --to=hch@infradead.org \
    --cc=bpm@sgi.com \
    --cc=david@fromorbit.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