]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't use btrfs_bio_wq_end_io for compressed writes
authorChristoph Hellwig <hch@lst.de>
Thu, 26 May 2022 07:36:38 +0000 (09:36 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:33 +0000 (17:45 +0200)
commit812c21f0891ca9d2d47045beea4dc42562a37084
treea20935c121267f7d62b18d49dc52f07dd2af484e
parent9b5ef4e7dec7cc71e53e56a63708ee88328f650f
btrfs: don't use btrfs_bio_wq_end_io for compressed writes

Compressed write bio completion is the only user of btrfs_bio_wq_end_io
for writes, and the use of btrfs_bio_wq_end_io is a little suboptimal
here as we only real need user context for the final completion of a
compressed_bio structure, and not every single bio completion.

Add a work_struct to struct compressed_bio instead and use that to call
finish_compressed_bio_write.  This allows to remove all handling of
write bios in the btrfs_bio_wq_end_io infrastructure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/compression.h
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/super.c