Whamcloud - gitweb
LU-969 debug: reduce stack usage
[fs/lustre-release.git] / lustre / obdclass / capa.c
index 81a9ec5..e042e0d 100644 (file)
@@ -388,6 +388,23 @@ void capa_cpy(void *capa, struct obd_capa *ocapa)
         cfs_spin_unlock(&ocapa->c_lock);
 }
 
+void _debug_capa(struct lustre_capa *c,
+                 struct libcfs_debug_msg_data *msgdata,
+                 const char *fmt, ... )
+{
+        va_list args;
+        va_start(args, fmt);
+        libcfs_debug_vmsg2(msgdata, fmt, args,
+                           " capability@%p fid "DFID" opc "LPX64" uid "LPU64
+                           " gid "LPU64" flags %u alg %d keyid %u timeout %u "
+                           "expiry %u\n", c, PFID(capa_fid(c)), capa_opc(c),
+                           capa_uid(c), capa_gid(c), capa_flags(c),
+                           capa_alg(c), capa_keyid(c), capa_timeout(c),
+                           capa_expiry(c));
+        va_end(args);
+}
+EXPORT_SYMBOL(_debug_capa);
+
 EXPORT_SYMBOL(init_capa_hash);
 EXPORT_SYMBOL(cleanup_capa_hash);
 EXPORT_SYMBOL(capa_add);