On Mon, May 08, 2006 at 11:51:34AM +0100, Stephen C. Tweedie wrote: > On Fri, 2006-05-05 at 10:41 -0600, Andreas Dilger wrote: > > > There is another mechanism ext3 could potentially use, wherein it > > walks the whole inode in advance of the truncate and creates a > > (potentially) very large transaction handle to do the bitmap updates > > in a single shot (and also reducing the amount of IO needed for an > > unlink by 96%), but nobody has ever cared enough about it to work on > > implementing this. > > Trouble is, there's no guarantee that that transaction would actually > fit into the journal. Most of the time it will, but if it doesn't, then > we deadlock or risk data corruption. The only way to do this would be to figure out how how much space is needed in advance, see if there's enough room, and if there isn't, to fall back the current strategy of doing a partial truncate. A lot of complexity to speed up unlink and make it possible to recover from unlinked files, but it's doable. No one with the skills to implement it has stepped up to date, however. :-) - Ted - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html