*/
#include "fuse_i.h"
+#include "fuse.h"
#include <linux/init.h>
#include <linux/module.h>
#include <linux/swap.h>
#include <linux/splice.h>
#include <linux/aio.h>
+#include <linux/freezer.h>
MODULE_ALIAS_MISCDEV(FUSE_MINOR);
MODULE_ALIAS("devname:fuse");
* Wait it out.
*/
spin_unlock(&fc->lock);
- wait_event(req->waitq, req->state == FUSE_REQ_FINISHED);
+
+ while (req->state != FUSE_REQ_FINISHED)
+ wait_event_freezable(req->waitq,
+ req->state == FUSE_REQ_FINISHED);
spin_lock(&fc->lock);
if (!req->aborted)
}
}
+#define CREATE_TRACE_POINTS
+#include <linux/met_ftrace_fuse.h>
+
+void met_fuse(int t_pid, char *t_name, unsigned int op, unsigned int size, struct timespec s_time, struct timespec e_time)
+{
+ MET_FTRACE_PRINTK(met_fuse, t_pid, t_name, op, size, s_time, e_time);
+}
+
static void __fuse_request_send(struct fuse_conn *fc, struct fuse_req *req)
{
BUG_ON(req->background);
spin_unlock(&fc->lock);
}
-void fuse_request_send(struct fuse_conn *fc, struct fuse_req *req)
+void fuse_request_send_ex(struct fuse_conn *fc, struct fuse_req *req,
+ __u32 size)
{
+#ifdef MET_FUSEIO_TRACE
+ char name[TASK_COMM_LEN];
+#endif
+
+ MET_FUSE_IOLOG_INIT();
+ FUSE_IOLOG_INIT();
req->isreply = 1;
+ FUSE_IOLOG_START();
+ MET_FUSE_IOLOG_START();
__fuse_request_send(fc, req);
+ MET_FUSE_IOLOG_END();
+ FUSE_IOLOG_END();
+ FUSE_IOLOG_PRINT(size, req->in.h.opcode);
+
+#ifdef MET_FUSEIO_TRACE
+ met_fuse(task_pid_nr(current), get_task_comm(name, current), req->in.h.opcode, size, met_fuse_start_time, met_fuse_end_time);
+#endif
+}
+EXPORT_SYMBOL_GPL(fuse_request_send_ex);
+
+void fuse_request_send(struct fuse_conn *fc, struct fuse_req *req)
+{
+ fuse_request_send_ex(fc, req, 0);
}
EXPORT_SYMBOL_GPL(fuse_request_send);
}
}
-void fuse_request_send_background(struct fuse_conn *fc, struct fuse_req *req)
+void fuse_request_send_background_ex(struct fuse_conn *fc, struct fuse_req *req,
+ __u32 size)
{
+ FUSE_IOLOG_INIT();
+ FUSE_IOLOG_START();
req->isreply = 1;
fuse_request_send_nowait(fc, req);
+ FUSE_IOLOG_END();
+ FUSE_IOLOG_PRINT(size, req->in.h.opcode);
+}
+EXPORT_SYMBOL_GPL(fuse_request_send_background_ex);
+
+void fuse_request_send_background(struct fuse_conn *fc, struct fuse_req *req)
+{
+ fuse_request_send_background_ex(fc, req, 0);
}
EXPORT_SYMBOL_GPL(fuse_request_send_background);