lkml.org 
[lkml]   [2004]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Ext2-devel] Re: [RFC/RFT] [PATCH] EXT3: Retry allocation after journal commit
"Theodore Ts'o" <tytso@mit.edu> wrote:
>
> 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.

Andreas's patch is a bit sneaky: it simply sets ->h_sync on the current
transaction then does journal_stop(). I think your patch can do the same
thing?

again:
handle = ext3_journal_start(...);

...

if (err == -ENOSPC && ext3_should_retry_alloc(inode, handle, &retry)) {
goto again;
} else {
err2 = ext3_journal_stop(handle);
if (!err)
err = err2;
}
return err;

Something like that.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.814 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site