All of lore.kernel.org
 help / color / mirror / Atom feed
From: tytso@mit.edu
To: Jan Kara <jack@suse.cz>
Cc: Eric Sandeen <sandeen@redhat.com>,
	ext4 development <linux-ext4@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org, Jens Axboe <jens.axboe@oracle.com>
Subject: Re: [PATCH 2/2] ext4: flush delalloc blocks when space is low
Date: Wed, 23 Dec 2009 08:01:20 -0500	[thread overview]
Message-ID: <20091223130120.GG21594@thunk.org> (raw)
In-Reply-To: <20091216204602.GC28425@atrey.karlin.mff.cuni.cz>

On Wed, Dec 16, 2009 at 09:46:02PM +0100, Jan Kara wrote:
> > Creating many small files in rapid succession on a small
> > filesystem can lead to spurious ENOSPC; on a 104MB filesystem:
> > 
> > for i in `seq 1 22500`; do
> >     echo -n > $SCRATCH_MNT/$i
> >     echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i
> > done
> > 
> > leads to ENOSPC even though after a sync, 40% of the fs is free
> > again.
> > 
> > This is because we reserve worst-case metadata for delalloc writes,
> > and when data is allocated that worst-case reservation is not
> > usually needed.
> > 
> > When freespace is low, kicking off an async writeback will start
> > converting that worst-case space usage into something more realistic,
> > almost always freeing up space to continue.
> > 
> > This resolves the testcase for me, and survives all 4 generic
> > ENOSPC tests in xfstests.
> > 
> > We'll still need a hard synchronous sync to squeeze out the last bit,
> > but this fixes things up to a large degree.
> > 
> > Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Thanks, added to the ext4 patch queue.

						- Ted

      reply	other threads:[~2009-12-23 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 23:07 [PATCH 2/2] ext4: flush delalloc blocks when space is low Eric Sandeen
2009-12-16 20:46 ` Jan Kara
2009-12-23 13:01   ` tytso [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=20091223130120.GG21594@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sandeen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.