btrfs: remove the unused endio_raid56_workers and btrfs_raid_bio::end_io_work
authorQu Wenruo <wqu@suse.com>
Tue, 1 Nov 2022 11:16:12 +0000 (19:16 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:49 +0000 (18:00 +0100)
Since we have switched all raid56 workload to submit-and-wait method,
there is no use for btrfs_fs_info::endio_raid56_workers workqueue and
btrfs_raid_bio::end_io_work.

Remove them to save some memory.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/fs.h
fs/btrfs/raid56.h

index f5f793a..e5687bd 100644 (file)
@@ -2097,8 +2097,6 @@ static void btrfs_stop_all_workers(struct btrfs_fs_info *fs_info)
        btrfs_destroy_workqueue(fs_info->workers);
        if (fs_info->endio_workers)
                destroy_workqueue(fs_info->endio_workers);
-       if (fs_info->endio_raid56_workers)
-               destroy_workqueue(fs_info->endio_raid56_workers);
        if (fs_info->rmw_workers)
                destroy_workqueue(fs_info->rmw_workers);
        if (fs_info->compressed_write_workers)
@@ -2304,8 +2302,6 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info)
                alloc_workqueue("btrfs-endio", flags, max_active);
        fs_info->endio_meta_workers =
                alloc_workqueue("btrfs-endio-meta", flags, max_active);
-       fs_info->endio_raid56_workers =
-               alloc_workqueue("btrfs-endio-raid56", flags, max_active);
        fs_info->rmw_workers = alloc_workqueue("btrfs-rmw", flags, max_active);
        fs_info->endio_write_workers =
                btrfs_alloc_workqueue(fs_info, "endio-write", flags,
@@ -2327,7 +2323,7 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info)
              fs_info->delalloc_workers && fs_info->flush_workers &&
              fs_info->endio_workers && fs_info->endio_meta_workers &&
              fs_info->compressed_write_workers &&
-             fs_info->endio_write_workers && fs_info->endio_raid56_workers &&
+             fs_info->endio_write_workers &&
              fs_info->endio_freespace_worker && fs_info->rmw_workers &&
              fs_info->caching_workers && fs_info->fixup_workers &&
              fs_info->delayed_workers && fs_info->qgroup_rescan_workers &&
index c7f2a51..a749367 100644 (file)
@@ -532,7 +532,6 @@ struct btrfs_fs_info {
        struct btrfs_workqueue *flush_workers;
        struct workqueue_struct *endio_workers;
        struct workqueue_struct *endio_meta_workers;
-       struct workqueue_struct *endio_raid56_workers;
        struct workqueue_struct *rmw_workers;
        struct workqueue_struct *compressed_write_workers;
        struct btrfs_workqueue *endio_write_workers;
index 445e833..9fae97b 100644 (file)
@@ -97,8 +97,6 @@ struct btrfs_raid_bio {
 
        wait_queue_head_t io_wait;
 
-       struct work_struct end_io_work;
-
        /* Bitmap to record which horizontal stripe has data */
        unsigned long dbitmap;