From patchwork Wed Sep 17 13:36:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 4924461 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B5273BEEA5 for ; Wed, 17 Sep 2014 13:37:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2F5752011E for ; Wed, 17 Sep 2014 13:37:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE6F2200F2 for ; Wed, 17 Sep 2014 13:37:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755264AbaIQNg5 (ORCPT ); Wed, 17 Sep 2014 09:36:57 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:30691 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754854AbaIQNg4 (ORCPT ); Wed, 17 Sep 2014 09:36:56 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s8HDatqK027615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Sep 2014 13:36:56 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s8HDasBX020814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 17 Sep 2014 13:36:55 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s8HDaswT007714 for ; Wed, 17 Sep 2014 13:36:54 GMT Received: from localhost.localdomain.localdomain (/113.134.22.31) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Sep 2014 06:36:53 -0700 From: Liu Bo To: linux-btrfs Subject: [PATCH] Btrfs: fix wrong parse of extent map's tracepoint Date: Wed, 17 Sep 2014 21:36:41 +0800 Message-Id: <1410961001-1590-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 1.8.1.4 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The tracepoint of extent map doesn't parse @flag correctly, we set @flag via set_bit(), so we need to parse it on a bit bias. Also add the missing flag, EXTENT_FLAG_FS_MAPPING. Signed-off-by: Liu Bo --- include/trace/events/btrfs.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 4ee4e30..9c69cf0 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -157,12 +157,13 @@ DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, #define show_map_flags(flag) \ __print_flags(flag, "|", \ - { EXTENT_FLAG_PINNED, "PINNED" }, \ - { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \ - { EXTENT_FLAG_VACANCY, "VACANCY" }, \ - { EXTENT_FLAG_PREALLOC, "PREALLOC" }, \ - { EXTENT_FLAG_LOGGING, "LOGGING" }, \ - { EXTENT_FLAG_FILLING, "FILLING" }) + { (1 << EXTENT_FLAG_PINNED), "PINNED" },\ + { (1 << EXTENT_FLAG_COMPRESSED), "COMPRESSED" },\ + { (1 << EXTENT_FLAG_VACANCY), "VACANCY" },\ + { (1 << EXTENT_FLAG_PREALLOC), "PREALLOC" },\ + { (1 << EXTENT_FLAG_LOGGING), "LOGGING" },\ + { (1 << EXTENT_FLAG_FILLING), "FILLING" },\ + { (1 << EXTENT_FLAG_FS_MAPPING), "FS_MAPPING" }) TRACE_EVENT_CONDITION(btrfs_get_extent,