linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: guaneryu@gmail.com, linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 4/4] populate: punch files after writing to fragment free space properly
Date: Wed, 9 Oct 2019 11:02:32 -0700	[thread overview]
Message-ID: <20191009180232.GF13097@magnolia> (raw)
In-Reply-To: <20191009070353.GB24658@infradead.org>

On Wed, Oct 09, 2019 at 12:03:53AM -0700, Christoph Hellwig wrote:
> On Mon, Oct 07, 2019 at 06:03:29PM -0700, Darrick J. Wong wrote:
> > To fix this, we need to force the filesystem to allocate all blocks
> > before freeing any blocks.  Split the creation of swiss-cheese files
> > into two parts: (a) writing data to the file to force allocation, and
> > (b) punching the holes to fragment free space.  It's a little hokey for
> > helpers to be modifying variables in the caller's scope, but there's not
> > really a better way to do that in bash.
> 
> Why can't we just split the operations into creating a large contigous
> file and then fragment them?
> 
> 
> create_large_file foo
> create_large_file bar
> create_large_file baz
> 
> fragment_large_file foo
> fragment_large_file bar
> fragment_large_file baz


Yeah, that would also work, and without the clumsy side effects.  I'll
do that instead.

--D

  reply	other threads:[~2019-10-09 18:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08  1:03 [PATCH 0/4] fstests: random fixes Darrick J. Wong
2019-10-08  1:03 ` [PATCH 1/4] xfs/196: check for delalloc blocks after pwrite Darrick J. Wong
2019-10-08  7:01   ` Christoph Hellwig
2019-10-08  1:03 ` [PATCH 2/4] xfs/{088, 089, 091}: redirect stderr when writing to corrupt fs Darrick J. Wong
2019-10-08  7:01   ` Christoph Hellwig
2019-10-08  1:03 ` [PATCH 3/4] xfs/263: use _scratch_mkfs_xfs instead of open-coded mkfs call Darrick J. Wong
2019-10-08  7:02   ` Christoph Hellwig
2019-10-08  1:03 ` [PATCH 4/4] populate: punch files after writing to fragment free space properly Darrick J. Wong
2019-10-09  7:03   ` Christoph Hellwig
2019-10-09 18:02     ` Darrick J. Wong [this message]
2019-10-09 18:18   ` [PATCH v2 " Darrick J. Wong
2019-10-11  7:52     ` Christoph Hellwig

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=20191009180232.GF13097@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=hch@infradead.org \
    --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).