Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3624979ybc; Thu, 14 Nov 2019 12:02:40 -0800 (PST) X-Google-Smtp-Source: APXvYqx1vbVYvqh/J5nJz1TA6OzFkLedkCoY8WipbIHllMGPSdYGZn6qzOXsq/Wn15gUqTqPKDju X-Received: by 2002:a05:600c:206:: with SMTP id 6mr10630309wmi.78.1573761760451; Thu, 14 Nov 2019 12:02:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573761760; cv=none; d=google.com; s=arc-20160816; b=Pv37hZIU0dN5Q4k0Rp8V1AMDmgXNSj5iSd0qtwwajX4xPf9q4dcR90iegRMIfGp2ml tzQvEN5/f882TusJ3JSKlLKPQNi9f4OJ/H17SZ9SxClkQVCuGxoCChjFb18xJoMxdhZr TxfxlE96sOcH9zIESa+zLtwsFVr45xYLCCEcQOCo5DJ0tZruO2EcjbQyfX2nZuF51Yfs Dn45/Y34i3eQJykEmGT276UVM7xn7R9wAv5GTy4eyO/1fHyRmmmICSPUPMOcvsC1XA/W k9eGYKyG8yjzuI3KqH09mursJt9cPhLZH5VVm5vBOFDaOZ9yOdHEoI5C287UvSkwpzyS YL7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=4mIMnRFLTV9Wv97TCaZQLfjHqdrqLsZHtLSW4c2W8rQ=; b=OsqB9zoipaHlWCZKAlX1MIfWB1nfRTs5LT0MilGmzjUEwCknRzrv3zEc27R6AFM+52 AtLk4/dYU+CmSKVWnQwSoFgbfvSgUuSRmOcJlpTeCLYRfcuWToLklzlAPJe05TRefjYA eLz8BvuXR+b/nQsPFxLSrZ7kI9mwfsn9XCtjF4L/V+zdToVQZzPncbaYbV6cRQtA3OTr +QuLwqmgCNpxto0CuJjOJdvkRuHhDrFv697X9TFuFj+NqTryzWuhboNsPfSNQqJYTo/b O7R0+yoXK5QTDDVS8n7SXrPgMrIZ/fr7wHU2gNBB1GI4DwrULte4ywns7054gHOk6Z57 yfGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex-team.ru header.s=default header.b=0IAYbc0t; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r20si4288418edm.17.2019.11.14.12.02.15; Thu, 14 Nov 2019 12:02:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex-team.ru header.s=default header.b=0IAYbc0t; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726592AbfKNUCJ (ORCPT + 99 others); Thu, 14 Nov 2019 15:02:09 -0500 Received: from forwardcorp1p.mail.yandex.net ([77.88.29.217]:39892 "EHLO forwardcorp1p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726557AbfKNUCJ (ORCPT ); Thu, 14 Nov 2019 15:02:09 -0500 Received: from mxbackcorp1o.mail.yandex.net (mxbackcorp1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::301]) by forwardcorp1p.mail.yandex.net (Yandex) with ESMTP id DA7512E1527; Thu, 14 Nov 2019 23:02:06 +0300 (MSK) Received: from vla5-2bf13a090f43.qloud-c.yandex.net (vla5-2bf13a090f43.qloud-c.yandex.net [2a02:6b8:c18:3411:0:640:2bf1:3a09]) by mxbackcorp1o.mail.yandex.net (mxbackcorp/Yandex) with ESMTP id H5yq8WjJCQ-26I8IdAc; Thu, 14 Nov 2019 23:02:06 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1573761726; bh=4mIMnRFLTV9Wv97TCaZQLfjHqdrqLsZHtLSW4c2W8rQ=; h=In-Reply-To:Message-Id:References:Date:Subject:To:From:Cc; b=0IAYbc0tw8re7KeDtCskmBdXg9tG17fsM0fiV2xEPuXltItM667IRutwdQdnpWAzZ 4MLczuVlNDAlcCawiip8wR3PDplCmvIe8xAbf8ptIm7uEN6BG0Tfwzotm3zo1POBIj 2xyxvp1sfmVEmNkEb25avQW9GLeJZ4xRgaDZ+ue4= Authentication-Results: mxbackcorp1o.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from 95.108.174.193-red.dhcp.yndx.net (95.108.174.193-red.dhcp.yndx.net [95.108.174.193]) by vla5-2bf13a090f43.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id oLMREPc4p1-26X01xLg; Thu, 14 Nov 2019 23:02:06 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Dmitry Monakhov To: linux-ext4@vger.kernel.org Cc: darrick.wong@oracle.com, tytso@mit.edu, Dmitry Monakhov Subject: [PATCH 2/2] ext4: fix extent_status trace points Date: Thu, 14 Nov 2019 20:01:47 +0000 Message-Id: <20191114200147.1073-2-dmonakhov@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191114200147.1073-1-dmonakhov@gmail.com> References: <20191114200147.1073-1-dmonakhov@gmail.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Show pblock only if it has meaningful value. # before ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [1/4294967294) 576460752303423487 H ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [2/4294967293) 576460752303423487 HR # after ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [1/4294967294) 0 H ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [2/4294967293) 0 HR Signed-off-by: Dmitry Monakhov --- fs/ext4/extents_status.h | 6 ++++++ include/trace/events/ext4.h | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/ext4/extents_status.h b/fs/ext4/extents_status.h index 825313c..4ec30a7 100644 --- a/fs/ext4/extents_status.h +++ b/fs/ext4/extents_status.h @@ -209,6 +209,12 @@ static inline ext4_fsblk_t ext4_es_pblock(struct extent_status *es) return es->es_pblk & ~ES_MASK; } +static inline ext4_fsblk_t ext4_es_show_pblock(struct extent_status *es) +{ + ext4_fsblk_t pblock = ext4_es_pblock(es); + return pblock == ~ES_MASK ? 0 : pblock; +} + static inline void ext4_es_store_pblock(struct extent_status *es, ext4_fsblk_t pb) { diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 3bf7128..19c8766 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h @@ -2282,7 +2282,7 @@ DECLARE_EVENT_CLASS(ext4__es_extent, __entry->ino = inode->i_ino; __entry->lblk = es->es_lblk; __entry->len = es->es_len; - __entry->pblk = ext4_es_pblock(es); + __entry->pblk = ext4_es_show_pblock(es); __entry->status = ext4_es_status(es); ), @@ -2371,7 +2371,7 @@ TRACE_EVENT(ext4_es_find_extent_range_exit, __entry->ino = inode->i_ino; __entry->lblk = es->es_lblk; __entry->len = es->es_len; - __entry->pblk = ext4_es_pblock(es); + __entry->pblk = ext4_es_show_pblock(es); __entry->status = ext4_es_status(es); ), @@ -2425,7 +2425,7 @@ TRACE_EVENT(ext4_es_lookup_extent_exit, __entry->ino = inode->i_ino; __entry->lblk = es->es_lblk; __entry->len = es->es_len; - __entry->pblk = ext4_es_pblock(es); + __entry->pblk = ext4_es_show_pblock(es); __entry->status = ext4_es_status(es); __entry->found = found; ), @@ -2593,7 +2593,7 @@ TRACE_EVENT(ext4_es_insert_delayed_block, __entry->ino = inode->i_ino; __entry->lblk = es->es_lblk; __entry->len = es->es_len; - __entry->pblk = ext4_es_pblock(es); + __entry->pblk = ext4_es_show_pblock(es); __entry->status = ext4_es_status(es); __entry->allocated = allocated; ), -- 2.7.4