X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_capa.h;h=6e0873a6887c7edfa8c59e5ed96b819f33d0f8bc;hb=3925b3aa87aede47531fdf632e55bfdfb8947957;hp=5c5660e9c4f8b78ce0772c14457918e5ceda21ed;hpb=0a859380c36ac24871f221b35042f76c56b04438;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_capa.h b/lustre/include/lustre_capa.h index 5c5660e..6e0873a 100644 --- a/lustre/include/lustre_capa.h +++ b/lustre/include/lustre_capa.h @@ -1,6 +1,4 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * +/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,7 +24,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -155,13 +153,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...) \