]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't take a bio_counter reference for cloned bios
authorChristoph Hellwig <hch@lst.de>
Sat, 6 Aug 2022 08:03:23 +0000 (10:03 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:27:58 +0000 (12:27 +0200)
commit2bbc72f14f19031bdb26ba7854f4fc888c492e64
tree6fbbe6a606e2e0d2da0ba6bd573f1769d525bef4
parent6b42f5e3439d64a725e022ef1711dd00981e68a9
btrfs: don't take a bio_counter reference for cloned bios

Stop grabbing an extra bio_counter reference for each clone bio in a
mirrored write and instead just release the one original reference in
btrfs_end_bioc once all the bios for a single btrfs_bio have completed
instead of at the end of btrfs_submit_bio once all bios have been
submitted.

This means the reference is now carried by the "upper" btrfs_bio only
instead of each lower bio.

Also remove the now unused btrfs_bio_counter_inc_noblocked helper.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/dev-replace.c
fs/btrfs/volumes.c