Messages in this thread | | | Date | Thu, 13 May 2004 21:49:22 -0700 | From | Andrew Morton <> | Subject | Re: [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/
| |