All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Log the reason for log flushes in every log header
Date: Mon, 11 Dec 2017 11:53:10 +0000	[thread overview]
Message-ID: <5adc2737-1f11-27b1-eb46-733fdd9ab9df@redhat.com> (raw)
In-Reply-To: <94557090.39942461.1512747048003.JavaMail.zimbra@redhat.com>

On 08/12/17 15:30, Bob Peterson wrote:
> Hi,
> 
> This is a version 2 replacement for this patch, with some improvements.
> ---
> This patch just adds the capability for GFS2 to track which function
> called gfs2_log_flush. This should make it easier to diagnose
> problems based on the sequence of events found in the journals.
> 
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
<snip>
> --- a/include/uapi/linux/gfs2_ondisk.h
> +++ b/include/uapi/linux/gfs2_ondisk.h
> @@ -406,6 +406,42 @@ struct gfs2_log_header {
>   	__be32 lh_hash;
>   };
>   
> +/*
> + * Log Header version 2 constants - actor who wrote a log header
> + */
> +
> +enum gfs2_log_flushers {
> +	/* Constants reserved for kernel space */
> +	LHF_SHUTDOWN		= 0,

Should 0 be used for "unknown"?

> +	LHF_JDATA_WPAGES	= 1,
> +	LHF_SET_FLAGS		= 2,
> +	LHF_AIL_EMPTY_GL	= 3,
> +	LHF_AIL_FLUSH		= 4,
> +	LHF_RGRP_GO_SYNC	= 5,
> +	LHF_INODE_GO_SYNC	= 6,
> +	LHF_INODE_GO_INVAL	= 7,
> +	LHF_FREEZE_GO_SYNC	= 8,
> +	LHF_KILL_SB		= 9,
> +	LHF_DO_SYNC		= 10,
> +	LHF_INPLACE_RESERVE	= 11,
> +	LHF_WRITE_INODE		= 12,
> +	LHF_MAKE_FS_RO		= 13,
> +	LHF_SYNC_FS		= 14,
> +	LHF_EVICT_INODE		= 15,
> +	LHF_TRANS_END		= 16,
> +	LHF_LOGD_JFLUSH_REQD	= 17,
> +	LHF_LOGD_AIL_FLUSH_REQD	= 18,
> +	LHF_LOG_FLUSHERS	= 19, /* number of kernel log flushers */
> +
> +	/* Constants reserved for user space / gfs2-utils */
> +	LHF_GFS2_CONVERT       	= 26,
> +	LHF_GFS2_EDIT		= 27,
> +	LHF_GFS2_FSCK		= 28,
> +	LHF_GFS2_FSCK_JREPLAY	= 29,
> +	LHF_GFS2_MKFS		= 30,
> +	LHF_GFS2_JADD		= 31

Would it be better to have values for the purposes that the utils would 
need to touch the log header, e.g. LHF_UTIL_REPLAY, LHF_UTIL_FIX or 
LHF_UTIL_CREATE. That way, if a util is renamed or a new util is written 
(even some third party tool that we don't know about) they would still 
have a sensible value to use.

Cheers,
Andy



  reply	other threads:[~2017-12-11 11:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1917016702.37199765.1512156875142.JavaMail.zimbra@redhat.com>
2017-12-01 19:34 ` [Cluster-devel] [GFS2 PATCH] GFS2: Log the reason for log flushes in every log header Bob Peterson
2017-12-04 12:12   ` Steven Whitehouse
2017-12-08 15:30   ` Bob Peterson
2017-12-11 11:53     ` Andrew Price [this message]
2017-12-11 12:12       ` Steven Whitehouse
2017-12-11 13:23       ` Bob Peterson
2017-12-11 15:32         ` Andrew Price

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=5adc2737-1f11-27b1-eb46-733fdd9ab9df@redhat.com \
    --to=anprice@redhat.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.