diff options
author | Nathan Scott <nathans@sgi.com> | 2005-06-21 01:49:06 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-06-21 01:49:06 -0400 |
commit | 754002b4fb1b553bd8f978bb6f5aca7af46fde67 (patch) | |
tree | e40e17fab79023052f0a66c8ee7c2cadbf434a98 /fs/xfs/quota/xfs_dquot.c | |
parent | 06d10dd9ca70ff1318ff2b871ff5f61a94223d9f (diff) |
[XFS] Merge a few minor fixes to the quota warning code.
SGI-PV: 938145
SGI-Modid: xfs-linux:xfs-kern:22901a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.c')
-rw-r--r-- | fs/xfs/quota/xfs_dquot.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index 68089f56d5cd..32ec7f4467d7 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
@@ -286,7 +286,9 @@ xfs_qm_adjust_dqlimits( | |||
286 | * We also return 0 as the values of the timers in Q_GETQUOTA calls, when | 286 | * We also return 0 as the values of the timers in Q_GETQUOTA calls, when |
287 | * enforcement's off. | 287 | * enforcement's off. |
288 | * In contrast, warnings are a little different in that they don't | 288 | * In contrast, warnings are a little different in that they don't |
289 | * 'automatically' get started when limits get exceeded. | 289 | * 'automatically' get started when limits get exceeded. They do |
290 | * get reset to zero, however, when we find the count to be under | ||
291 | * the soft limit (they are only ever set non-zero via userspace). | ||
290 | */ | 292 | */ |
291 | void | 293 | void |
292 | xfs_qm_adjust_dqtimers( | 294 | xfs_qm_adjust_dqtimers( |
@@ -315,6 +317,8 @@ xfs_qm_adjust_dqtimers( | |||
315 | INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)))) { | 317 | INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)))) { |
316 | INT_SET(d->d_btimer, ARCH_CONVERT, | 318 | INT_SET(d->d_btimer, ARCH_CONVERT, |
317 | get_seconds() + XFS_QI_BTIMELIMIT(mp)); | 319 | get_seconds() + XFS_QI_BTIMELIMIT(mp)); |
320 | } else { | ||
321 | d->d_bwarns = 0; | ||
318 | } | 322 | } |
319 | } else { | 323 | } else { |
320 | if ((!d->d_blk_softlimit || | 324 | if ((!d->d_blk_softlimit || |
@@ -336,6 +340,8 @@ xfs_qm_adjust_dqtimers( | |||
336 | INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)))) { | 340 | INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)))) { |
337 | INT_SET(d->d_itimer, ARCH_CONVERT, | 341 | INT_SET(d->d_itimer, ARCH_CONVERT, |
338 | get_seconds() + XFS_QI_ITIMELIMIT(mp)); | 342 | get_seconds() + XFS_QI_ITIMELIMIT(mp)); |
343 | } else { | ||
344 | d->d_iwarns = 0; | ||
339 | } | 345 | } |
340 | } else { | 346 | } else { |
341 | if ((!d->d_ino_softlimit || | 347 | if ((!d->d_ino_softlimit || |
@@ -357,6 +363,8 @@ xfs_qm_adjust_dqtimers( | |||
357 | INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)))) { | 363 | INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)))) { |
358 | INT_SET(d->d_rtbtimer, ARCH_CONVERT, | 364 | INT_SET(d->d_rtbtimer, ARCH_CONVERT, |
359 | get_seconds() + XFS_QI_RTBTIMELIMIT(mp)); | 365 | get_seconds() + XFS_QI_RTBTIMELIMIT(mp)); |
366 | } else { | ||
367 | d->d_rtbwarns = 0; | ||
360 | } | 368 | } |
361 | } else { | 369 | } else { |
362 | if ((!d->d_rtb_softlimit || | 370 | if ((!d->d_rtb_softlimit || |