diff options
author | David Chinner <dgc@sgi.com> | 2007-02-10 02:36:10 -0500 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-02-10 02:36:10 -0500 |
commit | 20f4ebf2bf2f57c1a9abb3655391336cc90314b3 (patch) | |
tree | d6081bf132eea97adbc13a1da980e75f4735141b /fs | |
parent | f74eaf59b36c0ad01f416b567f89c737bbf82bae (diff) |
[XFS] Make growfs work for amounts greater than 2TB
The free block modification code has a 32bit interface, limiting the size
the filesystem can be grown even on 64 bit machines. On 32 bit machines,
there are other 32bit variables in transaction structures and interfaces
that need to be expanded to allow this to work.
SGI-PV: 959978
SGI-Modid: xfs-linux-melb:xfs-kern:27894a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_bmap.c | 26 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.c | 22 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.h | 7 | ||||
-rw-r--r-- | fs/xfs/xfs_trans.c | 32 | ||||
-rw-r--r-- | fs/xfs/xfs_trans.h | 42 |
5 files changed, 68 insertions, 61 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 024d8452c3d3..fa459a184b8a 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -684,7 +684,7 @@ xfs_bmap_add_extent( | |||
684 | ASSERT(nblks <= da_old); | 684 | ASSERT(nblks <= da_old); |
685 | if (nblks < da_old) | 685 | if (nblks < da_old) |
686 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, | 686 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, |
687 | (int)(da_old - nblks), rsvd); | 687 | (int64_t)(da_old - nblks), rsvd); |
688 | } | 688 | } |
689 | /* | 689 | /* |
690 | * Clear out the allocated field, done with it now in any case. | 690 | * Clear out the allocated field, done with it now in any case. |
@@ -1209,7 +1209,7 @@ xfs_bmap_add_extent_delay_real( | |||
1209 | diff = (int)(temp + temp2 - STARTBLOCKVAL(PREV.br_startblock) - | 1209 | diff = (int)(temp + temp2 - STARTBLOCKVAL(PREV.br_startblock) - |
1210 | (cur ? cur->bc_private.b.allocated : 0)); | 1210 | (cur ? cur->bc_private.b.allocated : 0)); |
1211 | if (diff > 0 && | 1211 | if (diff > 0 && |
1212 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, -diff, rsvd)) { | 1212 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) { |
1213 | /* | 1213 | /* |
1214 | * Ick gross gag me with a spoon. | 1214 | * Ick gross gag me with a spoon. |
1215 | */ | 1215 | */ |
@@ -1220,7 +1220,7 @@ xfs_bmap_add_extent_delay_real( | |||
1220 | diff--; | 1220 | diff--; |
1221 | if (!diff || | 1221 | if (!diff || |
1222 | !xfs_mod_incore_sb(ip->i_mount, | 1222 | !xfs_mod_incore_sb(ip->i_mount, |
1223 | XFS_SBS_FDBLOCKS, -diff, rsvd)) | 1223 | XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) |
1224 | break; | 1224 | break; |
1225 | } | 1225 | } |
1226 | if (temp2) { | 1226 | if (temp2) { |
@@ -1228,7 +1228,7 @@ xfs_bmap_add_extent_delay_real( | |||
1228 | diff--; | 1228 | diff--; |
1229 | if (!diff || | 1229 | if (!diff || |
1230 | !xfs_mod_incore_sb(ip->i_mount, | 1230 | !xfs_mod_incore_sb(ip->i_mount, |
1231 | XFS_SBS_FDBLOCKS, -diff, rsvd)) | 1231 | XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) |
1232 | break; | 1232 | break; |
1233 | } | 1233 | } |
1234 | } | 1234 | } |
@@ -2015,7 +2015,7 @@ xfs_bmap_add_extent_hole_delay( | |||
2015 | if (oldlen != newlen) { | 2015 | if (oldlen != newlen) { |
2016 | ASSERT(oldlen > newlen); | 2016 | ASSERT(oldlen > newlen); |
2017 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, | 2017 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, |
2018 | (int)(oldlen - newlen), rsvd); | 2018 | (int64_t)(oldlen - newlen), rsvd); |
2019 | /* | 2019 | /* |
2020 | * Nothing to do for disk quota accounting here. | 2020 | * Nothing to do for disk quota accounting here. |
2021 | */ | 2021 | */ |
@@ -3359,7 +3359,7 @@ xfs_bmap_del_extent( | |||
3359 | */ | 3359 | */ |
3360 | ASSERT(da_old >= da_new); | 3360 | ASSERT(da_old >= da_new); |
3361 | if (da_old > da_new) | 3361 | if (da_old > da_new) |
3362 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int)(da_old - da_new), | 3362 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int64_t)(da_old - da_new), |
3363 | rsvd); | 3363 | rsvd); |
3364 | if (delta) { | 3364 | if (delta) { |
3365 | /* DELTA: report the original extent. */ | 3365 | /* DELTA: report the original extent. */ |
@@ -4930,28 +4930,28 @@ xfs_bmapi( | |||
4930 | if (rt) { | 4930 | if (rt) { |
4931 | error = xfs_mod_incore_sb(mp, | 4931 | error = xfs_mod_incore_sb(mp, |
4932 | XFS_SBS_FREXTENTS, | 4932 | XFS_SBS_FREXTENTS, |
4933 | -(extsz), (flags & | 4933 | -((int64_t)extsz), (flags & |
4934 | XFS_BMAPI_RSVBLOCKS)); | 4934 | XFS_BMAPI_RSVBLOCKS)); |
4935 | } else { | 4935 | } else { |
4936 | error = xfs_mod_incore_sb(mp, | 4936 | error = xfs_mod_incore_sb(mp, |
4937 | XFS_SBS_FDBLOCKS, | 4937 | XFS_SBS_FDBLOCKS, |
4938 | -(alen), (flags & | 4938 | -((int64_t)alen), (flags & |
4939 | XFS_BMAPI_RSVBLOCKS)); | 4939 | XFS_BMAPI_RSVBLOCKS)); |
4940 | } | 4940 | } |
4941 | if (!error) { | 4941 | if (!error) { |
4942 | error = xfs_mod_incore_sb(mp, | 4942 | error = xfs_mod_incore_sb(mp, |
4943 | XFS_SBS_FDBLOCKS, | 4943 | XFS_SBS_FDBLOCKS, |
4944 | -(indlen), (flags & | 4944 | -((int64_t)indlen), (flags & |
4945 | XFS_BMAPI_RSVBLOCKS)); | 4945 | XFS_BMAPI_RSVBLOCKS)); |
4946 | if (error && rt) | 4946 | if (error && rt) |
4947 | xfs_mod_incore_sb(mp, | 4947 | xfs_mod_incore_sb(mp, |
4948 | XFS_SBS_FREXTENTS, | 4948 | XFS_SBS_FREXTENTS, |
4949 | extsz, (flags & | 4949 | (int64_t)extsz, (flags & |
4950 | XFS_BMAPI_RSVBLOCKS)); | 4950 | XFS_BMAPI_RSVBLOCKS)); |
4951 | else if (error) | 4951 | else if (error) |
4952 | xfs_mod_incore_sb(mp, | 4952 | xfs_mod_incore_sb(mp, |
4953 | XFS_SBS_FDBLOCKS, | 4953 | XFS_SBS_FDBLOCKS, |
4954 | alen, (flags & | 4954 | (int64_t)alen, (flags & |
4955 | XFS_BMAPI_RSVBLOCKS)); | 4955 | XFS_BMAPI_RSVBLOCKS)); |
4956 | } | 4956 | } |
4957 | 4957 | ||
@@ -5617,13 +5617,13 @@ xfs_bunmapi( | |||
5617 | rtexts = XFS_FSB_TO_B(mp, del.br_blockcount); | 5617 | rtexts = XFS_FSB_TO_B(mp, del.br_blockcount); |
5618 | do_div(rtexts, mp->m_sb.sb_rextsize); | 5618 | do_div(rtexts, mp->m_sb.sb_rextsize); |
5619 | xfs_mod_incore_sb(mp, XFS_SBS_FREXTENTS, | 5619 | xfs_mod_incore_sb(mp, XFS_SBS_FREXTENTS, |
5620 | (int)rtexts, rsvd); | 5620 | (int64_t)rtexts, rsvd); |
5621 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, | 5621 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, |
5622 | NULL, ip, -((long)del.br_blockcount), 0, | 5622 | NULL, ip, -((long)del.br_blockcount), 0, |
5623 | XFS_QMOPT_RES_RTBLKS); | 5623 | XFS_QMOPT_RES_RTBLKS); |
5624 | } else { | 5624 | } else { |
5625 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, | 5625 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, |
5626 | (int)del.br_blockcount, rsvd); | 5626 | (int64_t)del.br_blockcount, rsvd); |
5627 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, | 5627 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, |
5628 | NULL, ip, -((long)del.br_blockcount), 0, | 5628 | NULL, ip, -((long)del.br_blockcount), 0, |
5629 | XFS_QMOPT_RES_REGBLKS); | 5629 | XFS_QMOPT_RES_REGBLKS); |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index cbe729310eee..0df07c1df76e 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -52,11 +52,11 @@ STATIC void xfs_unmountfs_wait(xfs_mount_t *); | |||
52 | 52 | ||
53 | #ifdef HAVE_PERCPU_SB | 53 | #ifdef HAVE_PERCPU_SB |
54 | STATIC void xfs_icsb_destroy_counters(xfs_mount_t *); | 54 | STATIC void xfs_icsb_destroy_counters(xfs_mount_t *); |
55 | STATIC void xfs_icsb_balance_counter(xfs_mount_t *, xfs_sb_field_t, int, | 55 | STATIC void xfs_icsb_balance_counter(xfs_mount_t *, xfs_sb_field_t, |
56 | int); | 56 | int, int); |
57 | STATIC void xfs_icsb_sync_counters(xfs_mount_t *); | 57 | STATIC void xfs_icsb_sync_counters(xfs_mount_t *); |
58 | STATIC int xfs_icsb_modify_counters(xfs_mount_t *, xfs_sb_field_t, | 58 | STATIC int xfs_icsb_modify_counters(xfs_mount_t *, xfs_sb_field_t, |
59 | int, int); | 59 | int64_t, int); |
60 | STATIC int xfs_icsb_disable_counter(xfs_mount_t *, xfs_sb_field_t); | 60 | STATIC int xfs_icsb_disable_counter(xfs_mount_t *, xfs_sb_field_t); |
61 | 61 | ||
62 | #else | 62 | #else |
@@ -1254,8 +1254,11 @@ xfs_mod_sb(xfs_trans_t *tp, __int64_t fields) | |||
1254 | * The SB_LOCK must be held when this routine is called. | 1254 | * The SB_LOCK must be held when this routine is called. |
1255 | */ | 1255 | */ |
1256 | int | 1256 | int |
1257 | xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, | 1257 | xfs_mod_incore_sb_unlocked( |
1258 | int delta, int rsvd) | 1258 | xfs_mount_t *mp, |
1259 | xfs_sb_field_t field, | ||
1260 | int64_t delta, | ||
1261 | int rsvd) | ||
1259 | { | 1262 | { |
1260 | int scounter; /* short counter for 32 bit fields */ | 1263 | int scounter; /* short counter for 32 bit fields */ |
1261 | long long lcounter; /* long counter for 64 bit fields */ | 1264 | long long lcounter; /* long counter for 64 bit fields */ |
@@ -1287,7 +1290,6 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, | |||
1287 | mp->m_sb.sb_ifree = lcounter; | 1290 | mp->m_sb.sb_ifree = lcounter; |
1288 | return 0; | 1291 | return 0; |
1289 | case XFS_SBS_FDBLOCKS: | 1292 | case XFS_SBS_FDBLOCKS: |
1290 | |||
1291 | lcounter = (long long) | 1293 | lcounter = (long long) |
1292 | mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); | 1294 | mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); |
1293 | res_used = (long long)(mp->m_resblks - mp->m_resblks_avail); | 1295 | res_used = (long long)(mp->m_resblks - mp->m_resblks_avail); |
@@ -1418,7 +1420,11 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, | |||
1418 | * routine to do the work. | 1420 | * routine to do the work. |
1419 | */ | 1421 | */ |
1420 | int | 1422 | int |
1421 | xfs_mod_incore_sb(xfs_mount_t *mp, xfs_sb_field_t field, int delta, int rsvd) | 1423 | xfs_mod_incore_sb( |
1424 | xfs_mount_t *mp, | ||
1425 | xfs_sb_field_t field, | ||
1426 | int64_t delta, | ||
1427 | int rsvd) | ||
1422 | { | 1428 | { |
1423 | unsigned long s; | 1429 | unsigned long s; |
1424 | int status; | 1430 | int status; |
@@ -2092,7 +2098,7 @@ int | |||
2092 | xfs_icsb_modify_counters( | 2098 | xfs_icsb_modify_counters( |
2093 | xfs_mount_t *mp, | 2099 | xfs_mount_t *mp, |
2094 | xfs_sb_field_t field, | 2100 | xfs_sb_field_t field, |
2095 | int delta, | 2101 | int64_t delta, |
2096 | int rsvd) | 2102 | int rsvd) |
2097 | { | 2103 | { |
2098 | xfs_icsb_cnts_t *icsbp; | 2104 | xfs_icsb_cnts_t *icsbp; |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 9c33af88514e..9a8e7151b65c 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -586,10 +586,11 @@ xfs_icsb_unlock(xfs_mount_t *mp) | |||
586 | 586 | ||
587 | /* | 587 | /* |
588 | * This structure is for use by the xfs_mod_incore_sb_batch() routine. | 588 | * This structure is for use by the xfs_mod_incore_sb_batch() routine. |
589 | * xfs_growfs can specify a few fields which are more than int limit | ||
589 | */ | 590 | */ |
590 | typedef struct xfs_mod_sb { | 591 | typedef struct xfs_mod_sb { |
591 | xfs_sb_field_t msb_field; /* Field to modify, see below */ | 592 | xfs_sb_field_t msb_field; /* Field to modify, see below */ |
592 | int msb_delta; /* Change to make to specified field */ | 593 | int64_t msb_delta; /* Change to make to specified field */ |
593 | } xfs_mod_sb_t; | 594 | } xfs_mod_sb_t; |
594 | 595 | ||
595 | #define XFS_MOUNT_ILOCK(mp) mutex_lock(&((mp)->m_ilock)) | 596 | #define XFS_MOUNT_ILOCK(mp) mutex_lock(&((mp)->m_ilock)) |
@@ -607,9 +608,9 @@ extern int xfs_unmountfs(xfs_mount_t *, struct cred *); | |||
607 | extern void xfs_unmountfs_close(xfs_mount_t *, struct cred *); | 608 | extern void xfs_unmountfs_close(xfs_mount_t *, struct cred *); |
608 | extern int xfs_unmountfs_writesb(xfs_mount_t *); | 609 | extern int xfs_unmountfs_writesb(xfs_mount_t *); |
609 | extern int xfs_unmount_flush(xfs_mount_t *, int); | 610 | extern int xfs_unmount_flush(xfs_mount_t *, int); |
610 | extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int, int); | 611 | extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int); |
611 | extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t, | 612 | extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t, |
612 | int, int); | 613 | int64_t, int); |
613 | extern int xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *, | 614 | extern int xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *, |
614 | uint, int); | 615 | uint, int); |
615 | extern struct xfs_buf *xfs_getsb(xfs_mount_t *, int); | 616 | extern struct xfs_buf *xfs_getsb(xfs_mount_t *, int); |
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index ee2721e0de4d..301ff9445b6f 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -339,7 +339,7 @@ xfs_trans_reserve( | |||
339 | */ | 339 | */ |
340 | if (blocks > 0) { | 340 | if (blocks > 0) { |
341 | error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FDBLOCKS, | 341 | error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FDBLOCKS, |
342 | -blocks, rsvd); | 342 | -((int64_t)blocks), rsvd); |
343 | if (error != 0) { | 343 | if (error != 0) { |
344 | current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); | 344 | current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); |
345 | return (XFS_ERROR(ENOSPC)); | 345 | return (XFS_ERROR(ENOSPC)); |
@@ -380,7 +380,7 @@ xfs_trans_reserve( | |||
380 | */ | 380 | */ |
381 | if (rtextents > 0) { | 381 | if (rtextents > 0) { |
382 | error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FREXTENTS, | 382 | error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FREXTENTS, |
383 | -rtextents, rsvd); | 383 | -((int64_t)rtextents), rsvd); |
384 | if (error) { | 384 | if (error) { |
385 | error = XFS_ERROR(ENOSPC); | 385 | error = XFS_ERROR(ENOSPC); |
386 | goto undo_log; | 386 | goto undo_log; |
@@ -410,7 +410,7 @@ undo_log: | |||
410 | undo_blocks: | 410 | undo_blocks: |
411 | if (blocks > 0) { | 411 | if (blocks > 0) { |
412 | (void) xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FDBLOCKS, | 412 | (void) xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FDBLOCKS, |
413 | blocks, rsvd); | 413 | (int64_t)blocks, rsvd); |
414 | tp->t_blk_res = 0; | 414 | tp->t_blk_res = 0; |
415 | } | 415 | } |
416 | 416 | ||
@@ -432,7 +432,7 @@ void | |||
432 | xfs_trans_mod_sb( | 432 | xfs_trans_mod_sb( |
433 | xfs_trans_t *tp, | 433 | xfs_trans_t *tp, |
434 | uint field, | 434 | uint field, |
435 | long delta) | 435 | int64_t delta) |
436 | { | 436 | { |
437 | 437 | ||
438 | switch (field) { | 438 | switch (field) { |
@@ -663,62 +663,62 @@ xfs_trans_unreserve_and_mod_sb( | |||
663 | if (tp->t_flags & XFS_TRANS_SB_DIRTY) { | 663 | if (tp->t_flags & XFS_TRANS_SB_DIRTY) { |
664 | if (tp->t_icount_delta != 0) { | 664 | if (tp->t_icount_delta != 0) { |
665 | msbp->msb_field = XFS_SBS_ICOUNT; | 665 | msbp->msb_field = XFS_SBS_ICOUNT; |
666 | msbp->msb_delta = (int)tp->t_icount_delta; | 666 | msbp->msb_delta = tp->t_icount_delta; |
667 | msbp++; | 667 | msbp++; |
668 | } | 668 | } |
669 | if (tp->t_ifree_delta != 0) { | 669 | if (tp->t_ifree_delta != 0) { |
670 | msbp->msb_field = XFS_SBS_IFREE; | 670 | msbp->msb_field = XFS_SBS_IFREE; |
671 | msbp->msb_delta = (int)tp->t_ifree_delta; | 671 | msbp->msb_delta = tp->t_ifree_delta; |
672 | msbp++; | 672 | msbp++; |
673 | } | 673 | } |
674 | if (tp->t_fdblocks_delta != 0) { | 674 | if (tp->t_fdblocks_delta != 0) { |
675 | msbp->msb_field = XFS_SBS_FDBLOCKS; | 675 | msbp->msb_field = XFS_SBS_FDBLOCKS; |
676 | msbp->msb_delta = (int)tp->t_fdblocks_delta; | 676 | msbp->msb_delta = tp->t_fdblocks_delta; |
677 | msbp++; | 677 | msbp++; |
678 | } | 678 | } |
679 | if (tp->t_frextents_delta != 0) { | 679 | if (tp->t_frextents_delta != 0) { |
680 | msbp->msb_field = XFS_SBS_FREXTENTS; | 680 | msbp->msb_field = XFS_SBS_FREXTENTS; |
681 | msbp->msb_delta = (int)tp->t_frextents_delta; | 681 | msbp->msb_delta = tp->t_frextents_delta; |
682 | msbp++; | 682 | msbp++; |
683 | } | 683 | } |
684 | if (tp->t_dblocks_delta != 0) { | 684 | if (tp->t_dblocks_delta != 0) { |
685 | msbp->msb_field = XFS_SBS_DBLOCKS; | 685 | msbp->msb_field = XFS_SBS_DBLOCKS; |
686 | msbp->msb_delta = (int)tp->t_dblocks_delta; | 686 | msbp->msb_delta = tp->t_dblocks_delta; |
687 | msbp++; | 687 | msbp++; |
688 | } | 688 | } |
689 | if (tp->t_agcount_delta != 0) { | 689 | if (tp->t_agcount_delta != 0) { |
690 | msbp->msb_field = XFS_SBS_AGCOUNT; | 690 | msbp->msb_field = XFS_SBS_AGCOUNT; |
691 | msbp->msb_delta = (int)tp->t_agcount_delta; | 691 | msbp->msb_delta = tp->t_agcount_delta; |
692 | msbp++; | 692 | msbp++; |
693 | } | 693 | } |
694 | if (tp->t_imaxpct_delta != 0) { | 694 | if (tp->t_imaxpct_delta != 0) { |
695 | msbp->msb_field = XFS_SBS_IMAX_PCT; | 695 | msbp->msb_field = XFS_SBS_IMAX_PCT; |
696 | msbp->msb_delta = (int)tp->t_imaxpct_delta; | 696 | msbp->msb_delta = tp->t_imaxpct_delta; |
697 | msbp++; | 697 | msbp++; |
698 | } | 698 | } |
699 | if (tp->t_rextsize_delta != 0) { | 699 | if (tp->t_rextsize_delta != 0) { |
700 | msbp->msb_field = XFS_SBS_REXTSIZE; | 700 | msbp->msb_field = XFS_SBS_REXTSIZE; |
701 | msbp->msb_delta = (int)tp->t_rextsize_delta; | 701 | msbp->msb_delta = tp->t_rextsize_delta; |
702 | msbp++; | 702 | msbp++; |
703 | } | 703 | } |
704 | if (tp->t_rbmblocks_delta != 0) { | 704 | if (tp->t_rbmblocks_delta != 0) { |
705 | msbp->msb_field = XFS_SBS_RBMBLOCKS; | 705 | msbp->msb_field = XFS_SBS_RBMBLOCKS; |
706 | msbp->msb_delta = (int)tp->t_rbmblocks_delta; | 706 | msbp->msb_delta = tp->t_rbmblocks_delta; |
707 | msbp++; | 707 | msbp++; |
708 | } | 708 | } |
709 | if (tp->t_rblocks_delta != 0) { | 709 | if (tp->t_rblocks_delta != 0) { |
710 | msbp->msb_field = XFS_SBS_RBLOCKS; | 710 | msbp->msb_field = XFS_SBS_RBLOCKS; |
711 | msbp->msb_delta = (int)tp->t_rblocks_delta; | 711 | msbp->msb_delta = tp->t_rblocks_delta; |
712 | msbp++; | 712 | msbp++; |
713 | } | 713 | } |
714 | if (tp->t_rextents_delta != 0) { | 714 | if (tp->t_rextents_delta != 0) { |
715 | msbp->msb_field = XFS_SBS_REXTENTS; | 715 | msbp->msb_field = XFS_SBS_REXTENTS; |
716 | msbp->msb_delta = (int)tp->t_rextents_delta; | 716 | msbp->msb_delta = tp->t_rextents_delta; |
717 | msbp++; | 717 | msbp++; |
718 | } | 718 | } |
719 | if (tp->t_rextslog_delta != 0) { | 719 | if (tp->t_rextslog_delta != 0) { |
720 | msbp->msb_field = XFS_SBS_REXTSLOG; | 720 | msbp->msb_field = XFS_SBS_REXTSLOG; |
721 | msbp->msb_delta = (int)tp->t_rextslog_delta; | 721 | msbp->msb_delta = tp->t_rextslog_delta; |
722 | msbp++; | 722 | msbp++; |
723 | } | 723 | } |
724 | } | 724 | } |
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index 9c975c6e6a4f..f1d7ab236726 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h | |||
@@ -350,25 +350,25 @@ typedef struct xfs_trans { | |||
350 | xfs_trans_callback_t t_callback; /* transaction callback */ | 350 | xfs_trans_callback_t t_callback; /* transaction callback */ |
351 | void *t_callarg; /* callback arg */ | 351 | void *t_callarg; /* callback arg */ |
352 | unsigned int t_flags; /* misc flags */ | 352 | unsigned int t_flags; /* misc flags */ |
353 | long t_icount_delta; /* superblock icount change */ | 353 | int64_t t_icount_delta; /* superblock icount change */ |
354 | long t_ifree_delta; /* superblock ifree change */ | 354 | int64_t t_ifree_delta; /* superblock ifree change */ |
355 | long t_fdblocks_delta; /* superblock fdblocks chg */ | 355 | int64_t t_fdblocks_delta; /* superblock fdblocks chg */ |
356 | long t_res_fdblocks_delta; /* on-disk only chg */ | 356 | int64_t t_res_fdblocks_delta; /* on-disk only chg */ |
357 | long t_frextents_delta;/* superblock freextents chg*/ | 357 | int64_t t_frextents_delta;/* superblock freextents chg*/ |
358 | long t_res_frextents_delta; /* on-disk only chg */ | 358 | int64_t t_res_frextents_delta; /* on-disk only chg */ |
359 | #ifdef DEBUG | 359 | #ifdef DEBUG |
360 | long t_ag_freeblks_delta; /* debugging counter */ | 360 | int64_t t_ag_freeblks_delta; /* debugging counter */ |
361 | long t_ag_flist_delta; /* debugging counter */ | 361 | int64_t t_ag_flist_delta; /* debugging counter */ |
362 | long t_ag_btree_delta; /* debugging counter */ | 362 | int64_t t_ag_btree_delta; /* debugging counter */ |
363 | #endif | 363 | #endif |
364 | long t_dblocks_delta;/* superblock dblocks change */ | 364 | int64_t t_dblocks_delta;/* superblock dblocks change */ |
365 | long t_agcount_delta;/* superblock agcount change */ | 365 | int64_t t_agcount_delta;/* superblock agcount change */ |
366 | long t_imaxpct_delta;/* superblock imaxpct change */ | 366 | int64_t t_imaxpct_delta;/* superblock imaxpct change */ |
367 | long t_rextsize_delta;/* superblock rextsize chg */ | 367 | int64_t t_rextsize_delta;/* superblock rextsize chg */ |
368 | long t_rbmblocks_delta;/* superblock rbmblocks chg */ | 368 | int64_t t_rbmblocks_delta;/* superblock rbmblocks chg */ |
369 | long t_rblocks_delta;/* superblock rblocks change */ | 369 | int64_t t_rblocks_delta;/* superblock rblocks change */ |
370 | long t_rextents_delta;/* superblocks rextents chg */ | 370 | int64_t t_rextents_delta;/* superblocks rextents chg */ |
371 | long t_rextslog_delta;/* superblocks rextslog chg */ | 371 | int64_t t_rextslog_delta;/* superblocks rextslog chg */ |
372 | unsigned int t_items_free; /* log item descs free */ | 372 | unsigned int t_items_free; /* log item descs free */ |
373 | xfs_log_item_chunk_t t_items; /* first log item desc chunk */ | 373 | xfs_log_item_chunk_t t_items; /* first log item desc chunk */ |
374 | xfs_trans_header_t t_header; /* header for in-log trans */ | 374 | xfs_trans_header_t t_header; /* header for in-log trans */ |
@@ -932,9 +932,9 @@ typedef struct xfs_trans { | |||
932 | #define xfs_trans_set_sync(tp) ((tp)->t_flags |= XFS_TRANS_SYNC) | 932 | #define xfs_trans_set_sync(tp) ((tp)->t_flags |= XFS_TRANS_SYNC) |
933 | 933 | ||
934 | #ifdef DEBUG | 934 | #ifdef DEBUG |
935 | #define xfs_trans_agblocks_delta(tp, d) ((tp)->t_ag_freeblks_delta += (long)d) | 935 | #define xfs_trans_agblocks_delta(tp, d) ((tp)->t_ag_freeblks_delta += (int64_t)d) |
936 | #define xfs_trans_agflist_delta(tp, d) ((tp)->t_ag_flist_delta += (long)d) | 936 | #define xfs_trans_agflist_delta(tp, d) ((tp)->t_ag_flist_delta += (int64_t)d) |
937 | #define xfs_trans_agbtree_delta(tp, d) ((tp)->t_ag_btree_delta += (long)d) | 937 | #define xfs_trans_agbtree_delta(tp, d) ((tp)->t_ag_btree_delta += (int64_t)d) |
938 | #else | 938 | #else |
939 | #define xfs_trans_agblocks_delta(tp, d) | 939 | #define xfs_trans_agblocks_delta(tp, d) |
940 | #define xfs_trans_agflist_delta(tp, d) | 940 | #define xfs_trans_agflist_delta(tp, d) |
@@ -950,7 +950,7 @@ xfs_trans_t *_xfs_trans_alloc(struct xfs_mount *, uint); | |||
950 | xfs_trans_t *xfs_trans_dup(xfs_trans_t *); | 950 | xfs_trans_t *xfs_trans_dup(xfs_trans_t *); |
951 | int xfs_trans_reserve(xfs_trans_t *, uint, uint, uint, | 951 | int xfs_trans_reserve(xfs_trans_t *, uint, uint, uint, |
952 | uint, uint); | 952 | uint, uint); |
953 | void xfs_trans_mod_sb(xfs_trans_t *, uint, long); | 953 | void xfs_trans_mod_sb(xfs_trans_t *, uint, int64_t); |
954 | struct xfs_buf *xfs_trans_get_buf(xfs_trans_t *, struct xfs_buftarg *, xfs_daddr_t, | 954 | struct xfs_buf *xfs_trans_get_buf(xfs_trans_t *, struct xfs_buftarg *, xfs_daddr_t, |
955 | int, uint); | 955 | int, uint); |
956 | int xfs_trans_read_buf(struct xfs_mount *, xfs_trans_t *, | 956 | int xfs_trans_read_buf(struct xfs_mount *, xfs_trans_t *, |