|
@@ -684,7 +684,7 @@ xfs_bmap_add_extent(
|
|
|
ASSERT(nblks <= da_old);
|
|
|
if (nblks < da_old)
|
|
|
xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS,
|
|
|
- (int)(da_old - nblks), rsvd);
|
|
|
+ (int64_t)(da_old - nblks), rsvd);
|
|
|
}
|
|
|
/*
|
|
|
* Clear out the allocated field, done with it now in any case.
|
|
@@ -1209,7 +1209,7 @@ 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, -diff, rsvd)) {
|
|
|
+ xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) {
|
|
|
/*
|
|
|
* Ick gross gag me with a spoon.
|
|
|
*/
|
|
@@ -1220,7 +1220,7 @@ xfs_bmap_add_extent_delay_real(
|
|
|
diff--;
|
|
|
if (!diff ||
|
|
|
!xfs_mod_incore_sb(ip->i_mount,
|
|
|
- XFS_SBS_FDBLOCKS, -diff, rsvd))
|
|
|
+ XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd))
|
|
|
break;
|
|
|
}
|
|
|
if (temp2) {
|
|
@@ -1228,7 +1228,7 @@ xfs_bmap_add_extent_delay_real(
|
|
|
diff--;
|
|
|
if (!diff ||
|
|
|
!xfs_mod_incore_sb(ip->i_mount,
|
|
|
- XFS_SBS_FDBLOCKS, -diff, rsvd))
|
|
|
+ XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd))
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -2015,7 +2015,7 @@ xfs_bmap_add_extent_hole_delay(
|
|
|
if (oldlen != newlen) {
|
|
|
ASSERT(oldlen > newlen);
|
|
|
xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS,
|
|
|
- (int)(oldlen - newlen), rsvd);
|
|
|
+ (int64_t)(oldlen - newlen), rsvd);
|
|
|
/*
|
|
|
* Nothing to do for disk quota accounting here.
|
|
|
*/
|
|
@@ -3359,7 +3359,7 @@ xfs_bmap_del_extent(
|
|
|
*/
|
|
|
ASSERT(da_old >= da_new);
|
|
|
if (da_old > da_new)
|
|
|
- xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int)(da_old - da_new),
|
|
|
+ xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int64_t)(da_old - da_new),
|
|
|
rsvd);
|
|
|
if (delta) {
|
|
|
/* DELTA: report the original extent. */
|
|
@@ -4930,28 +4930,28 @@ xfs_bmapi(
|
|
|
if (rt) {
|
|
|
error = xfs_mod_incore_sb(mp,
|
|
|
XFS_SBS_FREXTENTS,
|
|
|
- -(extsz), (flags &
|
|
|
+ -((int64_t)extsz), (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
} else {
|
|
|
error = xfs_mod_incore_sb(mp,
|
|
|
XFS_SBS_FDBLOCKS,
|
|
|
- -(alen), (flags &
|
|
|
+ -((int64_t)alen), (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
}
|
|
|
if (!error) {
|
|
|
error = xfs_mod_incore_sb(mp,
|
|
|
XFS_SBS_FDBLOCKS,
|
|
|
- -(indlen), (flags &
|
|
|
+ -((int64_t)indlen), (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
if (error && rt)
|
|
|
xfs_mod_incore_sb(mp,
|
|
|
XFS_SBS_FREXTENTS,
|
|
|
- extsz, (flags &
|
|
|
+ (int64_t)extsz, (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
else if (error)
|
|
|
xfs_mod_incore_sb(mp,
|
|
|
XFS_SBS_FDBLOCKS,
|
|
|
- alen, (flags &
|
|
|
+ (int64_t)alen, (flags &
|
|
|
XFS_BMAPI_RSVBLOCKS));
|
|
|
}
|
|
|
|
|
@@ -5617,13 +5617,13 @@ xfs_bunmapi(
|
|
|
rtexts = XFS_FSB_TO_B(mp, del.br_blockcount);
|
|
|
do_div(rtexts, mp->m_sb.sb_rextsize);
|
|
|
xfs_mod_incore_sb(mp, XFS_SBS_FREXTENTS,
|
|
|
- (int)rtexts, rsvd);
|
|
|
+ (int64_t)rtexts, rsvd);
|
|
|
(void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp,
|
|
|
NULL, ip, -((long)del.br_blockcount), 0,
|
|
|
XFS_QMOPT_RES_RTBLKS);
|
|
|
} else {
|
|
|
xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS,
|
|
|
- (int)del.br_blockcount, rsvd);
|
|
|
+ (int64_t)del.br_blockcount, rsvd);
|
|
|
(void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp,
|
|
|
NULL, ip, -((long)del.br_blockcount), 0,
|
|
|
XFS_QMOPT_RES_REGBLKS);
|