File tree Expand file tree Collapse file tree 6 files changed +11
-23
lines changed Expand file tree Collapse file tree 6 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -324,21 +324,17 @@ xfs_bmap_update_get_group(
324
324
struct xfs_mount * mp ,
325
325
struct xfs_bmap_intent * bi )
326
326
{
327
- xfs_agnumber_t agno ;
328
-
329
327
if (xfs_ifork_is_realtime (bi -> bi_owner , bi -> bi_whichfork ))
330
328
return ;
331
329
332
- agno = XFS_FSB_TO_AGNO (mp , bi -> bi_bmap .br_startblock );
333
-
334
330
/*
335
331
* Bump the intent count on behalf of the deferred rmap and refcount
336
332
* intent items that that we can queue when we finish this bmap work.
337
333
* This new intent item will bump the intent count before the bmap
338
334
* intent drops the intent count, ensuring that the intent count
339
335
* remains nonzero across the transaction roll.
340
336
*/
341
- bi -> bi_pag = xfs_perag_intent_get (mp , agno );
337
+ bi -> bi_pag = xfs_perag_intent_get (mp , bi -> bi_bmap . br_startblock );
342
338
}
343
339
344
340
/* Add this deferred BUI to the transaction. */
Original file line number Diff line number Diff line change @@ -94,17 +94,17 @@ static inline int xfs_defer_drain_wait(struct xfs_defer_drain *dr)
94
94
}
95
95
96
96
/*
97
- * Get a passive reference to an AG and declare an intent to update its
98
- * metadata.
97
+ * Get a passive reference to the AG that contains a fsbno and declare an intent
98
+ * to update its metadata.
99
99
*/
100
100
struct xfs_perag *
101
101
xfs_perag_intent_get (
102
102
struct xfs_mount * mp ,
103
- xfs_agnumber_t agno )
103
+ xfs_fsblock_t fsbno )
104
104
{
105
105
struct xfs_perag * pag ;
106
106
107
- pag = xfs_perag_get (mp , agno );
107
+ pag = xfs_perag_get (mp , XFS_FSB_TO_AGNO ( mp , fsbno ) );
108
108
if (!pag )
109
109
return NULL ;
110
110
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ void xfs_drain_wait_enable(void);
62
62
* until the item is finished or cancelled.
63
63
*/
64
64
struct xfs_perag * xfs_perag_intent_get (struct xfs_mount * mp ,
65
- xfs_agnumber_t agno );
65
+ xfs_fsblock_t fsbno );
66
66
void xfs_perag_intent_put (struct xfs_perag * pag );
67
67
68
68
void xfs_perag_intent_hold (struct xfs_perag * pag );
@@ -76,7 +76,8 @@ struct xfs_defer_drain { /* empty */ };
76
76
#define xfs_defer_drain_free (dr ) ((void)0)
77
77
#define xfs_defer_drain_init (dr ) ((void)0)
78
78
79
- #define xfs_perag_intent_get (mp , agno ) xfs_perag_get((mp), (agno))
79
+ #define xfs_perag_intent_get (mp , fsbno ) \
80
+ xfs_perag_get((mp), XFS_FSB_TO_AGNO(mp, fsbno))
80
81
#define xfs_perag_intent_put (pag ) xfs_perag_put(pag)
81
82
82
83
static inline void xfs_perag_intent_hold (struct xfs_perag * pag ) { }
Original file line number Diff line number Diff line change @@ -424,10 +424,7 @@ xfs_extent_free_get_group(
424
424
struct xfs_mount * mp ,
425
425
struct xfs_extent_free_item * xefi )
426
426
{
427
- xfs_agnumber_t agno ;
428
-
429
- agno = XFS_FSB_TO_AGNO (mp , xefi -> xefi_startblock );
430
- xefi -> xefi_pag = xfs_perag_intent_get (mp , agno );
427
+ xefi -> xefi_pag = xfs_perag_intent_get (mp , xefi -> xefi_startblock );
431
428
}
432
429
433
430
/* Release a passive AG ref after some freeing work. */
Original file line number Diff line number Diff line change @@ -330,10 +330,7 @@ xfs_refcount_update_get_group(
330
330
struct xfs_mount * mp ,
331
331
struct xfs_refcount_intent * ri )
332
332
{
333
- xfs_agnumber_t agno ;
334
-
335
- agno = XFS_FSB_TO_AGNO (mp , ri -> ri_startblock );
336
- ri -> ri_pag = xfs_perag_intent_get (mp , agno );
333
+ ri -> ri_pag = xfs_perag_intent_get (mp , ri -> ri_startblock );
337
334
}
338
335
339
336
/* Release a passive AG ref after finishing refcounting work. */
Original file line number Diff line number Diff line change @@ -356,10 +356,7 @@ xfs_rmap_update_get_group(
356
356
struct xfs_mount * mp ,
357
357
struct xfs_rmap_intent * ri )
358
358
{
359
- xfs_agnumber_t agno ;
360
-
361
- agno = XFS_FSB_TO_AGNO (mp , ri -> ri_bmap .br_startblock );
362
- ri -> ri_pag = xfs_perag_intent_get (mp , agno );
359
+ ri -> ri_pag = xfs_perag_intent_get (mp , ri -> ri_bmap .br_startblock );
363
360
}
364
361
365
362
/* Release a passive AG ref after finishing rmapping work. */
You can’t perform that action at this time.
0 commit comments