#include "mds_client.h"
#include "cache.h"
#include "io.h"
+#include "trace.h"
static __le32 ceph_flags_sys2wire(u32 flags)
{
/* set up inode, dentry and return */
err = ceph_finish_async_open(dir, dentry, file,
mode, req, &as_ctx);
+ trace_ceph_async_create(dir, dentry);
goto out_req;
case -ECHILD:
/* do a sync create */
out_fmode:
if (!req->r_err && req->r_target_inode)
ceph_put_fmode(ceph_inode(req->r_target_inode), req->r_fmode);
+ trace_ceph_sync_create(dir, dentry);
out_req:
ceph_mdsc_put_request(req);
out_ctx:
),
TP_ARGS(dir, dentry),
TP_STRUCT__entry(
- __field(u64, ino)
+ __field(u64, pino)
__field(u64, snap)
+ __field(u64, ino)
__string(name, dentry->d_name.name)
),
TP_fast_assign(
- __entry->ino = ceph_inode(dir)->i_vino.ino;
+ __entry->pino = ceph_inode(dir)->i_vino.ino;
__entry->snap = ceph_inode(dir)->i_vino.snap;
+ __entry->ino = d_inode(dentry) ? ceph_inode(d_inode(dentry))->i_vino.ino : 0;
__assign_str(name, dentry->d_name.name);
),
TP_printk(
- "name=%s:0x%llx/%s",
- show_snapid(__entry->snap), __entry->ino,
- __get_str(name)
+ "name=%s:0x%llx/%s(0x%llx)",
+ show_snapid(__entry->snap), __entry->pino,
+ __get_str(name), __entry->ino
)
);
DEFINE_CEPH_DIRECTORY_EVENT(async_unlink);
DEFINE_CEPH_DIRECTORY_EVENT(sync_unlink);
+DEFINE_CEPH_DIRECTORY_EVENT(async_create);
+DEFINE_CEPH_DIRECTORY_EVENT(sync_create);
#endif /* _CEPH_TRACE_H */