@@ -170,7 +170,7 @@ static int alloc_rbio_pages(struct btrfs_raid_bio *rbio);
170
170
171
171
static noinline void finish_parity_scrub (struct btrfs_raid_bio * rbio ,
172
172
int need_check );
173
- static void async_scrub_parity (struct btrfs_raid_bio * rbio );
173
+ static void scrub_parity_work (struct btrfs_work * work );
174
174
175
175
static void start_async_work (struct btrfs_raid_bio * rbio , btrfs_func_t work_func )
176
176
{
@@ -812,7 +812,7 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
812
812
start_async_work (next , rmw_work );
813
813
} else if (next -> operation == BTRFS_RBIO_PARITY_SCRUB ) {
814
814
steal_rbio (rbio , next );
815
- async_scrub_parity (next );
815
+ start_async_work (next , scrub_parity_work );
816
816
}
817
817
818
818
goto done_nolock ;
@@ -2703,18 +2703,10 @@ static void scrub_parity_work(struct btrfs_work *work)
2703
2703
raid56_parity_scrub_stripe (rbio );
2704
2704
}
2705
2705
2706
- static void async_scrub_parity (struct btrfs_raid_bio * rbio )
2707
- {
2708
- btrfs_init_work (& rbio -> work , btrfs_rmw_helper ,
2709
- scrub_parity_work , NULL , NULL );
2710
-
2711
- btrfs_queue_work (rbio -> fs_info -> rmw_workers , & rbio -> work );
2712
- }
2713
-
2714
2706
void raid56_parity_submit_scrub_rbio (struct btrfs_raid_bio * rbio )
2715
2707
{
2716
2708
if (!lock_stripe_add (rbio ))
2717
- async_scrub_parity (rbio );
2709
+ start_async_work (rbio , scrub_parity_work );
2718
2710
}
2719
2711
2720
2712
/* The following code is used for dev replace of a missing RAID 5/6 device. */
0 commit comments