[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio: bring fuse ktraces to a common view
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Jan 10 13:22:10 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.83.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.83.4
------>
commit e9e7d8b89a22e3b73de9fc71b1826f202c373f43
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date: Thu Jan 10 13:22:07 2019 +0300
fs/fuse kio: bring fuse ktraces to a common view
Since the fuse client adds \n to each message and allows only a single message
view, let's bring these to a common view and remove all \n in FUSE_K* messages.
https://pmc.acronis.com/browse/VSTOR-18383
Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
Acked-by: Pavel Emelianov <xemul at virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_cs.c | 2 +-
fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 2 +-
fs/fuse/kio/pcs/pcs_map.c | 2 +-
fs/fuse/kio/pcs/pcs_req.c | 2 +-
fs/fuse/kio/pcs/pcs_rpc.c | 10 +++++-----
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_cs.c b/fs/fuse/kio/pcs/pcs_cs.c
index 60e2dc545cc5..48e3b3cedc4e 100644
--- a/fs/fuse/kio/pcs/pcs_cs.c
+++ b/fs/fuse/kio/pcs/pcs_cs.c
@@ -708,7 +708,7 @@ static int cs_input(struct pcs_rpc *ep, struct pcs_msg *msg)
msg->done(msg);
return 0;
default:
- FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Unsupported message type %u\n", h->type);
+ FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Unsupported message type %u", h->type);
return PCS_ERR_PROTOCOL;
}
}
diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index cdd4fe578128..debfe0688ae4 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -1483,7 +1483,7 @@ void __kfuse_trace(struct fuse_conn * fc, unsigned long ip, const char * fmt, ..
if (ip)
__trace_puts(ip, buf, len);
else
- pr_debug("%s", buf);
+ pr_debug("%s\n", buf);
}
put_cpu();
}
diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index ad31d1222da3..2e30f0461101 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -1947,7 +1947,7 @@ static int pcs_cslist_submit_read(struct pcs_int_request *ireq, struct pcs_cs_li
WRITE_ONCE(csl->read_index, i);
WRITE_ONCE(csl->select_stamp, jiffies);
- FUSE_KTRACE(ireq->cc->fc, "Selected read map " MAP_FMT " to CS" NODE_FMT "; is_seq=%d\n", MAP_ARGS(ireq->iochunk.map),
+ FUSE_KTRACE(ireq->cc->fc, "Selected read map " MAP_FMT " to CS" NODE_FMT "; is_seq=%d", MAP_ARGS(ireq->iochunk.map),
NODE_ARGS(csl->cs[i].cslink.cs->id), is_seq);
pcs_flow_bind_cs(ireq->iochunk.flow, csl->cs[i].cslink.cs);
}
diff --git a/fs/fuse/kio/pcs/pcs_req.c b/fs/fuse/kio/pcs/pcs_req.c
index 38a8af57732e..9e4dc5e7b15d 100644
--- a/fs/fuse/kio/pcs/pcs_req.c
+++ b/fs/fuse/kio/pcs/pcs_req.c
@@ -139,7 +139,7 @@ noinline void pcs_ireq_queue_fail(struct list_head *queue, int error)
if (!(ireq->flags & IREQ_F_FATAL)) {
pcs_clear_error(&ireq->error);
- FUSE_KTRACE(ireq->cc->fc, "requeue truncate(%d) %llu@" DENTRY_FMT "\n", ireq->type,
+ FUSE_KTRACE(ireq->cc->fc, "requeue truncate(%d) %llu@" DENTRY_FMT, ireq->type,
(unsigned long long)ireq->truncreq.offset, DENTRY_ARGS(ireq->dentry));
ireq_delay(ireq);
diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c
index f6b8aefe6884..a34b204476bd 100644
--- a/fs/fuse/kio/pcs/pcs_rpc.c
+++ b/fs/fuse/kio/pcs/pcs_rpc.c
@@ -565,7 +565,7 @@ struct pcs_msg *rpc_get_hdr(struct pcs_sockio * sio, u32 *msg_size)
/* Fatal stream format error */
if (h->len < sizeof(struct pcs_rpc_hdr) || h->len > ep->params.max_msg_size) {
- FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Bad message header %u %u\n", h->len, h->type);
+ FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Bad message header %u %u", h->len, h->type);
return NULL;
}
@@ -580,12 +580,12 @@ struct pcs_msg *rpc_get_hdr(struct pcs_sockio * sio, u32 *msg_size)
next_input = rpc_work_input;
break;
default:
- FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Received msg in bad state %u\n", ep->state);
+ FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Received msg in bad state %u", ep->state);
return NULL;
}
if (h->len > PAGE_SIZE) {
- FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Received too big msg %u\n", h->len);
+ FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Received too big msg %u", h->len);
*msg_size = h->len;
return PCS_TRASH_MSG;
}
@@ -615,7 +615,7 @@ void pcs_rpc_connect(struct pcs_rpc * ep)
if (ep->state != PCS_RPC_UNCONN)
return;
- FUSE_KTRACE(cc_from_rpc(ep->eng)->fc, "Connecting to node " NODE_FMT "\n", NODE_ARGS(ep->peer_id));
+ FUSE_KTRACE(cc_from_rpc(ep->eng)->fc, "Connecting to node " NODE_FMT, NODE_ARGS(ep->peer_id));
BUG_ON(!ep->ops->connect);
ep->ops->connect(ep);
@@ -749,7 +749,7 @@ static void calendar_work(struct work_struct *w)
struct pcs_rpc_hdr * h = (struct pcs_rpc_hdr *)msg_inline_head(msg);
(void)h;
- FUSE_KTRACE(cc->fc, "killing msg to " PEER_FMT " type=%u xid=" XID_FMT " stage=%d tmo=%d exp=%ld rem=%ld\n",
+ FUSE_KTRACE(cc->fc, "killing msg to " PEER_FMT " type=%u xid=" XID_FMT " stage=%d tmo=%d exp=%ld rem=%ld",
PEER_ARGS(msg->rpc), h->type, XID_ARGS(h->xid),
msg->stage, msg->timeout,
(long)(msg->start_time + msg->timeout - jiffies),
More information about the Devel
mailing list