Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull quota update from Jan Kara:
"time64 support for quota"

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
quota: use time64_t internally

+11 -11
+1 -1
fs/ocfs2/quota_global.c
··· 483 483 struct ocfs2_mem_dqinfo *info = sb_dqinfo(sb, type)->dqi_priv; 484 484 struct ocfs2_global_disk_dqblk dqblk; 485 485 s64 spacechange, inodechange; 486 - time_t olditime, oldbtime; 486 + time64_t olditime, oldbtime; 487 487 488 488 err = sb->s_op->quota_read(sb, type, (char *)&dqblk, 489 489 sizeof(struct ocfs2_global_disk_dqblk),
+8 -8
fs/quota/dquot.c
··· 1133 1133 else 1134 1134 dquot->dq_dqb.dqb_curinodes = 0; 1135 1135 if (dquot->dq_dqb.dqb_curinodes <= dquot->dq_dqb.dqb_isoftlimit) 1136 - dquot->dq_dqb.dqb_itime = (time_t) 0; 1136 + dquot->dq_dqb.dqb_itime = (time64_t) 0; 1137 1137 clear_bit(DQ_INODES_B, &dquot->dq_flags); 1138 1138 } 1139 1139 ··· 1145 1145 else 1146 1146 dquot->dq_dqb.dqb_curspace = 0; 1147 1147 if (dquot->dq_dqb.dqb_curspace <= dquot->dq_dqb.dqb_bsoftlimit) 1148 - dquot->dq_dqb.dqb_btime = (time_t) 0; 1148 + dquot->dq_dqb.dqb_btime = (time64_t) 0; 1149 1149 clear_bit(DQ_BLKS_B, &dquot->dq_flags); 1150 1150 } 1151 1151 ··· 1292 1292 if (dquot->dq_dqb.dqb_isoftlimit && 1293 1293 newinodes > dquot->dq_dqb.dqb_isoftlimit && 1294 1294 dquot->dq_dqb.dqb_itime && 1295 - get_seconds() >= dquot->dq_dqb.dqb_itime && 1295 + ktime_get_real_seconds() >= dquot->dq_dqb.dqb_itime && 1296 1296 !ignore_hardlimit(dquot)) { 1297 1297 prepare_warning(warn, dquot, QUOTA_NL_ISOFTLONGWARN); 1298 1298 return -EDQUOT; ··· 1302 1302 newinodes > dquot->dq_dqb.dqb_isoftlimit && 1303 1303 dquot->dq_dqb.dqb_itime == 0) { 1304 1304 prepare_warning(warn, dquot, QUOTA_NL_ISOFTWARN); 1305 - dquot->dq_dqb.dqb_itime = get_seconds() + 1305 + dquot->dq_dqb.dqb_itime = ktime_get_real_seconds() + 1306 1306 sb_dqopt(dquot->dq_sb)->info[dquot->dq_id.type].dqi_igrace; 1307 1307 } 1308 1308 ··· 1334 1334 if (dquot->dq_dqb.dqb_bsoftlimit && 1335 1335 tspace > dquot->dq_dqb.dqb_bsoftlimit && 1336 1336 dquot->dq_dqb.dqb_btime && 1337 - get_seconds() >= dquot->dq_dqb.dqb_btime && 1337 + ktime_get_real_seconds() >= dquot->dq_dqb.dqb_btime && 1338 1338 !ignore_hardlimit(dquot)) { 1339 1339 if (!prealloc) 1340 1340 prepare_warning(warn, dquot, QUOTA_NL_BSOFTLONGWARN); ··· 1346 1346 dquot->dq_dqb.dqb_btime == 0) { 1347 1347 if (!prealloc) { 1348 1348 prepare_warning(warn, dquot, QUOTA_NL_BSOFTWARN); 1349 - dquot->dq_dqb.dqb_btime = get_seconds() + 1349 + dquot->dq_dqb.dqb_btime = ktime_get_real_seconds() + 1350 1350 sb_dqopt(sb)->info[dquot->dq_id.type].dqi_bgrace; 1351 1351 } 1352 1352 else ··· 2695 2695 clear_bit(DQ_BLKS_B, &dquot->dq_flags); 2696 2696 } else if (!(di->d_fieldmask & QC_SPC_TIMER)) 2697 2697 /* Set grace only if user hasn't provided his own... */ 2698 - dm->dqb_btime = get_seconds() + dqi->dqi_bgrace; 2698 + dm->dqb_btime = ktime_get_real_seconds() + dqi->dqi_bgrace; 2699 2699 } 2700 2700 if (check_ilim) { 2701 2701 if (!dm->dqb_isoftlimit || ··· 2704 2704 clear_bit(DQ_INODES_B, &dquot->dq_flags); 2705 2705 } else if (!(di->d_fieldmask & QC_INO_TIMER)) 2706 2706 /* Set grace only if user hasn't provided his own... */ 2707 - dm->dqb_itime = get_seconds() + dqi->dqi_igrace; 2707 + dm->dqb_itime = ktime_get_real_seconds() + dqi->dqi_igrace; 2708 2708 } 2709 2709 if (dm->dqb_bhardlimit || dm->dqb_bsoftlimit || dm->dqb_ihardlimit || 2710 2710 dm->dqb_isoftlimit)
+2 -2
include/linux/quota.h
··· 200 200 qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ 201 201 qsize_t dqb_isoftlimit; /* preferred inode limit */ 202 202 qsize_t dqb_curinodes; /* current # allocated inodes */ 203 - time_t dqb_btime; /* time limit for excessive disk use */ 204 - time_t dqb_itime; /* time limit for excessive inode use */ 203 + time64_t dqb_btime; /* time limit for excessive disk use */ 204 + time64_t dqb_itime; /* time limit for excessive inode use */ 205 205 }; 206 206 207 207 /*