• F
    btrfs: release old extent maps during page release · fbc2bd7e
    Filipe Manana 提交于
    When removing an extent map at try_release_extent_mapping(), called through
    the page release callback (btrfs_releasepage()), we never release an extent
    map that is in the list of modified extents. This is to prevent races with
    a concurrent fsync using the fast path, which could lead to not logging an
    extent created in the current transaction.
    
    However we can safely remove an extent map created in a past transaction
    that is still in the list of modified extents (because no one fsynced yet
    the inode after that transaction got commited), because such extents are
    skipped during an fsync as it is pointless to log them. This change does
    that.
    Signed-off-by: NFilipe Manana <fdmanana@suse.com>
    Signed-off-by: NDavid Sterba <dsterba@suse.com>
    fbc2bd7e
extent_io.c 157.4 KB