usrquota, prjquota mount success on 3.16rc4 but Failed to initialize disk quotas on 3.10.43
Arkadiusz Miśkiewicz
arekm at maven.pl
Tue Jul 8 08:27:23 CDT 2014
On Tuesday 08 of July 2014, Arkadiusz Miśkiewicz wrote:
> My broken fs
> http://ixion.pld-linux.org/~arekm/p2/x1/web2-home.metadump.gz
> thanks to "xfsprogs: fixes for 3.2.1" by Dave is now almost in good shape.
>
> What I found interesting is that repairing it with current git xfs_repair
> and then mounting (-o usrquota,prjquota) on 3.16.0-rc4 gives me:
>
> [32208.142316] XFS (sdb): Mounting V4 Filesystem
> [32208.205449] XFS (sdb): Ending clean mount
> [32208.258991] XFS (sdb): Quotacheck needed: Please wait.
> [32821.930437] XFS (sdb): Quotacheck: Done.
>
> Then I umount it and mount again (same options as before) but on 3.10.43
> kernel:
>
> [ 111.325889] XFS (sdb): Mounting Filesystem
> [ 111.419331] XFS (sdb): Failed to initialize disk quotas.
> [ 111.419339] XFS (sdb): Ending clean mount
>
> What did change in later kernels that could have meaning here? (so I could
> try to backport that change).
>
> For testing I mounted again on 3.16 and:
> [33870.472769] XFS (sdb): Mounting V4 Filesystem
> [33870.543539] XFS (sdb): Ending clean mount
> [33870.597791] XFS (sdb): Quotacheck needed: Please wait.
> [34484.332879] XFS (sdb): Quotacheck: Done
>
> and again on 3.10.43:
> [ 1649.215390] XFS (sdb): Mounting Filesystem
> [ 1649.316894] XFS (sdb): Failed to initialize disk quotas.
> [ 1649.316902] XFS (sdb): Ending clean mount
Fails in xfs_iget at xfs_qm_init_quotainos():
if (XFS_IS_OQUOTA_ON(mp) &&
mp->m_sb.sb_gquotino != NULLFSINO) {
ASSERT(mp->m_sb.sb_gquotino > 0);
if ((error = xfs_iget(mp, NULL, mp->m_sb.sb_gquotino,
0, 0, &gip))) {
if (uip)
IRELE(uip);
return XFS_ERROR(error);
}
}
and in xfs_iget:
/* reject inode numbers outside existing AGs */
if (!ino || XFS_INO_TO_AGNO(mp, ino) >= mp->m_sb.sb_agcount)
return EINVAL;
m_sb.sb_gquotino/ino looks to be 0
# xfs_db /dev/sdb -c "sb 0" -c "print" |grep quot
uquotino = 4077961
gquotino = 0
pquotino = 0
and older kernels (testing on 3.10.46 now) seem to be unable to deal with
this.
Newer kernels survive probably due to this:
xfs_sb_quota_from_disk(struct xfs_sb *sbp)
{
/*
* older mkfs doesn't initialize quota inodes to NULLFSINO. This
* leads to in-core values having two different values for a quota
* inode to be invalid: 0 and NULLFSINO. Change it to a single value
* NULLFSINO.
*
* Note that this change affect only the in-core values. These
* values are not written back to disk unless any quota information
* is written to the disk. Even in that case, sb_pquotino field is
* not written to disk unless the superblock supports pquotino.
*/
if (sbp->sb_uquotino == 0)
sbp->sb_uquotino = NULLFSINO;
if (sbp->sb_gquotino == 0)
sbp->sb_gquotino = NULLFSINO;
if (sbp->sb_pquotino == 0)
sbp->sb_pquotino = NULLFSINO;
so sb_gquotino = NULLFSINO gets set and it never reaches error condition at
xfs_qm_init_quotainos()
>
>
> (there was an additional problems with hangs on quotacheck like
> http://sprunge.us/LYQO (3.16.0-rc3-00006-g16874b2)
> http://sprunge.us/FfhR (3.15.3)
> http://sprunge.us/ObWI (3.10.20)
> but it only happened when doing quotacheck on image mounted via loop.
> Wasn't able to trigger it when using real disk, so blaming loop code for
> now)
--
Arkadiusz Miśkiewicz, arekm / maven.pl
More information about the xfs
mailing list