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>
This commit is contained in:
Mark Fasheh
2008-10-20 15:36:47 +02:00
parent a90714c150
commit 171bf93ce1
4 changed files with 101 additions and 0 deletions

View File

@@ -1107,11 +1107,16 @@ static int __init ocfs2_init(void)
mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n");
}
status = ocfs2_quota_setup();
if (status)
goto leave;
ocfs2_set_locking_protocol();
status = register_quota_format(&ocfs2_quota_format);
leave:
if (status < 0) {
ocfs2_quota_shutdown();
ocfs2_free_mem_caches();
exit_ocfs2_uptodate_cache();
}
@@ -1128,6 +1133,8 @@ static void __exit ocfs2_exit(void)
{
mlog_entry_void();
ocfs2_quota_shutdown();
if (ocfs2_wq) {
flush_workqueue(ocfs2_wq);
destroy_workqueue(ocfs2_wq);