> On Mon, Mar 16, 2009 at 11:19:58PM -0400, Theodore Ts'o wrote: > > Add an ext3 bug-for-bug compatible analogue for data=ordered mode. In > > this mode, we force all delayed allocation blocks involved with the > > to-be-commited transaction to be allocated, and then flushed out to > > disk before the transaction is commited. > > > > Wouldn't this cause a deadlock ? We want to commit a transaction because > we don't have enough journal space (via journal_start) and now that would cause block > allocation which would do another journal_start() Yes, that's exactly what I think. We cannot start a transaction while committing another transaction. Also you must put the block allocation into the transaction you're going to commit because of data consistency guarantees. So if you want to do "alloc on commit" you have to reserve enough credits to the running transaction at the "block reservation" time and then use them for allocation at commit time. But this gets complex because the number of needed credits is hard to estimate (we don't know how many bitmaps / group descriptors we're going to modify). I'm not yet sure how to solve this problem... Honza -- Jan Kara <jack@xxxxxxx> SuSE CR Labs -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html