btrfs: handle completed ordered extents in btrfs_split_ordered_extent
authorChristoph Hellwig <hch@lst.de>
Wed, 24 May 2023 15:03:15 +0000 (17:03 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:33 +0000 (13:59 +0200)
commit52b1fdca23ac0fbcad363a1a5b426bf0d56b715a
tree6fd188cbe873d5ba865d684e18802bd39f9c368e
parent816f589b8d43f7c258b0c10a5ce29daf01614651
btrfs: handle completed ordered extents in btrfs_split_ordered_extent

To delay splitting ordered_extents to I/O completion time we need to be
able to handle fully completed ordered extents in
btrfs_split_ordered_extent.  Besides a bit of accounting this primarily
involved moving over the csums to the split bio for the range that it
covers, which is simple enough because we always have one
btrfs_ordered_sum per bio.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ordered-data.c