|
@@ -614,7 +614,7 @@ xfs_bmap_add_extent(
|
|
|
nblks += cur->bc_private.b.allocated;
|
|
|
ASSERT(nblks <= da_old);
|
|
|
if (nblks < da_old)
|
|
|
- xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS,
|
|
|
+ xfs_icsb_modify_counters(ip->i_mount, XFS_SBS_FDBLOCKS,
|
|
|
(int64_t)(da_old - nblks), rsvd);
|
|
|
}
|
|
|
/*
|
|
@@ -1079,7 +1079,8 @@ xfs_bmap_add_extent_delay_real(
|
|
|
diff = (int)(temp + temp2 - startblockval(PREV.br_startblock) -
|
|
|
(cur ? cur->bc_private.b.allocated : 0));
|
|
|
if (diff > 0 &&
|
|
|
- xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) {
|
|
|
+ xfs_icsb_modify_counters(ip->i_mount, XFS_SBS_FDBLOCKS,
|
|
|
+ -((int64_t)diff), rsvd)) {
|
|
|
/*
|
|
|
* Ick gross gag me with a spoon.
|
|
|
*/
|
|
@@ -1089,16 +1090,18 @@ xfs_bmap_add_extent_delay_real(
|
|
|
temp--;
|
|
|
diff--;
|
|
|
if (!diff ||
|
|
|
- !xfs_mod_incore_sb(ip->i_mount,
|
|
|
- XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd))
|
|
|
+ !xfs_icsb_modify_counters(ip->i_mount,
|
|
|
+ XFS_SBS_FDBLOCKS,
|
|
|
+ -((int64_t)diff), rsvd))
|
|
|
break;
|
|
|
}
|
|
|
if (temp2) {
|
|
|
temp2--;
|
|
|
diff--;
|
|
|
if (!diff ||
|
|
|
- !xfs_mod_incore_sb(ip->i_mount,
|
|
|
- XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd))
|
|
|
+ !xfs_icsb_modify_counters(ip->i_mount,
|
|
|
+ XFS_SBS_FDBLOCKS,
|
|
|
+ -((int64_t)diff), rsvd))
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -1766,7 +1769,7 @@ xfs_bmap_add_extent_hole_delay(
|
|
|
}
|
|
|
if (oldlen != newlen) {
|
|
|
ASSERT(oldlen > newlen);
|
|
|
- xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS,
|
|
|
+ xfs_icsb_modify_counters(ip->i_mount, XFS_SBS_FDBLOCKS,
|
|
|
(int64_t)(oldlen - newlen), rsvd);
|
|
|
/*
|
|
|
* Nothing to do for disk quota accounting here.
|
|
@@ -3111,9 +3114,10 @@ xfs_bmap_del_extent(
|
|
|
* Nothing to do for disk quota accounting here.
|
|
|
*/
|
|
|
ASSERT(da_old >= da_new);
|
|
|
- if (da_old > da_new)
|
|
|
- xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int64_t)(da_old - da_new),
|
|
|
- rsvd);
|
|
|
+ if (da_old > da_new) {
|
|
|
+ xfs_icsb_modify_counters(mp, XFS_SBS_FDBLOCKS,
|
|
|
+ (int64_t)(da_old - da_new), rsvd);
|
|
|
+ }
|
|
|
done:
|
|
|
*logflagsp = flags;
|
|
|
return error;
|
|
@@ -4526,13 +4530,13 @@ xfs_bmapi(
|
|
|
-((int64_t)extsz), (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
} else {
|
|
|
- error = xfs_mod_incore_sb(mp,
|
|
|
+ error = xfs_icsb_modify_counters(mp,
|
|
|
XFS_SBS_FDBLOCKS,
|
|
|
-((int64_t)alen), (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
}
|
|
|
if (!error) {
|
|
|
- error = xfs_mod_incore_sb(mp,
|
|
|
+ error = xfs_icsb_modify_counters(mp,
|
|
|
XFS_SBS_FDBLOCKS,
|
|
|
-((int64_t)indlen), (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
@@ -4542,7 +4546,7 @@ xfs_bmapi(
|
|
|
(int64_t)extsz, (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
else if (error)
|
|
|
- xfs_mod_incore_sb(mp,
|
|
|
+ xfs_icsb_modify_counters(mp,
|
|
|
XFS_SBS_FDBLOCKS,
|
|
|
(int64_t)alen, (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
@@ -5206,7 +5210,7 @@ xfs_bunmapi(
|
|
|
ip, -((long)del.br_blockcount), 0,
|
|
|
XFS_QMOPT_RES_RTBLKS);
|
|
|
} else {
|
|
|
- xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS,
|
|
|
+ xfs_icsb_modify_counters(mp, XFS_SBS_FDBLOCKS,
|
|
|
(int64_t)del.br_blockcount, rsvd);
|
|
|
(void)xfs_trans_reserve_quota_nblks(NULL,
|
|
|
ip, -((long)del.br_blockcount), 0,
|