mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
xfs: Replace &rtg->rtg_group with rtg_group()
Use the already existing rtg_group() wrapper instead of directly
accessing the struct xfs_group member in struct xfs_rtgroup.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
[cem: Conflict resolution against 06873dbd94]
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
a49b7ff63f
commit
4ad85e633b
|
|
@ -78,7 +78,7 @@ xfs_zone_account_reclaimable(
|
|||
struct xfs_rtgroup *rtg,
|
||||
uint32_t freed)
|
||||
{
|
||||
struct xfs_group *xg = &rtg->rtg_group;
|
||||
struct xfs_group *xg = rtg_group(rtg);
|
||||
struct xfs_mount *mp = rtg_mount(rtg);
|
||||
struct xfs_zone_info *zi = mp->m_zone_info;
|
||||
uint32_t used = rtg_rmap(rtg)->i_used_blocks;
|
||||
|
|
@ -759,7 +759,7 @@ xfs_zone_alloc_blocks(
|
|||
|
||||
trace_xfs_zone_alloc_blocks(oz, allocated, count_fsb);
|
||||
|
||||
*sector = xfs_gbno_to_daddr(&rtg->rtg_group, 0);
|
||||
*sector = xfs_gbno_to_daddr(rtg_group(rtg), 0);
|
||||
*is_seq = bdev_zone_is_seq(mp->m_rtdev_targp->bt_bdev, *sector);
|
||||
if (!*is_seq)
|
||||
*sector += XFS_FSB_TO_BB(mp, allocated);
|
||||
|
|
@ -1080,7 +1080,7 @@ xfs_init_zone(
|
|||
if (write_pointer == 0) {
|
||||
/* zone is empty */
|
||||
atomic_inc(&zi->zi_nr_free_zones);
|
||||
xfs_group_set_mark(&rtg->rtg_group, XFS_RTG_FREE);
|
||||
xfs_group_set_mark(rtg_group(rtg), XFS_RTG_FREE);
|
||||
iz->available += rtg_blocks(rtg);
|
||||
} else if (write_pointer < rtg_blocks(rtg)) {
|
||||
/* zone is open */
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ xfs_zone_gc_alloc_blocks(
|
|||
if (!*count_fsb)
|
||||
return NULL;
|
||||
|
||||
*daddr = xfs_gbno_to_daddr(&oz->oz_rtg->rtg_group, 0);
|
||||
*daddr = xfs_gbno_to_daddr(rtg_group(oz->oz_rtg), 0);
|
||||
*is_seq = bdev_zone_is_seq(mp->m_rtdev_targp->bt_bdev, *daddr);
|
||||
if (!*is_seq)
|
||||
*daddr += XFS_FSB_TO_BB(mp, oz->oz_allocated);
|
||||
|
|
@ -702,7 +702,7 @@ xfs_zone_gc_start_chunk(
|
|||
chunk->data = data;
|
||||
chunk->oz = oz;
|
||||
chunk->victim_rtg = iter->victim_rtg;
|
||||
atomic_inc(&chunk->victim_rtg->rtg_group.xg_active_ref);
|
||||
atomic_inc(&rtg_group(chunk->victim_rtg)->xg_active_ref);
|
||||
atomic_inc(&chunk->victim_rtg->rtg_gccount);
|
||||
|
||||
bio->bi_iter.bi_sector = xfs_rtb_to_daddr(mp, chunk->old_startblock);
|
||||
|
|
@ -788,7 +788,7 @@ xfs_zone_gc_split_write(
|
|||
atomic_inc(&chunk->oz->oz_ref);
|
||||
|
||||
split_chunk->victim_rtg = chunk->victim_rtg;
|
||||
atomic_inc(&chunk->victim_rtg->rtg_group.xg_active_ref);
|
||||
atomic_inc(&rtg_group(chunk->victim_rtg)->xg_active_ref);
|
||||
atomic_inc(&chunk->victim_rtg->rtg_gccount);
|
||||
|
||||
chunk->offset += split_len;
|
||||
|
|
@ -888,7 +888,7 @@ xfs_zone_gc_finish_reset(
|
|||
goto out;
|
||||
}
|
||||
|
||||
xfs_group_set_mark(&rtg->rtg_group, XFS_RTG_FREE);
|
||||
xfs_group_set_mark(rtg_group(rtg), XFS_RTG_FREE);
|
||||
atomic_inc(&zi->zi_nr_free_zones);
|
||||
|
||||
xfs_zoned_add_available(mp, rtg_blocks(rtg));
|
||||
|
|
@ -917,7 +917,7 @@ xfs_submit_zone_reset_bio(
|
|||
|
||||
XFS_STATS_INC(mp, xs_gc_zone_reset_calls);
|
||||
|
||||
bio->bi_iter.bi_sector = xfs_gbno_to_daddr(&rtg->rtg_group, 0);
|
||||
bio->bi_iter.bi_sector = xfs_gbno_to_daddr(rtg_group(rtg), 0);
|
||||
if (!bdev_zone_is_seq(bio->bi_bdev, bio->bi_iter.bi_sector)) {
|
||||
/*
|
||||
* Also use the bio to drive the state machine when neither
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user