diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-02-19 17:02:26 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-03 18:47:47 -0800 |
commit | 5a00bfa345f845a1ac67ba2bfd4dd76708b57a4f (patch) | |
tree | ea006eac54be3bfc058afd1126ad9ca4232e7717 /fs/xfs/xfs_qm.c | |
parent | 9e268e98441b38dd1c55f6312dd7c10512c494ee (diff) |
xfs: enable bigtime for quota timers
Enable the bigtime feature for quota timers. We decrease the accuracy
of the timers to ~4s in exchange for being able to set timers up to the
bigtime maximum.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r-- | fs/xfs/xfs_qm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index 3a62f07f39b5..c319860aaf45 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -630,15 +630,15 @@ xfs_qm_init_timelimits( * more writing. If it is zero, a default is used. */ if (ddqp->d_btimer) { - xfs_dquot_from_disk_timestamp(&tv, ddqp->d_btimer); + xfs_dquot_from_disk_timestamp(ddqp, &tv, ddqp->d_btimer); qinf->qi_btimelimit = tv.tv_sec; } if (ddqp->d_itimer) { - xfs_dquot_from_disk_timestamp(&tv, ddqp->d_itimer); + xfs_dquot_from_disk_timestamp(ddqp, &tv, ddqp->d_itimer); qinf->qi_itimelimit = tv.tv_sec; } if (ddqp->d_rtbtimer) { - xfs_dquot_from_disk_timestamp(&tv, ddqp->d_rtbtimer); + xfs_dquot_from_disk_timestamp(ddqp, &tv, ddqp->d_rtbtimer); qinf->qi_rtbtimelimit = tv.tv_sec; } if (ddqp->d_bwarns) @@ -903,12 +903,13 @@ xfs_qm_reset_dqcounts( * should not reset them. */ if (ddq->d_id != 0) { - xfs_dquot_to_disk_timestamp(&ddq->d_btimer, &tv); - xfs_dquot_to_disk_timestamp(&ddq->d_itimer, &tv); - xfs_dquot_to_disk_timestamp(&ddq->d_rtbtimer, &tv); + xfs_dquot_to_disk_timestamp(ddq, &ddq->d_btimer, &tv); + xfs_dquot_to_disk_timestamp(ddq, &ddq->d_itimer, &tv); + xfs_dquot_to_disk_timestamp(ddq, &ddq->d_rtbtimer, &tv); ddq->d_bwarns = 0; ddq->d_iwarns = 0; ddq->d_rtbwarns = 0; + xfs_dquot_add_bigtime(mp, ddq); } if (xfs_sb_version_hascrc(&mp->m_sb)) { |