cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 11/12] GFS2: Use dquot_send_warning()
Date: Wed, 23 Sep 2009 16:49:26 +0100	[thread overview]
Message-ID: <1253720966.6052.336.camel@localhost.localdomain> (raw)
In-Reply-To: <1253711732-2955-1-git-send-email-swhiteho@redhat.com>

For some reason patches 11 and 12 didn't make it earlier. So I'm
sending them on separately,

Steve.

From 377ccdd06591fb3dd40f936567e367b1f01319bc Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Thu, 17 Sep 2009 11:15:10 +0100
Subject: [PATCH 11/13] GFS2: Use dquot_send_warning()

This adds support to GFS2 to send quota warnings via netlink.
Also it removes a stray \r which was left over from when the
code used to print warnings on the console.

Signed-off-by: Steven Whitehouse <swhitehouse@redhat.com>
---
 fs/gfs2/quota.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index d451480..6ce98d3 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -964,7 +964,7 @@ static int print_message(struct gfs2_quota_data *qd, char *type)
 {
 	struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
 
-	printk(KERN_INFO "GFS2: fsid=%s: quota %s for %s %u\r\n",
+	printk(KERN_INFO "GFS2: fsid=%s: quota %s for %s %u\n",
 	       sdp->sd_fsname, type,
 	       (test_bit(QDF_USER, &qd->qd_flags)) ? "user" : "group",
 	       qd->qd_id);
@@ -1001,6 +1001,10 @@ int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid)
 
 		if (be64_to_cpu(qd->qd_qb.qb_limit) && (s64)be64_to_cpu(qd->qd_qb.qb_limit) < value) {
 			print_message(qd, "exceeded");
+			dquot_send_warning(test_bit(QDF_USER, &qd->qd_flags) ?
+					   USRQUOTA : GRPQUOTA, qd->qd_id,
+					   sdp->sd_vfs->s_dev, QUOTA_NL_BHARDWARN);
+
 			error = -EDQUOT;
 			break;
 		} else if (be64_to_cpu(qd->qd_qb.qb_warn) &&
@@ -1008,6 +1012,9 @@ int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid)
 			   time_after_eq(jiffies, qd->qd_last_warn +
 					 gfs2_tune_get(sdp,
 						gt_quota_warn_period) * HZ)) {
+			dquot_send_warning(test_bit(QDF_USER, &qd->qd_flags) ?
+					   USRQUOTA : GRPQUOTA, qd->qd_id,
+					   sdp->sd_vfs->s_dev, QUOTA_NL_BSOFTWARN);
 			error = print_message(qd, "warning");
 			qd->qd_last_warn = jiffies;
 		}
-- 
1.6.2.5





  parent reply	other threads:[~2009-09-23 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 13:15 [Cluster-devel] GFS2: Another quota of quotas Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 01/12] GFS2: Alter arguments of gfs2_quota/statfs_sync Steven Whitehouse
2009-09-23 13:15   ` [Cluster-devel] [PATCH 02/12] GFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops Steven Whitehouse
2009-09-23 13:15     ` [Cluster-devel] [PATCH 03/12] GFS2: Remove obsolete code in quota.c Steven Whitehouse
2009-09-23 13:15       ` [Cluster-devel] [PATCH 04/12] GFS2: Add get_xstate quota function Steven Whitehouse
2009-09-23 13:15         ` [Cluster-devel] [PATCH 05/12] GFS2: Add proper error reporting to quota sync via sysfs Steven Whitehouse
2009-09-23 13:15           ` [Cluster-devel] [PATCH 06/12] GFS2: Remove constant argument from qdsb_get() Steven Whitehouse
2009-09-23 13:15             ` [Cluster-devel] [PATCH 07/12] GFS2: Remove constant argument from qd_get() Steven Whitehouse
2009-09-23 13:15               ` [Cluster-devel] [PATCH 08/12] GFS2: Clean up gfs2_adjust_quota() and do_glock() Steven Whitehouse
2009-09-23 13:15                 ` [Cluster-devel] [PATCH 09/12] GFS2: Add get_xquota support Steven Whitehouse
2009-09-23 13:15                   ` [Cluster-devel] [PATCH 10/12] VFS: Export dquot_send_warning Steven Whitehouse
2009-09-23 15:49 ` Steven Whitehouse [this message]
2009-09-23 15:50 ` [Cluster-devel] [PATCH 12/12] GFS2: Add set_xquota support Steven Whitehouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1253720966.6052.336.camel@localhost.localdomain \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).