Skip to content

Commit efd409a

Browse files
committed
Merge branch 'xfs-5.19-quota-warn-remove' into xfs-5.19-for-next
2 parents 45ff8b4 + 5349b2a commit efd409a

File tree

8 files changed

+13
-62
lines changed

8 files changed

+13
-62
lines changed

fs/xfs/libxfs/xfs_quota_defs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* and quota-limits. This is a waste in the common case, but hey ...
1717
*/
1818
typedef uint64_t xfs_qcnt_t;
19-
typedef uint16_t xfs_qwarncnt_t;
2019

2120
typedef uint8_t xfs_dqtype_t;
2221

fs/xfs/xfs_dquot.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@ xfs_qm_adjust_res_timer(
136136
res->timer = xfs_dquot_set_timeout(mp,
137137
ktime_get_real_seconds() + qlim->time);
138138
} else {
139-
if (res->timer == 0)
140-
res->warnings = 0;
141-
else
142-
res->timer = 0;
139+
res->timer = 0;
143140
}
144141
}
145142

@@ -592,10 +589,6 @@ xfs_dquot_from_disk(
592589
dqp->q_ino.count = be64_to_cpu(ddqp->d_icount);
593590
dqp->q_rtb.count = be64_to_cpu(ddqp->d_rtbcount);
594591

595-
dqp->q_blk.warnings = be16_to_cpu(ddqp->d_bwarns);
596-
dqp->q_ino.warnings = be16_to_cpu(ddqp->d_iwarns);
597-
dqp->q_rtb.warnings = be16_to_cpu(ddqp->d_rtbwarns);
598-
599592
dqp->q_blk.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_btimer);
600593
dqp->q_ino.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_itimer);
601594
dqp->q_rtb.timer = xfs_dquot_from_disk_ts(ddqp, ddqp->d_rtbtimer);
@@ -637,9 +630,9 @@ xfs_dquot_to_disk(
637630
ddqp->d_icount = cpu_to_be64(dqp->q_ino.count);
638631
ddqp->d_rtbcount = cpu_to_be64(dqp->q_rtb.count);
639632

640-
ddqp->d_bwarns = cpu_to_be16(dqp->q_blk.warnings);
641-
ddqp->d_iwarns = cpu_to_be16(dqp->q_ino.warnings);
642-
ddqp->d_rtbwarns = cpu_to_be16(dqp->q_rtb.warnings);
633+
ddqp->d_bwarns = 0;
634+
ddqp->d_iwarns = 0;
635+
ddqp->d_rtbwarns = 0;
643636

644637
ddqp->d_btimer = xfs_dquot_to_disk_ts(dqp, dqp->q_blk.timer);
645638
ddqp->d_itimer = xfs_dquot_to_disk_ts(dqp, dqp->q_ino.timer);

fs/xfs/xfs_dquot.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ struct xfs_dquot_res {
4444
* in seconds since the Unix epoch.
4545
*/
4646
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;
5547
};
5648

5749
static inline bool

fs/xfs/xfs_qm.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,6 @@ xfs_qm_init_timelimits(
582582
defq->blk.time = XFS_QM_BTIMELIMIT;
583583
defq->ino.time = XFS_QM_ITIMELIMIT;
584584
defq->rtb.time = XFS_QM_RTBTIMELIMIT;
585-
defq->blk.warn = XFS_QM_BWARNLIMIT;
586-
defq->ino.warn = XFS_QM_IWARNLIMIT;
587-
defq->rtb.warn = XFS_QM_RTBWARNLIMIT;
588585

589586
/*
590587
* We try to get the limits from the superuser's limits fields.
@@ -608,12 +605,6 @@ xfs_qm_init_timelimits(
608605
defq->ino.time = dqp->q_ino.timer;
609606
if (dqp->q_rtb.timer)
610607
defq->rtb.time = dqp->q_rtb.timer;
611-
if (dqp->q_blk.warnings)
612-
defq->blk.warn = dqp->q_blk.warnings;
613-
if (dqp->q_ino.warnings)
614-
defq->ino.warn = dqp->q_ino.warnings;
615-
if (dqp->q_rtb.warnings)
616-
defq->rtb.warn = dqp->q_rtb.warnings;
617608

618609
xfs_qm_dqdestroy(dqp);
619610
}

fs/xfs/xfs_qm.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ struct xfs_quota_limits {
3434
xfs_qcnt_t hard; /* default hard limit */
3535
xfs_qcnt_t soft; /* default soft limit */
3636
time64_t time; /* limit for timers */
37-
xfs_qwarncnt_t warn; /* limit for warnings */
3837
};
3938

4039
/* Defaults for each quota type: time limits, warn limits, usage limits */
@@ -134,10 +133,6 @@ struct xfs_dquot_acct {
134133
#define XFS_QM_RTBTIMELIMIT (7 * 24*60*60) /* 1 week */
135134
#define XFS_QM_ITIMELIMIT (7 * 24*60*60) /* 1 week */
136135

137-
#define XFS_QM_BWARNLIMIT 5
138-
#define XFS_QM_IWARNLIMIT 5
139-
#define XFS_QM_RTBWARNLIMIT 5
140-
141136
extern void xfs_qm_destroy_quotainfo(struct xfs_mount *);
142137

143138
/* quota ops */

fs/xfs/xfs_qm_syscalls.c

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ xfs_qm_scall_quotaon(
217217
return 0;
218218
}
219219

220-
#define XFS_QC_MASK \
221-
(QC_LIMIT_MASK | QC_TIMER_MASK | QC_WARNS_MASK)
220+
#define XFS_QC_MASK (QC_LIMIT_MASK | QC_TIMER_MASK)
222221

223222
/*
224223
* Adjust limits of this quota, and the defaults if passed in. Returns true
@@ -250,17 +249,6 @@ xfs_setqlim_limits(
250249
return true;
251250
}
252251

253-
static inline void
254-
xfs_setqlim_warns(
255-
struct xfs_dquot_res *res,
256-
struct xfs_quota_limits *qlim,
257-
int warns)
258-
{
259-
res->warnings = warns;
260-
if (qlim)
261-
qlim->warn = warns;
262-
}
263-
264252
static inline void
265253
xfs_setqlim_timer(
266254
struct xfs_mount *mp,
@@ -354,8 +342,6 @@ xfs_qm_scall_setqlim(
354342

355343
if (xfs_setqlim_limits(mp, res, qlim, hard, soft, "blk"))
356344
xfs_dquot_set_prealloc_limits(dqp);
357-
if (newlim->d_fieldmask & QC_SPC_WARNS)
358-
xfs_setqlim_warns(res, qlim, newlim->d_spc_warns);
359345
if (newlim->d_fieldmask & QC_SPC_TIMER)
360346
xfs_setqlim_timer(mp, res, qlim, newlim->d_spc_timer);
361347

@@ -370,8 +356,6 @@ xfs_qm_scall_setqlim(
370356
qlim = id == 0 ? &defq->rtb : NULL;
371357

372358
xfs_setqlim_limits(mp, res, qlim, hard, soft, "rtb");
373-
if (newlim->d_fieldmask & QC_RT_SPC_WARNS)
374-
xfs_setqlim_warns(res, qlim, newlim->d_rt_spc_warns);
375359
if (newlim->d_fieldmask & QC_RT_SPC_TIMER)
376360
xfs_setqlim_timer(mp, res, qlim, newlim->d_rt_spc_timer);
377361

@@ -386,8 +370,6 @@ xfs_qm_scall_setqlim(
386370
qlim = id == 0 ? &defq->ino : NULL;
387371

388372
xfs_setqlim_limits(mp, res, qlim, hard, soft, "ino");
389-
if (newlim->d_fieldmask & QC_INO_WARNS)
390-
xfs_setqlim_warns(res, qlim, newlim->d_ino_warns);
391373
if (newlim->d_fieldmask & QC_INO_TIMER)
392374
xfs_setqlim_timer(mp, res, qlim, newlim->d_ino_timer);
393375

@@ -428,13 +410,13 @@ xfs_qm_scall_getquota_fill_qc(
428410
dst->d_ino_count = dqp->q_ino.reserved;
429411
dst->d_spc_timer = dqp->q_blk.timer;
430412
dst->d_ino_timer = dqp->q_ino.timer;
431-
dst->d_ino_warns = dqp->q_ino.warnings;
432-
dst->d_spc_warns = dqp->q_blk.warnings;
413+
dst->d_ino_warns = 0;
414+
dst->d_spc_warns = 0;
433415
dst->d_rt_spc_hardlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.hardlimit);
434416
dst->d_rt_spc_softlimit = XFS_FSB_TO_B(mp, dqp->q_rtb.softlimit);
435417
dst->d_rt_space = XFS_FSB_TO_B(mp, dqp->q_rtb.reserved);
436418
dst->d_rt_spc_timer = dqp->q_rtb.timer;
437-
dst->d_rt_spc_warns = dqp->q_rtb.warnings;
419+
dst->d_rt_spc_warns = 0;
438420

439421
/*
440422
* Internally, we don't reset all the timers when quota enforcement

fs/xfs/xfs_quotaops.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ xfs_qm_fill_state(
4040
tstate->spc_timelimit = (u32)defq->blk.time;
4141
tstate->ino_timelimit = (u32)defq->ino.time;
4242
tstate->rt_spc_timelimit = (u32)defq->rtb.time;
43-
tstate->spc_warnlimit = defq->blk.warn;
44-
tstate->ino_warnlimit = defq->ino.warn;
45-
tstate->rt_spc_warnlimit = defq->rtb.warn;
43+
tstate->spc_warnlimit = 0;
44+
tstate->ino_warnlimit = 0;
45+
tstate->rt_spc_warnlimit = 0;
4646
if (tempqip)
4747
xfs_irele(ip);
4848
}
@@ -98,7 +98,7 @@ xfs_quota_type(int type)
9898
}
9999
}
100100

101-
#define XFS_QC_SETINFO_MASK (QC_TIMER_MASK | QC_WARNS_MASK)
101+
#define XFS_QC_SETINFO_MASK (QC_TIMER_MASK)
102102

103103
/*
104104
* Adjust quota timers & warnings

fs/xfs/xfs_trans_dquot.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,7 @@ xfs_dqresv_check(
597597
if (softlimit && total_count > softlimit) {
598598
time64_t now = ktime_get_real_seconds();
599599

600-
if ((res->timer != 0 && now > res->timer) ||
601-
(res->warnings != 0 && res->warnings >= qlim->warn)) {
600+
if (res->timer != 0 && now > res->timer) {
602601
*fatal = true;
603602
return QUOTA_NL_ISOFTLONGWARN;
604603
}

0 commit comments

Comments
 (0)