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

xfs: remove warning counters from struct xfs_dquot_res

Warning counts are not used anywhere in the kernel. In addition, there
are no use cases, test coverage, or documentation for this functionality.
Remove the 'warnings' field from struct xfs_dquot_res and any other
related code.

Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>

authored by

Catherine Hoang and committed by
Dave Chinner
2e06df55 5cc21e52

+7 -29
-1
fs/xfs/libxfs/xfs_quota_defs.h
··· 16 16 * and quota-limits. This is a waste in the common case, but hey ... 17 17 */ 18 18 typedef uint64_t xfs_qcnt_t; 19 - typedef uint16_t xfs_qwarncnt_t; 20 19 21 20 typedef uint8_t xfs_dqtype_t; 22 21
+4 -11
fs/xfs/xfs_dquot.c
··· 136 136 res->timer = xfs_dquot_set_timeout(mp, 137 137 ktime_get_real_seconds() + qlim->time); 138 138 } else { 139 - if (res->timer == 0) 140 - res->warnings = 0; 141 - else 142 - res->timer = 0; 139 + res->timer = 0; 143 140 } 144 141 } 145 142 ··· 589 592 dqp->q_ino.count = be64_to_cpu(ddqp->d_icount); 590 593 dqp->q_rtb.count = be64_to_cpu(ddqp->d_rtbcount); 591 594 592 - dqp->q_blk.warnings = be16_to_cpu(ddqp->d_bwarns); 593 - dqp->q_ino.warnings = be16_to_cpu(ddqp->d_iwarns); 594 - dqp->q_rtb.warnings = be16_to_cpu(ddqp->d_rtbwarns); 595 - 596 595 dqp->q_blk.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_btimer); 597 596 dqp->q_ino.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_itimer); 598 597 dqp->q_rtb.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_rtbtimer); ··· 630 637 ddqp->d_icount = cpu_to_be64(dqp->q_ino.count); 631 638 ddqp->d_rtbcount = cpu_to_be64(dqp->q_rtb.count); 632 639 633 - ddqp->d_bwarns = cpu_to_be16(dqp->q_blk.warnings); 634 - ddqp->d_iwarns = cpu_to_be16(dqp->q_ino.warnings); 635 - ddqp->d_rtbwarns = cpu_to_be16(dqp->q_rtb.warnings); 640 + ddqp->d_bwarns = 0; 641 + ddqp->d_iwarns = 0; 642 + ddqp->d_rtbwarns = 0; 636 643 637 644 ddqp->d_btimer = xfs_dquot_to_disk_ts(dqp, dqp->q_blk.timer); 638 645 ddqp->d_itimer = xfs_dquot_to_disk_ts(dqp, dqp->q_ino.timer);
-8
fs/xfs/xfs_dquot.h
··· 44 44 * in seconds since the Unix epoch. 45 45 */ 46 46 time64_t timer; 47 - 48 - /* 49 - * For root dquots, this is the maximum number of warnings that will 50 - * be issued for this quota type. Otherwise, this is the number of 51 - * warnings issued against this quota. Note that none of this is 52 - * implemented. 53 - */ 54 - xfs_qwarncnt_t warnings; 55 47 }; 56 48 57 49 static inline bool
+3 -9
fs/xfs/xfs_qm_syscalls.c
··· 343 343 344 344 if (xfs_setqlim_limits(mp, res, qlim, hard, soft, "blk")) 345 345 xfs_dquot_set_prealloc_limits(dqp); 346 - if (newlim->d_fieldmask & QC_SPC_WARNS) 347 - res->warnings = newlim->d_spc_warns; 348 346 if (newlim->d_fieldmask & QC_SPC_TIMER) 349 347 xfs_setqlim_timer(mp, res, qlim, newlim->d_spc_timer); 350 348 ··· 357 359 qlim = id == 0 ? &defq->rtb : NULL; 358 360 359 361 xfs_setqlim_limits(mp, res, qlim, hard, soft, "rtb"); 360 - if (newlim->d_fieldmask & QC_RT_SPC_WARNS) 361 - res->warnings = newlim->d_rt_spc_warns; 362 362 if (newlim->d_fieldmask & QC_RT_SPC_TIMER) 363 363 xfs_setqlim_timer(mp, res, qlim, newlim->d_rt_spc_timer); 364 364 ··· 371 375 qlim = id == 0 ? &defq->ino : NULL; 372 376 373 377 xfs_setqlim_limits(mp, res, qlim, hard, soft, "ino"); 374 - if (newlim->d_fieldmask & QC_INO_WARNS) 375 - res->warnings = newlim->d_ino_warns; 376 378 if (newlim->d_fieldmask & QC_INO_TIMER) 377 379 xfs_setqlim_timer(mp, res, qlim, newlim->d_ino_timer); 378 380 ··· 411 417 dst->d_ino_count = dqp->q_ino.reserved; 412 418 dst->d_spc_timer = dqp->q_blk.timer; 413 419 dst->d_ino_timer = dqp->q_ino.timer; 414 - dst->d_ino_warns = dqp->q_ino.warnings; 415 - dst->d_spc_warns = dqp->q_blk.warnings; 420 + dst->d_ino_warns = 0; 421 + dst->d_spc_warns = 0; 416 422 dst->d_rt_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.hardlimit); 417 423 dst->d_rt_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.softlimit); 418 424 dst->d_rt_space = XFS_FSB_TO_B(mp, dqp->q_rtb.reserved); 419 425 dst->d_rt_spc_timer = dqp->q_rtb.timer; 420 - dst->d_rt_spc_warns = dqp->q_rtb.warnings; 426 + dst->d_rt_spc_warns = 0; 421 427 422 428 /* 423 429 * Internally, we don't reset all the timers when quota enforcement