Merge branch 'xfs-misc-fixes-3.17-1' into for-next
This commit is contained in:
@@ -205,9 +205,6 @@ xfs_parseargs(
|
||||
*/
|
||||
mp->m_flags |= XFS_MOUNT_BARRIER;
|
||||
mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
|
||||
#if !XFS_BIG_INUMS
|
||||
mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These can be overridden by the mount option parsing.
|
||||
@@ -314,11 +311,6 @@ xfs_parseargs(
|
||||
mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
|
||||
} else if (!strcmp(this_char, MNTOPT_64BITINODE)) {
|
||||
mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
|
||||
#if !XFS_BIG_INUMS
|
||||
xfs_warn(mp, "%s option not allowed on this system",
|
||||
this_char);
|
||||
return -EINVAL;
|
||||
#endif
|
||||
} else if (!strcmp(this_char, MNTOPT_NOUUID)) {
|
||||
mp->m_flags |= XFS_MOUNT_NOUUID;
|
||||
} else if (!strcmp(this_char, MNTOPT_BARRIER)) {
|
||||
@@ -598,15 +590,20 @@ xfs_max_file_offset(
|
||||
return (((__uint64_t)pagefactor) << bitshift) - 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* xfs_set_inode32() and xfs_set_inode64() are passed an agcount
|
||||
* because in the growfs case, mp->m_sb.sb_agcount is not updated
|
||||
* yet to the potentially higher ag count.
|
||||
*/
|
||||
xfs_agnumber_t
|
||||
xfs_set_inode32(struct xfs_mount *mp)
|
||||
xfs_set_inode32(struct xfs_mount *mp, xfs_agnumber_t agcount)
|
||||
{
|
||||
xfs_agnumber_t index = 0;
|
||||
xfs_agnumber_t maxagi = 0;
|
||||
xfs_sb_t *sbp = &mp->m_sb;
|
||||
xfs_agnumber_t max_metadata;
|
||||
xfs_agino_t agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks -1, 0);
|
||||
xfs_ino_t ino = XFS_AGINO_TO_INO(mp, sbp->sb_agcount -1, agino);
|
||||
xfs_agino_t agino;
|
||||
xfs_ino_t ino;
|
||||
xfs_perag_t *pag;
|
||||
|
||||
/* Calculate how much should be reserved for inodes to meet
|
||||
@@ -621,10 +618,12 @@ xfs_set_inode32(struct xfs_mount *mp)
|
||||
do_div(icount, sbp->sb_agblocks);
|
||||
max_metadata = icount;
|
||||
} else {
|
||||
max_metadata = sbp->sb_agcount;
|
||||
max_metadata = agcount;
|
||||
}
|
||||
|
||||
for (index = 0; index < sbp->sb_agcount; index++) {
|
||||
agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks - 1, 0);
|
||||
|
||||
for (index = 0; index < agcount; index++) {
|
||||
ino = XFS_AGINO_TO_INO(mp, index, agino);
|
||||
|
||||
if (ino > XFS_MAXINUMBER_32) {
|
||||
@@ -649,11 +648,11 @@ xfs_set_inode32(struct xfs_mount *mp)
|
||||
}
|
||||
|
||||
xfs_agnumber_t
|
||||
xfs_set_inode64(struct xfs_mount *mp)
|
||||
xfs_set_inode64(struct xfs_mount *mp, xfs_agnumber_t agcount)
|
||||
{
|
||||
xfs_agnumber_t index = 0;
|
||||
|
||||
for (index = 0; index < mp->m_sb.sb_agcount; index++) {
|
||||
for (index = 0; index < agcount; index++) {
|
||||
struct xfs_perag *pag;
|
||||
|
||||
pag = xfs_perag_get(mp, index);
|
||||
@@ -1189,6 +1188,7 @@ xfs_fs_remount(
|
||||
char *options)
|
||||
{
|
||||
struct xfs_mount *mp = XFS_M(sb);
|
||||
xfs_sb_t *sbp = &mp->m_sb;
|
||||
substring_t args[MAX_OPT_ARGS];
|
||||
char *p;
|
||||
int error;
|
||||
@@ -1209,10 +1209,10 @@ xfs_fs_remount(
|
||||
mp->m_flags &= ~XFS_MOUNT_BARRIER;
|
||||
break;
|
||||
case Opt_inode64:
|
||||
mp->m_maxagi = xfs_set_inode64(mp);
|
||||
mp->m_maxagi = xfs_set_inode64(mp, sbp->sb_agcount);
|
||||
break;
|
||||
case Opt_inode32:
|
||||
mp->m_maxagi = xfs_set_inode32(mp);
|
||||
mp->m_maxagi = xfs_set_inode32(mp, sbp->sb_agcount);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
|
Reference in New Issue
Block a user