Commit cc632e7f authored by Steven Whitehouse's avatar Steven Whitehouse

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: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 8c42d637
...@@ -8,6 +8,8 @@ config GFS2_FS ...@@ -8,6 +8,8 @@ config GFS2_FS
select FS_POSIX_ACL select FS_POSIX_ACL
select CRC32 select CRC32
select SLOW_WORK select SLOW_WORK
select QUOTA
select QUOTACTL
help help
A cluster filesystem. A cluster filesystem.
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/gfs2_ondisk.h> #include <linux/gfs2_ondisk.h>
#include <linux/slow-work.h> #include <linux/slow-work.h>
#include <linux/quotaops.h>
#include "gfs2.h" #include "gfs2.h"
#include "incore.h" #include "incore.h"
...@@ -1138,6 +1139,8 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent ...@@ -1138,6 +1139,8 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent
sb->s_op = &gfs2_super_ops; sb->s_op = &gfs2_super_ops;
sb->s_export_op = &gfs2_export_ops; sb->s_export_op = &gfs2_export_ops;
sb->s_xattr = gfs2_xattr_handlers; 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_time_gran = 1;
sb->s_maxbytes = MAX_LFS_FILESIZE; sb->s_maxbytes = MAX_LFS_FILESIZE;
......
...@@ -1378,3 +1378,7 @@ int gfs2_quotad(void *data) ...@@ -1378,3 +1378,7 @@ int gfs2_quotad(void *data)
return 0; return 0;
} }
const struct quotactl_ops gfs2_quotactl_ops = {
.quota_sync = gfs2_quota_sync,
};
...@@ -50,5 +50,6 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip) ...@@ -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 int gfs2_shrink_qd_memory(int nr, gfp_t gfp_mask);
extern const struct quotactl_ops gfs2_quotactl_ops;
#endif /* __QUOTA_DOT_H__ */ #endif /* __QUOTA_DOT_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment