Hello, > On Thu, 2006-04-20 at 10:47 +0200, Jan Kara wrote: > > > I've got no answer but I still think my argument was sound ;) Below > > is a patch also with a verbose comment what it fixes and how. > > Looks good to me, but it complicates the logic for this case and removes > some useful debug checks for conditions which are almost always true. > > Wouldn't it be better and safer just to make those almost-always true > conditions always true? We can do that pretty simply, just by > processing the t_forget list in two passes, always doing the bitmaps > last. (Though this will need care, as the list is potentially moving > under our feet...) > > Actually, scratch that, because journal_unmap_buffer() can return a > buffer to the committing transaction's forget list at any time, so we > really cannot guarantee to do all non-bitmaps first: new non-bitmaps > might arrive after we've started doing the bitmaps. Ugh. Thanks for looking into it. Yes, I agree that keeping that safety check would be nicer. But I was thinking for some time if we cannot somehow make sure that bitmaps are processed last but I didn't come up with anything useful. One possibility might be to do some magic in do_get_write_access() and get_create_access() if we find out we are reallocating buffer on forget list but I'm afraid that simple solutions (e.g. wait for commit) would harm performance which might be even worse... Honza -- Jan Kara <jack@xxxxxxx> SuSE CR Labs - 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