X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flustre_capa.h;h=d9110aed8392d8ac5b2f094c82e3edbb839454c7;hp=33f11997d892541b389293d63c57b90735e54479;hb=7de9e8dd313557997fb28f3926516b5c26d31c9a;hpb=a562648d49aca59a8f9af5c77a149a9fe69353e4 diff --git a/lustre/include/lustre_capa.h b/lustre/include/lustre_capa.h index 33f1199..d9110ae 100644 --- a/lustre/include/lustre_capa.h +++ b/lustre/include/lustre_capa.h @@ -155,13 +155,16 @@ static inline __u32 capa_expiry(struct lustre_capa *capa) return capa->lc_expiry; } -#define DEBUG_CAPA(level, c, fmt, args...) \ +void _debug_capa(struct lustre_capa *, struct libcfs_debug_msg_data *, + const char *fmt, ... ); +#define DEBUG_CAPA(level, capa, fmt, args...) \ do { \ -CDEBUG(level, fmt " capability@%p fid "DFID" opc "LPX64" uid "LPU64" gid " \ - LPU64" flags %u alg %d keyid %u timeout %u expiry %u\n", \ - ##args, 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)); \ + if (((level) & D_CANTMASK) != 0 || \ + ((libcfs_debug & (level)) != 0 && \ + (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0)) { \ + LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, level, NULL); \ + _debug_capa((capa), &msgdata, fmt, ##args); \ + } \ } while (0) #define DEBUG_CAPA_KEY(level, k, fmt, args...) \