aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-09-15 04:59:02 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2009-12-03 06:49:09 -0500
commitcc632e7f93465597896862cf9e50baefb1999215 (patch)
tree4a4a98f86e4fbfc5d127f2059c658ce2da1a87b0
parent8c42d637f6f2859e0fb28b78d5add7f0dc6d0973 (diff)
GFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops
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>
-rw-r--r--fs/gfs2/Kconfig2
-rw-r--r--fs/gfs2/ops_fstype.c3
-rw-r--r--fs/gfs2/quota.c4
-rw-r--r--fs/gfs2/quota.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
index 5971359d2090..4dcddf83326f 100644
--- a/fs/gfs2/Kconfig
+++ b/fs/gfs2/Kconfig
@@ -8,6 +8,8 @@ config GFS2_FS
8 select FS_POSIX_ACL 8 select FS_POSIX_ACL
9 select CRC32 9 select CRC32
10 select SLOW_WORK 10 select SLOW_WORK
11 select QUOTA
12 select QUOTACTL
11 help 13 help
12 A cluster filesystem. 14 A cluster filesystem.
13 15
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index e5ee06231ae5..36b11cba57e3 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -18,6 +18,7 @@
18#include <linux/mount.h> 18#include <linux/mount.h>
19#include <linux/gfs2_ondisk.h> 19#include <linux/gfs2_ondisk.h>
20#include <linux/slow-work.h> 20#include <linux/slow-work.h>
21#include <linux/quotaops.h>
21 22
22#include "gfs2.h" 23#include "gfs2.h"
23#include "incore.h" 24#include "incore.h"
@@ -1138,6 +1139,8 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent
1138 sb->s_op = &gfs2_super_ops; 1139 sb->s_op = &gfs2_super_ops;
1139 sb->s_export_op = &gfs2_export_ops; 1140 sb->s_export_op = &gfs2_export_ops;
1140 sb->s_xattr = gfs2_xattr_handlers; 1141 sb->s_xattr = gfs2_xattr_handlers;
1142 sb->s_qcop = &gfs2_quotactl_ops;
1143 sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE;
1141 sb->s_time_gran = 1; 1144 sb->s_time_gran = 1;
1142 sb->s_maxbytes = MAX_LFS_FILESIZE; 1145 sb->s_maxbytes = MAX_LFS_FILESIZE;
1143 1146
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index ed9e1971b2cd..73a43cee0ea3 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1378,3 +1378,7 @@ int gfs2_quotad(void *data)
1378 return 0; 1378 return 0;
1379} 1379}
1380 1380
1381const struct quotactl_ops gfs2_quotactl_ops = {
1382 .quota_sync = gfs2_quota_sync,
1383};
1384
diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h
index 437afa77663f..025d15ba24c0 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)
50} 50}
51 51
52extern int gfs2_shrink_qd_memory(int nr, gfp_t gfp_mask); 52extern int gfs2_shrink_qd_memory(int nr, gfp_t gfp_mask);
53extern const struct quotactl_ops gfs2_quotactl_ops;
53 54
54#endif /* __QUOTA_DOT_H__ */ 55#endif /* __QUOTA_DOT_H__ */