Hi Donald,
I see. I tested your patch and it was no problem.
Mon, 05 Mar 2007 17:17:55 +1100 Donald Douwsma wrote:
>Hi Utako,
>
>That's closer to what I was thinking of but I'd prefer to do the
>manipulation separate to init. Putting it in xfs_qm_mount_quotas()
>minimizes the number of places changes are made to the superblock.
>
>We dont need to worry about group/project differences as a
>quotacheck is forced by XFS_QM_NEED_QUOTACHECK() if there are
>incompatibilities.
>
>
>Signed-off-by: Donald Douwsma <donaldd@xxxxxxx>
>
>--- a/fs/xfs/quota/xfs_qm.c 2007-03-05 16:50:11.000000000 +1100
>+++ b/fs/xfs/quota/xfs_qm.c 2007-03-05 15:36:12.000000000 +1100
>@@ -388,6 +388,17 @@ xfs_qm_mount_quotas(
> return XFS_ERROR(error);
> }
> }
>+ /*
>+ * If one type of quotas is off, then it will lose its
>+ * quotachecked status, since we won't be doing accounting for
>+ * that type anymore.
>+ */
>+ if (!XFS_IS_UQUOTA_ON(mp)) {
>+ mp->m_qflags &= ~XFS_UQUOTA_CHKD;
>+ }
>+ if (!(XFS_IS_GQUOTA_ON(mp) || XFS_IS_PQUOTA_ON(mp))) {
>+ mp->m_qflags &= ~XFS_OQUOTA_CHKD;
>+ }
>
> write_changes:
> /*
>
>
>Utako Kusaka wrote:
>> Hi,
>>
>> This new patch skips the quota check when the filesystem is mounted
>> with the same quota option.
>>
>> Signed-off-by: Utako Kusaka <utako@xxxxxxxxxxxxxx>
>> ---
>>
>> --- fs/xfs/quota/xfs_qm.c.orgn 2007-02-22 17:30:07.000000000 +0900
>> +++ fs/xfs/quota/xfs_qm.c 2007-03-02 15:01:44.000000000 +0900
>> @@ -1175,7 +1175,12 @@ xfs_qm_init_quotainfo(
>> qinf->qi_dqperchunk = BBTOB(qinf->qi_dqchunklen);
>> do_div(qinf->qi_dqperchunk, sizeof(xfs_dqblk_t));
>>
>> - mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD);
>> + if (XFS_IS_UQUOTA_ON(mp) && (mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT))
>> + mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD);
>> + if (XFS_IS_GQUOTA_ON(mp) && (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT))
>> + mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD);
>> + if (XFS_IS_PQUOTA_ON(mp) && (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT))
>> + mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD);
>>
>> /*
>> * We try to get the limits from the superuser's limits fields.
|