From patchwork Mon Jul 23 13:04:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Foster X-Patchwork-Id: 10540187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12EDB112B for ; Mon, 23 Jul 2018 13:04:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 029D6287A3 for ; Mon, 23 Jul 2018 13:04:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB374287BB; Mon, 23 Jul 2018 13:04:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F8DF287A3 for ; Mon, 23 Jul 2018 13:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388115AbeGWOFX (ORCPT ); Mon, 23 Jul 2018 10:05:23 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49710 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388107AbeGWOFX (ORCPT ); Mon, 23 Jul 2018 10:05:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D28714059FFD for ; Mon, 23 Jul 2018 13:04:14 +0000 (UTC) Received: from bfoster.bos.redhat.com (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE7C5111AF23 for ; Mon, 23 Jul 2018 13:04:14 +0000 (UTC) From: Brian Foster To: linux-xfs@vger.kernel.org Subject: [PATCH v2 05/15] xfs: remove unused deferred ops committed field Date: Mon, 23 Jul 2018 09:04:04 -0400 Message-Id: <20180723130414.47980-6-bfoster@redhat.com> In-Reply-To: <20180723130414.47980-1-bfoster@redhat.com> References: <20180723130414.47980-1-bfoster@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 23 Jul 2018 13:04:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 23 Jul 2018 13:04:14 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'bfoster@redhat.com' RCPT:'' Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP dop_committed is set when deferred item processing rolls the transaction at least once, but is only ever accessed in tracepoints. The transaction roll/commit events are already available via independent tracepoints, so remove the otherwise unused field. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_defer.c | 1 - fs/xfs/libxfs/xfs_defer.h | 1 - fs/xfs/xfs_trace.h | 8 ++------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c index ee734a8b3fa9..0df09c094e42 100644 --- a/fs/xfs/libxfs/xfs_defer.c +++ b/fs/xfs/libxfs/xfs_defer.c @@ -249,7 +249,6 @@ xfs_defer_trans_roll( xfs_defer_trans_abort(*tp, dop, error); return error; } - dop->dop_committed = true; /* Rejoin the joined inodes. */ for (i = 0; i < XFS_DEFER_OPS_NR_INODES && dop->dop_inodes[i]; i++) diff --git a/fs/xfs/libxfs/xfs_defer.h b/fs/xfs/libxfs/xfs_defer.h index c17c9deda995..58c979c9f3fa 100644 --- a/fs/xfs/libxfs/xfs_defer.h +++ b/fs/xfs/libxfs/xfs_defer.h @@ -49,7 +49,6 @@ enum xfs_defer_ops_type { #define XFS_DEFER_OPS_NR_BUFS 2 /* join up to two buffers */ struct xfs_defer_ops { - bool dop_committed; /* did any trans commit? */ bool dop_low; /* alloc in low mode */ struct list_head dop_intake; /* unlogged pending work */ struct list_head dop_pending; /* logged pending work */ diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index b668fc127aa7..cc6995cfce66 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h @@ -2229,14 +2229,12 @@ DECLARE_EVENT_CLASS(xfs_defer_class, TP_fast_assign( __entry->dev = mp ? mp->m_super->s_dev : 0; __entry->dop = dop; - __entry->committed = dop->dop_committed; __entry->low = dop->dop_low; __entry->caller_ip = caller_ip; ), - TP_printk("dev %d:%d ops %p committed %d low %d, caller %pS", + TP_printk("dev %d:%d ops %p low %d, caller %pS", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->dop, - __entry->committed, __entry->low, (char *)__entry->caller_ip) ) @@ -2259,14 +2257,12 @@ DECLARE_EVENT_CLASS(xfs_defer_error_class, TP_fast_assign( __entry->dev = mp ? mp->m_super->s_dev : 0; __entry->dop = dop; - __entry->committed = dop->dop_committed; __entry->low = dop->dop_low; __entry->error = error; ), - TP_printk("dev %d:%d ops %p committed %d low %d err %d", + TP_printk("dev %d:%d ops %p low %d err %d", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->dop, - __entry->committed, __entry->low, __entry->error) )