diff options
author | Mark Fasheh <mfasheh@suse.com> | 2008-10-20 09:36:47 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:40:24 -0500 |
commit | 171bf93ce11f4c9929fdce6ce63df8da2f3c4475 (patch) | |
tree | a6f29032a86bcc2b0e9971c85ec8fab22b3300ef /fs/ocfs2/quota.h | |
parent | a90714c150e3ce677c57a9dac3ab1ec342c75a95 (diff) |
ocfs2: Periodic quota syncing
This patch creates a work queue for periodic syncing of locally cached quota
information to the global quota files. We constantly queue a delayed work
item, to get the periodic behavior.
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Acked-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ocfs2/quota.h')
-rw-r--r-- | fs/ocfs2/quota.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/quota.h b/fs/ocfs2/quota.h index 1f1c86311b32..e2233d51507f 100644 --- a/fs/ocfs2/quota.h +++ b/fs/ocfs2/quota.h | |||
@@ -39,6 +39,7 @@ struct ocfs2_mem_dqinfo { | |||
39 | unsigned int dqi_chunks; /* Number of chunks in local quota file */ | 39 | unsigned int dqi_chunks; /* Number of chunks in local quota file */ |
40 | unsigned int dqi_blocks; /* Number of blocks allocated for local quota file */ | 40 | unsigned int dqi_blocks; /* Number of blocks allocated for local quota file */ |
41 | unsigned int dqi_syncms; /* How often should we sync with other nodes */ | 41 | unsigned int dqi_syncms; /* How often should we sync with other nodes */ |
42 | unsigned int dqi_syncjiff; /* Precomputed dqi_syncms in jiffies */ | ||
42 | struct list_head dqi_chunk; /* List of chunks */ | 43 | struct list_head dqi_chunk; /* List of chunks */ |
43 | struct inode *dqi_gqinode; /* Global quota file inode */ | 44 | struct inode *dqi_gqinode; /* Global quota file inode */ |
44 | struct ocfs2_lock_res dqi_gqlock; /* Lock protecting quota information structure */ | 45 | struct ocfs2_lock_res dqi_gqlock; /* Lock protecting quota information structure */ |
@@ -47,6 +48,7 @@ struct ocfs2_mem_dqinfo { | |||
47 | struct buffer_head *dqi_lqi_bh; /* Buffer head with local quota file inode */ | 48 | struct buffer_head *dqi_lqi_bh; /* Buffer head with local quota file inode */ |
48 | struct buffer_head *dqi_ibh; /* Buffer with information header */ | 49 | struct buffer_head *dqi_ibh; /* Buffer with information header */ |
49 | struct qtree_mem_dqinfo dqi_gi; /* Info about global file */ | 50 | struct qtree_mem_dqinfo dqi_gi; /* Info about global file */ |
51 | struct delayed_work dqi_sync_work; /* Work for syncing dquots */ | ||
50 | }; | 52 | }; |
51 | 53 | ||
52 | static inline struct ocfs2_dquot *OCFS2_DQUOT(struct dquot *dquot) | 54 | static inline struct ocfs2_dquot *OCFS2_DQUOT(struct dquot *dquot) |
@@ -90,4 +92,7 @@ struct buffer_head *ocfs2_read_quota_block(struct inode *inode, | |||
90 | extern struct dquot_operations ocfs2_quota_operations; | 92 | extern struct dquot_operations ocfs2_quota_operations; |
91 | extern struct quota_format_type ocfs2_quota_format; | 93 | extern struct quota_format_type ocfs2_quota_format; |
92 | 94 | ||
95 | int ocfs2_quota_setup(void); | ||
96 | void ocfs2_quota_shutdown(void); | ||
97 | |||
93 | #endif /* _OCFS2_QUOTA_H */ | 98 | #endif /* _OCFS2_QUOTA_H */ |