@@ -162,7 +162,6 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio);
162
162
static noinline void finish_rmw (struct btrfs_raid_bio * rbio );
163
163
static void rmw_work (struct btrfs_work * work );
164
164
static void read_rebuild_work (struct btrfs_work * work );
165
- static void async_read_rebuild (struct btrfs_raid_bio * rbio );
166
165
static int fail_bio_stripe (struct btrfs_raid_bio * rbio , struct bio * bio );
167
166
static int fail_rbio_index (struct btrfs_raid_bio * rbio , int failed );
168
167
static void __free_raid_bio (struct btrfs_raid_bio * rbio );
@@ -804,10 +803,10 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
804
803
spin_unlock_irqrestore (& h -> lock , flags );
805
804
806
805
if (next -> operation == BTRFS_RBIO_READ_REBUILD )
807
- async_read_rebuild (next );
806
+ start_async_work (next , read_rebuild_work );
808
807
else if (next -> operation == BTRFS_RBIO_REBUILD_MISSING ) {
809
808
steal_rbio (rbio , next );
810
- async_read_rebuild (next );
809
+ start_async_work (next , read_rebuild_work );
811
810
} else if (next -> operation == BTRFS_RBIO_WRITE ) {
812
811
steal_rbio (rbio , next );
813
812
start_async_work (next , rmw_work );
@@ -1500,14 +1499,6 @@ static void raid_rmw_end_io(struct bio *bio)
1500
1499
rbio_orig_end_io (rbio , BLK_STS_IOERR );
1501
1500
}
1502
1501
1503
- static void async_read_rebuild (struct btrfs_raid_bio * rbio )
1504
- {
1505
- btrfs_init_work (& rbio -> work , btrfs_rmw_helper ,
1506
- read_rebuild_work , NULL , NULL );
1507
-
1508
- btrfs_queue_work (rbio -> fs_info -> rmw_workers , & rbio -> work );
1509
- }
1510
-
1511
1502
/*
1512
1503
* the stripe must be locked by the caller. It will
1513
1504
* unlock after all the writes are done
@@ -2765,5 +2756,5 @@ raid56_alloc_missing_rbio(struct btrfs_fs_info *fs_info, struct bio *bio,
2765
2756
void raid56_submit_missing_rbio (struct btrfs_raid_bio * rbio )
2766
2757
{
2767
2758
if (!lock_stripe_add (rbio ))
2768
- async_read_rebuild (rbio );
2759
+ start_async_work (rbio , read_rebuild_work );
2769
2760
}
0 commit comments