• Christoph Hellwig's avatar
    btrfs: simplify the btrfs_csum_one_bio calling convention · f8c44673
    Christoph Hellwig authored
    To prepare for further bio submission changes btrfs_csum_one_bio
    should be able to take all it's arguments from the btrfs_bio structure.
    It can always use the bbio->inode already, and once the compression code
    is updated to set ->file_offset that one can be used unconditionally
    as well instead of looking at the page mapping now that btrfs doesn't
    allow ordered extents to span discontiguous data ranges.
    
    The only slightly tricky bit is the one_ordered flag set by the
    compressed writes.  Replace that one with the driver private bio
    flag, which gets cleared before the bio is handed off to the block layer
    so that we don't get in the way of driver use.
    
    Note: this leaves an argument and a flag to btrfs_wq_submit_bio unused.
    But that whole mechanism will be removed in its current form in the
    next patch.
    Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    f8c44673
disk-io.c 150 KB