From 171bf93ce11f4c9929fdce6ce63df8da2f3c4475 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Mon, 20 Oct 2008 15:36:47 +0200 Subject: 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 Acked-by: Jan Kara --- fs/ocfs2/super.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs/ocfs2/super.c') diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 7bb83e41581e..60f1d29421ad 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -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); -- cgit v1.2.3