Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964819AbZGQSHW (ORCPT ); Fri, 17 Jul 2009 14:07:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933583AbZGQSHV (ORCPT ); Fri, 17 Jul 2009 14:07:21 -0400 Received: from cobra.newdream.net ([66.33.216.30]:58278 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934069AbZGQSHU (ORCPT ); Fri, 17 Jul 2009 14:07:20 -0400 Date: Fri, 17 Jul 2009 11:07:20 -0700 (PDT) From: Sage Weil To: Andi Kleen cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 18/20] ceph: debugging In-Reply-To: Message-ID: References: <1247693090-27796-1-git-send-email-sage@newdream.net> <1247693090-27796-5-git-send-email-sage@newdream.net> <1247693090-27796-6-git-send-email-sage@newdream.net> <1247693090-27796-7-git-send-email-sage@newdream.net> <1247693090-27796-8-git-send-email-sage@newdream.net> <1247693090-27796-9-git-send-email-sage@newdream.net> <1247693090-27796-10-git-send-email-sage@newdream.net> <1247693090-27796-11-git-send-email-sage@newdream.net> <1247693090-27796-12-git-send-email-sage@newdream.net> <1247693090-27796-13-git-send-email-sage@newdream.net> <1247693090-27796-14-git-send-email-sage@newdream.net> <1247693090-27796-15-git-send-email-sage@newdream.net> <1247693090-27796-16-git-send-email-sage@newdream.net> <1247693090-27796-17-git-send-email-sage@newdream.net> <1247693090-27796-18-git-send-email-sage@newdream.net> <1247693090-27796-19-git-send-email-sage@newdream.net> <87d480x16p.fsf@basil.nowhere.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1249 Lines: 49 > On Thu, 16 Jul 2009, Andi Kleen wrote: > > Sage Weil writes: > > > > > Some debugging infrastructure, including the ability to adjust the > > > level of debug output on a per-file basis. > > > > That is already provided by pr_debug()/DYNAMIC_PRINTK in newer kernels. > > You should switch to that. I'll spare everyone the diff, but 19 files changed, 721 insertions(+), 1107 deletions(-) and ceph_debug.h is now just a wrapper to prefix each line with a filename and line number (below). Thanks- sage --- #ifndef _FS_CEPH_DEBUG_H #define _FS_CEPH_DEBUG_H /* * wrap pr_debug to include a filename:lineno prefix on each line */ static inline const char *ceph_file_part(const char *s, int len) { const char *e = s + len; while (e != s && *(e-1) != '/') e--; return e; } #define _dout(fmt, args...) \ pr_debug(" %12.12s:%-4d : " fmt "%s", \ ceph_file_part(__FILE__, sizeof(__FILE__)), \ __LINE__, args); #define dout(args...) _dout(args, "") #endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/