Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329039
b: refs/heads/master
c: c3a58fe
h: refs/heads/master
i:
  329037: cab878a
  329035: 459c7ba
  329031: d35cc87
  329023: fbe1fc4
v: v3
  • Loading branch information
Carlos Maiolino authored and Ben Myers committed Sep 26, 2012
1 parent 9814a15 commit 120f39c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4026c9fde9c67266932afd209e25bfef4474a1be
refs/heads/master: c3a58fecdd1934a8538ada9073107625f5151687
30 changes: 29 additions & 1 deletion trunk/fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ mempool_t *xfs_ioend_pool;
* in the future, too.
*/
enum {
Opt_barrier, Opt_nobarrier, Opt_err
Opt_barrier, Opt_nobarrier, Opt_inode64, Opt_err
};

static const match_table_t tokens = {
{Opt_barrier, "barrier"},
{Opt_nobarrier, "nobarrier"},
{Opt_inode64, "inode64"},
{Opt_err, NULL}
};

Expand Down Expand Up @@ -1031,6 +1032,30 @@ xfs_restore_resvblks(struct xfs_mount *mp)
xfs_reserve_blocks(mp, &resblks, NULL);
}

STATIC void
xfs_set_inode64(struct xfs_mount *mp)
{
int i = 0;

for (i = 0; i < mp->m_sb.sb_agcount; i++) {
struct xfs_perag *pag;

pag = xfs_perag_get(mp, i);
pag->pagi_inodeok = 1;
pag->pagf_metadata = 0;
xfs_perag_put(pag);
}

/* There is no need for lock protection on m_flags,
* the rw_semaphore of the VFS superblock is locked
* during mount/umount/remount operations, so this is
* enough to avoid concurency on the m_flags field
*/
mp->m_flags &= ~(XFS_MOUNT_32BITINODES |
XFS_MOUNT_SMALL_INUMS);
mp->m_maxagi = i;
}

STATIC int
xfs_fs_remount(
struct super_block *sb,
Expand All @@ -1056,6 +1081,9 @@ xfs_fs_remount(
case Opt_nobarrier:
mp->m_flags &= ~XFS_MOUNT_BARRIER;
break;
case Opt_inode64:
xfs_set_inode64(mp);
break;
default:
/*
* Logically we would return an error here to prevent
Expand Down

0 comments on commit 120f39c

Please sign in to comment.