aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-02-10 02:36:10 -0500
committerTim Shimmin <tes@sgi.com>2007-02-10 02:36:10 -0500
commit20f4ebf2bf2f57c1a9abb3655391336cc90314b3 (patch)
treed6081bf132eea97adbc13a1da980e75f4735141b /fs/xfs/xfs_trans.c
parentf74eaf59b36c0ad01f416b567f89c737bbf82bae (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/xfs/xfs_trans.c')
-rw-r--r--fs/xfs/xfs_trans.c32
1 files changed, 16 insertions, 16 deletions
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:
410undo_blocks: 410undo_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
432xfs_trans_mod_sb( 432xfs_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 }