All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Hou Tao <houtao1@huawei.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs_logprint: fix the transcation type string for delaylog-enabled fs
Date: Tue, 13 Sep 2016 17:09:13 +1000	[thread overview]
Message-ID: <20160913070913.GG30497@dastard> (raw)
In-Reply-To: <1473394107-3399-1-git-send-email-houtao1@huawei.com>

On Fri, Sep 09, 2016 at 12:08:27PM +0800, Hou Tao wrote:
> For delaylog-enabled fs, the only th_type is XFS_TRANS_CHECKPOINT,
> but the value of XFS_TRANS_CHECKPOINT had been change from 42 to 40
> by xfs commit 61e63ec (xfs: consolidate superblock logging functions),
> so return trans_type[type] directly will be incorrect.
> And there is no flag for delaylog testing, so the suboptimal solution
> is to use super v5 flag instead. For pre-v5 fs used by kernel after
> commit 61e63ec, the result of xlog_trans_type will still be incorrect.

delaylog and v5 superblocks are completely unrelated and so this is
incorrect.

> before patch:
> (1) v5 fs
> TRAN:    type: SWAPEXT       tid: 321be024       num_items: 2
> TRANS: tid:0x772d0805  type:SWAPEXT  #items:37  trans:0x772d0805  q:0x559104d71bc0
> 
> after patch:
> (2) v5 fs
> TRAN:    type: CHECKPOINT       tid: 321be024       num_items: 2
> TRANS: tid:0x772d0805  type:SWAPEXT  #items:37  trans:0x772d0805  q:0x559104d71bc0

And so v4 filesystems are still incorrect.

Indeed, when delaylog is enabled, the only transaction type in the
log is "CHECKPOINT" - the whole "trans type" stuff has gone away
from the kernel and only exists as this in xfs_log_format.h:

/*
 * The only type valid for th_type in CIL-enabled file system logs:
 */
#define XFS_TRANS_CHECKPOINT    40

IOWs, most of the logprint code is for printing log information from
pre-delaylog kernels. IOWs, for the anyone using a 3.0+ kernel, the
"trans type" output from xfs_logprint is completely useless
information, so we should probably either put it behind a command
line option or remove it completely...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2016-09-13  7:09 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 [this message]
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       ` [PATCH] xfs_logprint: remove the printing of transaction type Hou Tao

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=20160913070913.GG30497@dastard \
    --to=david@fromorbit.com \
    --cc=houtao1@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.