From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 02/10] GFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops
Date: Wed, 16 Sep 2009 16:03:34 +0100 [thread overview]
Message-ID: <1253113422-3429-3-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1253113422-3429-2-git-send-email-swhiteho@redhat.com>
The plan is to add further operations to the gfs2_quotactl_ops
in future patches. The sync operation is easy, so we start with
that one.
We plan to use the XFS quota control functions because they more
closely match the GFS2 ones.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/Kconfig | 2 ++
fs/gfs2/ops_fstype.c | 3 +++
fs/gfs2/quota.c | 4 ++++
fs/gfs2/quota.h | 1 +
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
index 5971359..4dcddf8 100644
--- a/fs/gfs2/Kconfig
+++ b/fs/gfs2/Kconfig
@@ -8,6 +8,8 @@ config GFS2_FS
select FS_POSIX_ACL
select CRC32
select SLOW_WORK
+ select QUOTA
+ select QUOTACTL
help
A cluster filesystem.
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 52fb6c0..5c8f8cc 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -18,6 +18,7 @@
#include <linux/mount.h>
#include <linux/gfs2_ondisk.h>
#include <linux/slow-work.h>
+#include <linux/quotaops.h>
#include "gfs2.h"
#include "incore.h"
@@ -1148,6 +1149,8 @@ static int fill_super(struct super_block *sb, void *data, int silent)
sb->s_op = &gfs2_super_ops;
sb->s_export_op = &gfs2_export_ops;
sb->s_xattr = gfs2_xattr_handlers;
+ sb->s_qcop = &gfs2_quotactl_ops;
+ sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE;
sb->s_time_gran = 1;
sb->s_maxbytes = MAX_LFS_FILESIZE;
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index ed9e197..73a43ce 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1378,3 +1378,7 @@ int gfs2_quotad(void *data)
return 0;
}
+const struct quotactl_ops gfs2_quotactl_ops = {
+ .quota_sync = gfs2_quota_sync,
+};
+
diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h
index 437afa7..025d15b 100644
--- a/fs/gfs2/quota.h
+++ b/fs/gfs2/quota.h
@@ -50,5 +50,6 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip)
}
extern int gfs2_shrink_qd_memory(int nr, gfp_t gfp_mask);
+extern const struct quotactl_ops gfs2_quotactl_ops;
#endif /* __QUOTA_DOT_H__ */
--
1.6.2.5
next prev parent reply other threads:[~2009-09-16 15:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 15:03 [Cluster-devel] Mostly quotas Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 01/10] GFS2: Alter arguments of gfs2_quota/statfs_sync Steven Whitehouse
2009-09-16 15:03 ` Steven Whitehouse [this message]
2009-09-16 15:03 ` [Cluster-devel] [PATCH 03/10] GFS2: Remove obsolete code in quota.c Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 04/10] GFS2: Add get_xstate quota function Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 05/10] GFS2: Remove sysfs "done" files Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 06/10] GFS2: Add proper error reporting to quota sync via sysfs Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 07/10] GFS2: Remove constant argument from qdsb_get() Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 08/10] GFS2: Remove constant argument from qd_get() Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 09/10] GFS2: Clean up gfs2_adjust_quota() and do_glock() Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 10/10] GFS2: Add get_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=1253113422-3429-3-git-send-email-swhiteho@redhat.com \
--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).