diff options
-rw-r--r-- | fs/xfs/xfs_super.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index aeb03f9a8967..168d4984ce89 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -603,6 +603,7 @@ xfs_agnumber_t | |||
603 | xfs_set_inode32(struct xfs_mount *mp) | 603 | xfs_set_inode32(struct xfs_mount *mp) |
604 | { | 604 | { |
605 | xfs_agnumber_t index = 0; | 605 | xfs_agnumber_t index = 0; |
606 | xfs_agnumber_t maxagi = 0; | ||
606 | xfs_sb_t *sbp = &mp->m_sb; | 607 | xfs_sb_t *sbp = &mp->m_sb; |
607 | xfs_agnumber_t max_metadata; | 608 | xfs_agnumber_t max_metadata; |
608 | xfs_agino_t agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks -1, 0); | 609 | xfs_agino_t agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks -1, 0); |
@@ -626,18 +627,26 @@ xfs_set_inode32(struct xfs_mount *mp) | |||
626 | 627 | ||
627 | for (index = 0; index < sbp->sb_agcount; index++) { | 628 | for (index = 0; index < sbp->sb_agcount; index++) { |
628 | ino = XFS_AGINO_TO_INO(mp, index, agino); | 629 | ino = XFS_AGINO_TO_INO(mp, index, agino); |
630 | |||
629 | if (ino > XFS_MAXINUMBER_32) { | 631 | if (ino > XFS_MAXINUMBER_32) { |
630 | index++; | 632 | pag = xfs_perag_get(mp, index); |
631 | break; | 633 | pag->pagi_inodeok = 0; |
634 | pag->pagf_metadata = 0; | ||
635 | xfs_perag_put(pag); | ||
636 | continue; | ||
632 | } | 637 | } |
633 | 638 | ||
634 | pag = xfs_perag_get(mp, index); | 639 | pag = xfs_perag_get(mp, index); |
635 | pag->pagi_inodeok = 1; | 640 | pag->pagi_inodeok = 1; |
641 | maxagi++; | ||
636 | if (index < max_metadata) | 642 | if (index < max_metadata) |
637 | pag->pagf_metadata = 1; | 643 | pag->pagf_metadata = 1; |
638 | xfs_perag_put(pag); | 644 | xfs_perag_put(pag); |
639 | } | 645 | } |
640 | return index; | 646 | mp->m_flags |= (XFS_MOUNT_32BITINODES | |
647 | XFS_MOUNT_SMALL_INUMS); | ||
648 | |||
649 | return maxagi; | ||
641 | } | 650 | } |
642 | 651 | ||
643 | xfs_agnumber_t | 652 | xfs_agnumber_t |