aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-02-16 03:44:52 -0500
committerJan Kara <jack@suse.cz>2010-03-04 18:20:24 -0500
commit5fb324ad24febe57a8a2e62903dcb7bad546ea71 (patch)
treef49d1b8b7fe9feffbdd1afba18047001f5d7228f /include
parent8c4e4acd660a09e571a71583b5bbe1eee700c9ad (diff)
quota: move code from sync_quota_sb into vfs_quota_sync
Currenly sync_quota_sb does a lot of sync and truncate action that only applies to "VFS" style quotas and is actively harmful for the sync performance in XFS. Move it into vfs_quota_sync and add a wait parameter to ->quota_sync to tell if we need it or not. My audit of the GFS2 code says it's also not needed given the way GFS2 implements quotas, but I'd be happy if this can get a detailed review. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/linux/quota.h2
-rw-r--r--include/linux/quotaops.h17
2 files changed, 2 insertions, 17 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h
index a6861f117480..570348cbccb1 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -324,7 +324,7 @@ struct dquot_operations {
324struct quotactl_ops { 324struct quotactl_ops {
325 int (*quota_on)(struct super_block *, int, int, char *, int); 325 int (*quota_on)(struct super_block *, int, int, char *, int);
326 int (*quota_off)(struct super_block *, int, int); 326 int (*quota_off)(struct super_block *, int, int);
327 int (*quota_sync)(struct super_block *, int); 327 int (*quota_sync)(struct super_block *, int, int);
328 int (*get_info)(struct super_block *, int, struct if_dqinfo *); 328 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
329 int (*set_info)(struct super_block *, int, struct if_dqinfo *); 329 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
330 int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); 330 int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 69d26bc0f884..8cfd0d44c994 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -19,13 +19,6 @@ static inline struct quota_info *sb_dqopt(struct super_block *sb)
19/* 19/*
20 * declaration of quota_function calls in kernel. 20 * declaration of quota_function calls in kernel.
21 */ 21 */
22void sync_quota_sb(struct super_block *sb, int type);
23static inline void writeout_quota_sb(struct super_block *sb, int type)
24{
25 if (sb->s_qcop && sb->s_qcop->quota_sync)
26 sb->s_qcop->quota_sync(sb, type);
27}
28
29void inode_add_rsv_space(struct inode *inode, qsize_t number); 22void inode_add_rsv_space(struct inode *inode, qsize_t number);
30void inode_claim_rsv_space(struct inode *inode, qsize_t number); 23void inode_claim_rsv_space(struct inode *inode, qsize_t number);
31void inode_sub_rsv_space(struct inode *inode, qsize_t number); 24void inode_sub_rsv_space(struct inode *inode, qsize_t number);
@@ -67,7 +60,7 @@ int vfs_quota_on_mount(struct super_block *sb, char *qf_name,
67 int format_id, int type); 60 int format_id, int type);
68int vfs_quota_off(struct super_block *sb, int type, int remount); 61int vfs_quota_off(struct super_block *sb, int type, int remount);
69int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags); 62int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags);
70int vfs_quota_sync(struct super_block *sb, int type); 63int vfs_quota_sync(struct super_block *sb, int type, int wait);
71int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 64int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
72int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 65int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
73int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); 66int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di);
@@ -340,14 +333,6 @@ static inline void vfs_dq_free_inode(struct inode *inode)
340{ 333{
341} 334}
342 335
343static inline void sync_quota_sb(struct super_block *sb, int type)
344{
345}
346
347static inline void writeout_quota_sb(struct super_block *sb, int type)
348{
349}
350
351static inline int vfs_dq_off(struct super_block *sb, int remount) 336static inline int vfs_dq_off(struct super_block *sb, int remount)
352{ 337{
353 return 0; 338 return 0;