Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xfs: remove xfs_zone_gc_space_available

xfs_zone_gc_space_available only has one caller left, so fold it into
that. Reorder the checks so that the cheaper scratch_available check
is done first.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>

authored by

Christoph Hellwig and committed by
Carlos Maiolino
7da4ebea c17a1c03

+7 -14
+7 -14
fs/xfs/xfs_zone_gc.c
··· 578 578 return oz; 579 579 } 580 580 581 - static bool 582 - xfs_zone_gc_space_available( 583 - struct xfs_zone_gc_data *data) 584 - { 585 - struct xfs_open_zone *oz; 586 - 587 - oz = xfs_zone_gc_ensure_target(data->mp); 588 - if (!oz) 589 - return false; 590 - return oz->oz_allocated < rtg_blocks(oz->oz_rtg) && 591 - data->scratch_available; 592 - } 593 - 594 581 static void 595 582 xfs_zone_gc_end_io( 596 583 struct bio *bio) ··· 976 989 xfs_zone_gc_should_start_new_work( 977 990 struct xfs_zone_gc_data *data) 978 991 { 992 + struct xfs_open_zone *oz; 993 + 979 994 if (xfs_is_shutdown(data->mp)) 980 995 return false; 981 - if (!xfs_zone_gc_space_available(data)) 996 + if (!data->scratch_available) 997 + return false; 998 + 999 + oz = xfs_zone_gc_ensure_target(data->mp); 1000 + if (!oz || oz->oz_allocated == rtg_blocks(oz->oz_rtg)) 982 1001 return false; 983 1002 984 1003 if (!data->iter.victim_rtg) {