aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2008-10-20 09:36:47 -0400
committerMark Fasheh <mfasheh@suse.com>2009-01-05 11:40:24 -0500
commit171bf93ce11f4c9929fdce6ce63df8da2f3c4475 (patch)
treea6f29032a86bcc2b0e9971c85ec8fab22b3300ef /fs/ocfs2/super.c
parenta90714c150e3ce677c57a9dac3ab1ec342c75a95 (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/super.c')
-rw-r--r--fs/ocfs2/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 7bb83e41581..60f1d29421a 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1107,11 +1107,16 @@ static int __init ocfs2_init(void)
1107 mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n"); 1107 mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n");
1108 } 1108 }
1109 1109
1110 status = ocfs2_quota_setup();
1111 if (status)
1112 goto leave;
1113
1110 ocfs2_set_locking_protocol(); 1114 ocfs2_set_locking_protocol();
1111 1115
1112 status = register_quota_format(&ocfs2_quota_format); 1116 status = register_quota_format(&ocfs2_quota_format);
1113leave: 1117leave:
1114 if (status < 0) { 1118 if (status < 0) {
1119 ocfs2_quota_shutdown();
1115 ocfs2_free_mem_caches(); 1120 ocfs2_free_mem_caches();
1116 exit_ocfs2_uptodate_cache(); 1121 exit_ocfs2_uptodate_cache();
1117 } 1122 }
@@ -1128,6 +1133,8 @@ static void __exit ocfs2_exit(void)
1128{ 1133{
1129 mlog_entry_void(); 1134 mlog_entry_void();
1130 1135
1136 ocfs2_quota_shutdown();
1137
1131 if (ocfs2_wq) { 1138 if (ocfs2_wq) {
1132 flush_workqueue(ocfs2_wq); 1139 flush_workqueue(ocfs2_wq);
1133 destroy_workqueue(ocfs2_wq); 1140 destroy_workqueue(ocfs2_wq);