.umount_begin = ll_umount_begin
};
-
struct file_system_type lustre_lite_fs_type = {
.owner = THIS_MODULE,
.name = "lustre_lite",
.get_sb = ll_get_sb,
.kill_sb = kill_anon_super,
- .fs_flags = FS_BINARY_MOUNTDATA,
+ .fs_flags = FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
};
struct file_system_type lustre_fs_type = {
.name = "lustre",
.get_sb = lustre_get_sb,
.kill_sb = kill_anon_super,
- .fs_flags = FS_BINARY_MOUNTDATA,
+ .fs_flags = FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
};
static int __init init_lustre_lite(void)
printk(KERN_INFO "Lustre: Lustre Lite Client File System; "
"info@clusterfs.com\n");
+
rc = ll_init_inodecache();
if (rc)
return -ENOMEM;
+
ll_file_data_slab = kmem_cache_create("ll_file_data",
sizeof(struct ll_file_data), 0,
SLAB_HWCACHE_ALIGN, NULL, NULL);
if (ll_file_data_slab == NULL) {
- GOTO(out, rc = ENOMEM);
+ rc = -ENOMEM;
+ goto out;
+ }
+ ll_intent_slab = kmem_cache_create("lustre_intent_data",
+ sizeof(struct lustre_intent_data),
+ 0, SLAB_HWCACHE_ALIGN, NULL,
+ NULL);
+ if (ll_intent_slab == NULL) {
+ kmem_cache_destroy(ll_file_data_slab);
+ ll_destroy_inodecache();
return -ENOMEM;
}
+
proc_lustre_fs_root = proc_lustre_root ?
proc_mkdir("llite", proc_lustre_root) : NULL;
rc = register_filesystem(&lustre_lite_fs_type);
if (rc)
- GOTO(out, rc);
+ goto out;
cleanup = 1;
rc = register_filesystem(&lustre_fs_type);
if (rc)
- GOTO(out, rc);
+ goto out;
cleanup = 2;
rc = ll_gns_start_thread();
if (rc)
- GOTO(out, rc);
+ goto out;
return 0;
-
out:
switch (cleanup) {
case 2:
{
unregister_filesystem(&lustre_fs_type);
unregister_filesystem(&lustre_lite_fs_type);
+
+ ll_gns_stop_thread();
ll_destroy_inodecache();
LASSERTF(kmem_cache_destroy(ll_file_data_slab) == 0,
"couldn't destroy ll_file_data slab\n");
+ LASSERTF(kmem_cache_destroy(ll_intent_slab) == 0,
+ "couldn't destroy ll_intent_slab slab\n");
if (proc_lustre_fs_root) {
lprocfs_remove(proc_lustre_fs_root);
proc_lustre_fs_root = NULL;