Commit 7dd43954 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba

btrfs: use btrfs_finish_ordered_extent to complete compressed writes

Use the btrfs_finish_ordered_extent helper to complete compressed writes
using the bbio->ordered pointer instead of requiring an rbtree lookup
in the otherwise equivalent btrfs_mark_ordered_io_finished called from
btrfs_writepage_endio_finish_ordered.
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.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>
parent 4ba8223d
...@@ -224,13 +224,8 @@ static void btrfs_finish_compressed_write_work(struct work_struct *work) ...@@ -224,13 +224,8 @@ static void btrfs_finish_compressed_write_work(struct work_struct *work)
struct compressed_bio *cb = struct compressed_bio *cb =
container_of(work, struct compressed_bio, write_end_work); container_of(work, struct compressed_bio, write_end_work);
/* btrfs_finish_ordered_extent(cb->bbio.ordered, NULL, cb->start, cb->len,
* Ok, we're the last bio for this extent, step one is to call back cb->bbio.bio.bi_status == BLK_STS_OK);
* into the FS and do all the end_io operations.
*/
btrfs_writepage_endio_finish_ordered(cb->bbio.inode, NULL,
cb->start, cb->start + cb->len - 1,
cb->bbio.bio.bi_status == BLK_STS_OK);
if (cb->writeback) if (cb->writeback)
end_compressed_writeback(cb); end_compressed_writeback(cb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment