From patchwork Wed Sep 14 11:31:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 9331269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AFBD66077A for ; Wed, 14 Sep 2016 11:40:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9688B29CD1 for ; Wed, 14 Sep 2016 11:40:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B11E29CEB; Wed, 14 Sep 2016 11:40:38 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2D4829CD1 for ; Wed, 14 Sep 2016 11:40:37 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id 001F67CA1; Wed, 14 Sep 2016 06:40:36 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 5AEC87CA0 for ; Wed, 14 Sep 2016 06:40:33 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay1.corp.sgi.com (Postfix) with ESMTP id 2A15B8F8049 for ; Wed, 14 Sep 2016 04:40:33 -0700 (PDT) X-ASG-Debug-ID: 1473853226-0bf57b0f5027fa90001-NocioJ Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [58.251.152.64]) by cuda.sgi.com with ESMTP id PyLs9mr8dp6hjDMj (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 14 Sep 2016 04:40:29 -0700 (PDT) X-Barracuda-Envelope-From: houtao1@huawei.com X-Barracuda-Effective-Source-IP: szxga01-in.huawei.com[58.251.152.64] X-Barracuda-Apparent-Source-IP: 58.251.152.64 Received: from 172.24.1.137 (EHLO szxeml430-hub.china.huawei.com) ([172.24.1.137]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DRA48543; Wed, 14 Sep 2016 19:32:24 +0800 (CST) Received: from huawei.com (10.175.124.28) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.235.1; Wed, 14 Sep 2016 19:32:20 +0800 From: Hou Tao To: Dave Chinner Subject: [PATCH] xfs_logprint: remove the printing of transaction type Date: Wed, 14 Sep 2016 19:31:54 +0800 X-ASG-Orig-Subj: [PATCH] xfs_logprint: remove the printing of transaction type Message-ID: <1473852714-192623-1-git-send-email-houtao1@huawei.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <20160914053110.GM30497@dastard> References: <20160914053110.GM30497@dastard> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.57D93549.0026, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9279d0d9de6bcb3bda8360dff7cb69cd X-Barracuda-Connect: szxga01-in.huawei.com[58.251.152.64] X-Barracuda-Start-Time: 1473853228 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-URL: https://192.48.176.25:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2915 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.7 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.32884 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header Cc: xfs@oss.sgi.com X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP th_type in struct xfs_trans_header was used to store the transaction type for xfs without delaylog feature. Now delaylog is a built-in feature (commit 93b8a58 "xfs: remove the deprecated nodelaylog option" v3.3-rc1), so remove the printing of transaction type. Signed-off-by: Hou Tao --- logprint/log_misc.c | 50 ++-------------------------------------------- logprint/log_print_trans.c | 4 ++-- logprint/logprint.h | 2 -- 3 files changed, 4 insertions(+), 52 deletions(-) diff --git a/logprint/log_misc.c b/logprint/log_misc.c index 479fc14..e4af09b 100644 --- a/logprint/log_misc.c +++ b/logprint/log_misc.c @@ -28,52 +28,6 @@ #define NO_ERROR (0) static int logBBsize; -char *trans_type[] = { - "", - "SETATTR", - "SETATTR_SIZE", - "INACTIVE", - "CREATE", - "CREATE_TRUNC", - "TRUNCATE_FILE", - "REMOVE", - "LINK", - "RENAME", - "MKDIR", - "RMDIR", - "SYMLINK", - "SET_DMATTRS", - "GROWFS", - "STRAT_WRITE", - "DIOSTRAT", - "WRITE_SYNC", - "WRITEID", - "ADDAFORK", - "ATTRINVAL", - "ATRUNCATE", - "ATTR_SET", - "ATTR_RM", - "ATTR_FLAG", - "CLEAR_AGI_BUCKET", - "QM_SBCHANGE", - "DUMMY1", - "DUMMY2", - "QM_QUOTAOFF", - "QM_DQALLOC", - "QM_SETQLIM", - "QM_DQCLUSTER", - "QM_QINOCREATE", - "QM_QUOTAOFF_END", - "SB_UNIT", - "FSYNC_TS", - "GROWFSRT_ALLOC", - "GROWFSRT_ZERO", - "GROWFSRT_FREE", - "SWAPEXT", - "SB_COUNT", - "CHECKPOINT", - "ICREATE", -}; typedef struct xlog_split_item { struct xlog_split_item *si_next; @@ -233,8 +187,8 @@ xlog_print_trans_header(char **ptr, int len) return 1; } h = (xfs_trans_header_t *)cptr; - printf(_(" type: %s tid: %x num_items: %d\n"), - trans_type[h->th_type], h->th_tid, h->th_num_items); + printf(_(" tid: %x num_items: %d\n"), + h->th_tid, h->th_num_items); return 0; } /* xlog_print_trans_header */ diff --git a/logprint/log_print_trans.c b/logprint/log_print_trans.c index 9bf2b37..0fecbce 100644 --- a/logprint/log_print_trans.c +++ b/logprint/log_print_trans.c @@ -24,8 +24,8 @@ void xlog_recover_print_trans_head( xlog_recover_t *tr) { - printf(_("TRANS: tid:0x%x type:%s #items:%d trans:0x%x q:0x%lx\n"), - tr->r_log_tid, trans_type[tr->r_theader.th_type], + printf(_("TRANS: tid:0x%x #items:%d trans:0x%x q:0x%lx\n"), + tr->r_log_tid, tr->r_theader.th_num_items, tr->r_theader.th_tid, (long)&tr->r_itemq); } diff --git a/logprint/logprint.h b/logprint/logprint.h index 0c03c08..bdd0ee1 100644 --- a/logprint/logprint.h +++ b/logprint/logprint.h @@ -30,8 +30,6 @@ extern int print_no_data; extern int print_no_print; /* exports */ -extern char *trans_type[]; - extern void xlog_print_lseek(struct xlog *, int, xfs_daddr_t, int); extern void xfs_log_copy(struct xlog *, int, char *);