@@ -195,7 +195,6 @@ nfs_local_put_lookup_ctx(void)
spin_unlock(&ctx->lock);
if (fn)
symbol_put(nfsd_open_local_fh);
- dprintk("destroy lookup context\n");
}
}
@@ -206,8 +205,8 @@ void
nfs_local_enable(struct nfs_client *clp)
{
if (nfs_local_get_lookup_ctx()) {
- dprintk("enabled local i/o\n");
set_bit(NFS_CS_LOCAL_IO, &clp->cl_flags);
+ trace_nfs_local_enable(clp);
}
}
EXPORT_SYMBOL_GPL(nfs_local_enable);
@@ -219,7 +218,7 @@ void
nfs_local_disable(struct nfs_client *clp)
{
if (test_and_clear_bit(NFS_CS_LOCAL_IO, &clp->cl_flags)) {
- dprintk("disabled local i/o\n");
+ trace_nfs_local_disable(clp);
nfs_local_put_lookup_ctx();
}
}
@@ -1710,6 +1710,38 @@ TRACE_EVENT(nfs_local_open_fh,
)
);
+DECLARE_EVENT_CLASS(nfs_local_client_event,
+ TP_PROTO(
+ const struct nfs_client *clp
+ ),
+
+ TP_ARGS(clp),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, protocol)
+ __string(server, clp->cl_hostname)
+ ),
+
+ TP_fast_assign(
+ __entry->protocol = clp->rpc_ops->version;
+ __assign_str(server);
+ ),
+
+ TP_printk(
+ "server=%s NFSv%u", __get_str(server), __entry->protocol
+ )
+);
+
+#define DEFINE_NFS_LOCAL_CLIENT_EVENT(name) \
+ DEFINE_EVENT(nfs_local_client_event, name, \
+ TP_PROTO( \
+ const struct nfs_client *clp \
+ ), \
+ TP_ARGS(clp))
+
+DEFINE_NFS_LOCAL_CLIENT_EVENT(nfs_local_enable);
+DEFINE_NFS_LOCAL_CLIENT_EVENT(nfs_local_disable);
+
DECLARE_EVENT_CLASS(nfs_xdr_event,
TP_PROTO(
const struct xdr_stream *xdr,