From patchwork Wed Aug 17 04:38:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 1072942 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7H4fn55012381 for ; Wed, 17 Aug 2011 04:41:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751090Ab1HQEln (ORCPT ); Wed, 17 Aug 2011 00:41:43 -0400 Received: from cobra.newdream.net ([66.33.216.30]:35656 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923Ab1HQEln (ORCPT ); Wed, 17 Aug 2011 00:41:43 -0400 Received: from cobra.newdream.net (localhost [127.0.0.1]) by cobra.newdream.net (Postfix) with ESMTP id EB090BC692; Tue, 16 Aug 2011 21:38:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=newdream.net; h=date:from:to:cc :subject:message-id:mime-version:content-type; q=dns; s= newdream.net; b=TEUJuWH59n1seUiBRyx6Izuoy3xW5UbbQyt60K9ZPIY9kHos vmsLTTm39vHfxcNCplLpXc3N/13rIIKIQZgV4kSodxlZCvdehXdL/9cicKoq1ID/ aGxvMA+19GocknrS9DDLBjlXmPk9RfE/IXE4hFzx/dmJXBxzwbR6lSsQ7rM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=newdream.net; h=date:from :to:cc:subject:message-id:mime-version:content-type; s= newdream.net; bh=jwOFKkx8AU0v+Hawui8c245pQuk=; b=NtLGdXFxtdFRjGN xDNb5XdQpRFrwuDniPhCmgjdc4WsKexDPCE2Cib4rhH0utaZN2dExnfuD7SarHGb S/F5Gnv9sTjYqOGsNztTqxDqT1PJld1ykwX25uJJKtqw6FE/kY0kHWl0Jyty3Hu0 PtkU7BpY09xDPf1btNxpDT1Rv9BE= Received: by cobra.newdream.net (Postfix, from userid 1031) id C9F63BC72E; Tue, 16 Aug 2011 21:38:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cobra.newdream.net (Postfix) with ESMTP id B53A0BC692; Tue, 16 Aug 2011 21:38:41 -0700 (PDT) Date: Tue, 16 Aug 2011 21:38:41 -0700 (PDT) From: Sage Weil To: bchrisman@gmail.com cc: ceph-devel@vger.kernel.org Subject: mds locker debugging Message-ID: MIME-Version: 1.0 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 17 Aug 2011 04:41:50 +0000 (UTC) (03:51:58 PM) bchrisman: can we control the mds logging to perhaps only output locking requests? (03:52:05 PM) bchrisman: or rather.. any lock activity? (03:52:31 PM) bchrisman: trying to debug an issue where it looks like we have a bum lock# but putting mds=20 spams our logfiles (04:01:35 PM) cmccabe: bchrisman: I don't see any configuration setting that directly corresponds to that (04:02:26 PM) bchrisman: I guess I'll check whether lockign has a specific debug level, or if 20 is the only way to get it. (04:03:36 PM) cmccabe: I see some log output in Locker.cc (04:03:43 PM) cmccabe: perhaps you will want to change the levels of that This should do the trick. We do the same for MDLog.cc and MDBalancer.cc already. --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/common/config.cc b/src/common/config.cc index 7649286..6c277fe 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -145,6 +145,7 @@ struct config_option config_optionsp[] = { OPTION(debug_context, OPT_INT, 0), OPTION(debug_mds, OPT_INT, 1), OPTION(debug_mds_balancer, OPT_INT, 1), + OPTION(debug_mds_locker, OPT_INT, 1), OPTION(debug_mds_log, OPT_INT, 1), OPTION(debug_mds_log_expire, OPT_INT, 1), OPTION(debug_mds_migrator, OPT_INT, 1), diff --git a/src/common/config.h b/src/common/config.h index 0fffae8..dc56152 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -198,6 +198,7 @@ public: int debug_context; int debug_mds; int debug_mds_balancer; + int debug_mds_locker; int debug_mds_log; int debug_mds_log_expire; int debug_mds_migrator; diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 4eb3a5a..7d1b5a2 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -57,6 +57,8 @@ #define DOUT_SUBSYS mds #undef dout_prefix +#undef DOUT_COND +#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_locker #define dout_prefix _prefix(_dout, mds) static ostream& _prefix(std::ostream *_dout, MDS *mds) { return *_dout << "mds" << mds->get_nodeid() << ".locker ";