• J
    ext4: defer clearing of PageWriteback after extent conversion · b0857d30
    Jan Kara 提交于
    Currently PageWriteback bit gets cleared from put_io_page() called
    from ext4_end_bio().  This is somewhat inconvenient as extent tree is
    not fully updated at that time (unwritten extents are not marked as
    written) so we cannot read the data back yet.  This design was
    dictated by lock ordering as we cannot start a transaction while
    PageWriteback bit is set (we could easily deadlock with
    ext4_da_writepages()).  But now that we use transaction reservation
    for extent conversion, locking issues are solved and we can move
    PageWriteback bit clearing after extent conversion is done.  As a
    result we can remove wait for unwritten extent conversion from
    ext4_sync_file() because it already implicitely happens through
    wait_on_page_writeback().
    
    We implement deferring of PageWriteback clearing by queueing completed
    bios to appropriate io_end and processing all the pages when io_end is
    going to be freed instead of at the moment ext4_io_end() is called.
    Reviewed-by: NZheng Liu <wenqing.lz@taobao.com>
    Signed-off-by: NJan Kara <jack@suse.cz>
    Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
    b0857d30
ext4.h 96.9 KB