@@ -158,7 +158,7 @@ struct xfs_getfsmap_info {
158
158
struct xfs_fsmap_head * head ;
159
159
struct fsmap * fsmap_recs ; /* mapping records */
160
160
struct xfs_buf * agf_bp ; /* AGF, for refcount queries */
161
- struct xfs_perag * pag ; /* AG info, if applicable */
161
+ struct xfs_group * group ; /* group info, if applicable */
162
162
xfs_daddr_t next_daddr ; /* next daddr we expect */
163
163
/* daddr of low fsmap key when we're using the rtbitmap */
164
164
xfs_daddr_t low_daddr ;
@@ -216,12 +216,13 @@ xfs_getfsmap_is_shared(
216
216
if (!xfs_has_reflink (mp ))
217
217
return 0 ;
218
218
/* rt files will have no perag structure */
219
- if (!info -> pag )
219
+ if (!info -> group )
220
220
return 0 ;
221
221
222
222
/* Are there any shared blocks here? */
223
223
flen = 0 ;
224
- cur = xfs_refcountbt_init_cursor (mp , tp , info -> agf_bp , info -> pag );
224
+ cur = xfs_refcountbt_init_cursor (mp , tp , info -> agf_bp ,
225
+ to_perag (info -> group ));
225
226
226
227
error = xfs_refcount_find_shared (cur , rec -> rm_startblock ,
227
228
rec -> rm_blockcount , & fbno , & flen , false);
@@ -353,7 +354,8 @@ xfs_getfsmap_helper(
353
354
return - ECANCELED ;
354
355
355
356
trace_xfs_fsmap_mapping (mp , info -> dev ,
356
- info -> pag ? pag_agno (info -> pag ) : NULLAGNUMBER , rec );
357
+ info -> group ? info -> group -> xg_gno : NULLAGNUMBER ,
358
+ rec );
357
359
358
360
fmr .fmr_device = info -> dev ;
359
361
fmr .fmr_physical = rec_daddr ;
@@ -519,7 +521,7 @@ __xfs_getfsmap_datadev(
519
521
* Set the AG high key from the fsmap high key if this
520
522
* is the last AG that we're querying.
521
523
*/
522
- info -> pag = pag ;
524
+ info -> group = pag_group ( pag ) ;
523
525
if (pag_agno (pag ) == end_ag ) {
524
526
info -> high .rm_startblock = XFS_FSB_TO_AGBNO (mp ,
525
527
end_fsb );
@@ -569,7 +571,7 @@ __xfs_getfsmap_datadev(
569
571
if (error )
570
572
break ;
571
573
}
572
- info -> pag = NULL ;
574
+ info -> group = NULL ;
573
575
}
574
576
575
577
if (bt_cur )
@@ -579,9 +581,9 @@ __xfs_getfsmap_datadev(
579
581
xfs_trans_brelse (tp , info -> agf_bp );
580
582
info -> agf_bp = NULL ;
581
583
}
582
- if (info -> pag ) {
583
- xfs_perag_rele (info -> pag );
584
- info -> pag = NULL ;
584
+ if (info -> group ) {
585
+ xfs_perag_rele (pag );
586
+ info -> group = NULL ;
585
587
} else if (pag ) {
586
588
/* loop termination case */
587
589
xfs_perag_rele (pag );
@@ -604,7 +606,7 @@ xfs_getfsmap_datadev_rmapbt_query(
604
606
605
607
/* Allocate cursor for this AG and query_range it. */
606
608
* curpp = xfs_rmapbt_init_cursor (tp -> t_mountp , tp , info -> agf_bp ,
607
- info -> pag );
609
+ to_perag ( info -> group ) );
608
610
return xfs_rmap_query_range (* curpp , & info -> low , & info -> high ,
609
611
xfs_getfsmap_datadev_helper , info );
610
612
}
@@ -637,7 +639,7 @@ xfs_getfsmap_datadev_bnobt_query(
637
639
638
640
/* Allocate cursor for this AG and query_range it. */
639
641
* curpp = xfs_bnobt_init_cursor (tp -> t_mountp , tp , info -> agf_bp ,
640
- info -> pag );
642
+ to_perag ( info -> group ) );
641
643
key -> ar_startblock = info -> low .rm_startblock ;
642
644
key [1 ].ar_startblock = info -> high .rm_startblock ;
643
645
return xfs_alloc_query_range (* curpp , key , & key [1 ],
@@ -997,7 +999,7 @@ xfs_getfsmap(
997
999
998
1000
info .dev = handlers [i ].dev ;
999
1001
info .last = false;
1000
- info .pag = NULL ;
1002
+ info .group = NULL ;
1001
1003
info .low_daddr = XFS_BUF_DADDR_NULL ;
1002
1004
info .low .rm_blockcount = 0 ;
1003
1005
error = handlers [i ].fn (tp , dkeys , & info );
0 commit comments