- reference count lease validations on path lookup?
kernel client
-- flush all WRITE caps on session close
- flush caps on sync, fsync, etc.
- hmm, should these go in a per-session "check" list, instead of independently scheduling delayed_work for each inode?
- fsync should flush cap file size to mds. not sure how to block on that, however.. maybe a want_reply flag in the cap msg?
client->monc.monmap = new;
if (first) {
+ char name[10];
client->whoami = le32_to_cpu(msg->hdr.dst.name.num);
client->msgr->inst.name = msg->hdr.dst.name;
- dout(1, "i am client%d, fsid is %llx.%llx\n", client->whoami,
+ sprintf(name, "client%d", client->whoami);
+ dout(1, "i am %s, fsid is %llx.%llx\n", name,
le64_to_cpu(client->monc.monmap->fsid.major),
le64_to_cpu(client->monc.monmap->fsid.minor));
+
+ client->client_kobj = kobject_create_and_add(name, ceph_kobj);
+ //client->fsid_kobj = kobject_create_and_add("fsid",
+ //client->client_kobj);
}
}
/* unmount */
/* ... */
+ if (cl->client_kobj)
+ kobject_put(cl->client_kobj);
if (cl->wb_wq)
destroy_workqueue(cl->wb_wq);
ceph_messenger_destroy(cl->msgr);
.fs_flags = FS_RENAME_DOES_D_MOVE,
};
+struct kobject *ceph_kobj;
+
static int __init init_ceph(void)
{
int ret = 0;
dout(1, "init_ceph\n");
-
spin_lock_init(&ceph_client_spinlock);
+ ceph_kobj = kobject_create_and_add("ceph", fs_kobj);
+ if (!ceph_kobj)
+ return -ENOMEM;
+
ceph_fs_proc_init();
ret = init_inodecache();
{
dout(1, "exit_ceph\n");
+ kobject_put(ceph_kobj);
+ ceph_kobj = 0;
+
unregister_filesystem(&ceph_fs_type);
destroy_inodecache();
}
#include <linux/completion.h>
#include <linux/pagemap.h>
#include <linux/exportfs.h>
+#include <linux/sysfs.h>
#include "ceph_fs.h"
#include "messenger.h"
CEPH_MOUNT_UNMOUNTED,
};
+
+extern struct kobject *ceph_kobj;
+
/*
* per-filesystem client state
*
/* writeback */
struct workqueue_struct *wb_wq;
+ struct kobject *client_kobj;
+
/* lets ignore all this until later */
spinlock_t sb_lock;
int num_sb; /* ref count (for each sb_info that points to me) */