linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hou Tao <houtao1@huawei.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: [PATCH] xfs_logprint: remove the printing of transaction type
Date: Wed, 14 Sep 2016 19:31:54 +0800	[thread overview]
Message-ID: <1473852714-192623-1-git-send-email-houtao1@huawei.com> (raw)
In-Reply-To: <20160914053110.GM30497@dastard>

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 <houtao1@huawei.com>
---
 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 *);
-- 
2.5.5

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      parent reply	other threads:[~2016-09-14 11:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09  4:08 [PATCH] xfs_logprint: fix the transcation type string for delaylog-enabled fs Hou Tao
2016-09-13  7:09 ` Dave Chinner
2016-09-14  1:02   ` Hou Tao
2016-09-14  5:31     ` Dave Chinner
2016-09-14 11:00       ` Hou Tao
2016-09-14 11:31       ` Hou Tao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473852714-192623-1-git-send-email-houtao1@huawei.com \
    --to=houtao1@huawei.com \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).