public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net
Subject: Re: [Ext2-devel] Re: [RFC/RFT] [PATCH] EXT3: Retry allocation after journal commit
Date: Fri, 14 May 2004 00:37:43 -0400	[thread overview]
Message-ID: <20040514043743.GA22593@thunk.org> (raw)
In-Reply-To: <20040513195310.5725fa43.akpm@osdl.org>

On Thu, May 13, 2004 at 07:53:10PM -0700, Andrew Morton wrote:
> "Theodore Ts'o" <tytso@mit.edu> wrote:
> >
> > It is possible for block allocation to fail, even if there is space in
> >  the filesystem, because all of the free blocks were recently deleted and
> >  so could not be allocated until after the currently running transaction
> >  is committed.   This can result in a very strange and surprising result
> >  where a system call such as a mkdir() will fail even though there is
> >  plenty of disk space apparently available.
> 
> I merged a little patch for this into post-2.6.6, but that only addresses
> prepare_write().

Oh, sorry, I didn't see that patch.  The specific bug I was trying to
fix was actually in mkdir though (the regression test suite did the
equivalent of rm -rf /mntpt/*, followed by mkdir's which failed).

I can respin the patch versus BK-latest.

> I wonder if there's much value in having ext3_has_free_blocks()?  We could
> just retry three times even if the fs is really full?

We could; it's an error path, after all.  On the other hand, the cost
of ext3_has_free_blocks() is pretty small, and if we know that there's
no point doing the retry, why not skip the work.

> I'd be inclined to pass a pointer to the `retry' counter into
> ext3_should_retry_alloc() and implement the counting in there.  It'll tidy
> things up a bit and consolidates that piece of policy in a single place.

Yes, good point.

						- Ted

  reply	other threads:[~2004-05-14  4:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14  0:42 [RFC/RFT] [PATCH] EXT3: Retry allocation after journal commit Theodore Ts'o
2004-05-14  2:53 ` Andrew Morton
2004-05-14  4:37   ` Theodore Ts'o [this message]
2004-05-14  4:49     ` [Ext2-devel] " Andrew Morton
2004-05-14 17:48       ` Andreas Dilger
2004-05-14 19:59         ` Theodore Ts'o
2004-05-14 21:06           ` Andreas Dilger
2004-05-15 13:18             ` Theodore Ts'o
2004-05-19 22:04   ` question about ext3_find_goal with reservation Mingming Cao
2004-05-19 22:52     ` Andrew Morton
2004-05-20  1:04       ` [Ext2-devel] " Mingming Cao

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=20040514043743.GA22593@thunk.org \
    --to=tytso@mit.edu \
    --cc=akpm@osdl.org \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-kernel@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