On Sat 08-12-12 07:02:03, Christoph Hellwig wrote: > On Thu, Dec 06, 2012 at 08:05:37PM +0100, Jan Kara wrote: > > I like this, but this patch already breaks ext4, doesn't it? > > > ^^^ Here ext4 offloads IO completion to a worker thread. So you now > > complete AIO / DIO before ext4_end_io() runs which is a bug (ext4_end_io() > > is responsible for example for calling end_page_writeback()). I'll modify > > these patches to work for ext4 tomorrow I hope... > > You're right, patch 2 actively deadlocks ext4 under xfstests, but the > first one already breaks semantics. So any rework of the ext4 unwritten > extent handling really should go before these two patches. Just to let you know, I didn't forget about this. I even have patches to change PageWriteback handling in ext4 but I realized it can cause deadlocks. When converting unwritten extents to written ones, we need to start a transaction, that may block because of lack of journal space waiting for currently running transaction to finish. And that running transaction never finishes because someone (e.g. ext4_write_begin()) has a handle to it waiting for PageWriteback bit (e.g. in grab_cache_page_write_begin()). I'm pondering how we could fix this in ext4 because I'd really like to get rid of that PageWriteback handling oddity in ext4. Just it's not simple... Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- 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