xfs: widen ondisk quota expiration timestamps to handle y2038+
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> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Allison Collins <allison.henderson@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
@@ -55,6 +55,12 @@ xfs_trans_log_dquot(
|
||||
{
|
||||
ASSERT(XFS_DQ_IS_LOCKED(dqp));
|
||||
|
||||
/* Upgrade the dquot to bigtime format if possible. */
|
||||
if (dqp->q_id != 0 &&
|
||||
xfs_sb_version_hasbigtime(&tp->t_mountp->m_sb) &&
|
||||
!(dqp->q_type & XFS_DQTYPE_BIGTIME))
|
||||
dqp->q_type |= XFS_DQTYPE_BIGTIME;
|
||||
|
||||
tp->t_flags |= XFS_TRANS_DIRTY;
|
||||
set_bit(XFS_LI_DIRTY, &dqp->q_logitem.qli_item.li_flags);
|
||||
}
|
||||
|
Reference in New Issue
Block a user