summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2008-10-20 15:36:47 +0200
committerMark Fasheh <mfasheh@suse.com>2009-01-05 17:40:24 +0100
commit171bf93ce11f4c9929fdce6ce63df8da2f3c4475 (patch)
treea6f29032a86bcc2b0e9971c85ec8fab22b3300ef /fs/ocfs2/super.c
parentocfs2: Add quota calls for allocation and freeing of inodes and space (diff)
downloadlinux-171bf93ce11f4c9929fdce6ce63df8da2f3c4475.tar.xz
linux-171bf93ce11f4c9929fdce6ce63df8da2f3c4475.zip
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 '')
-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 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);