diff options
author | Christoph Hellwig <hch@lst.de> | 2022-05-26 09:36:36 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-07-25 17:45:33 +0200 |
commit | d34e123de1e66061051cd19e61b62fad6027fc4a (patch) | |
tree | af2ad6021df114983c803b53583755f1c32aadda /fs/btrfs/raid56.h | |
parent | btrfs: split btrfs_submit_data_bio to read and write parts (diff) | |
download | linux-d34e123de1e66061051cd19e61b62fad6027fc4a.tar.xz linux-d34e123de1e66061051cd19e61b62fad6027fc4a.zip |
btrfs: defer I/O completion based on the btrfs_raid_bio
Instead of attaching an extra allocation an indirect call to each
low-level bio issued by the RAID code, add a work_struct to struct
btrfs_raid_bio and only defer the per-rbio completion action. The
per-bio action for all the I/Os are trivial and can be safely done
from interrupt context.
As a nice side effect this also allows sharing the boilerplate code
for the per-bio completions
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid56.h')
-rw-r--r-- | fs/btrfs/raid56.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/raid56.h b/fs/btrfs/raid56.h index 3badde24dcbf..3b22657ca857 100644 --- a/fs/btrfs/raid56.h +++ b/fs/btrfs/raid56.h @@ -100,6 +100,8 @@ struct btrfs_raid_bio { atomic_t error; + struct work_struct end_io_work; + /* Bitmap to record which horizontal stripe has data */ unsigned long dbitmap; |