From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH v5 2/3] GFS2: Introduce new gfs2_log_header_v2
Date: Fri, 19 Jan 2018 14:31:14 +0000 [thread overview]
Message-ID: <b0dd0d59-d6f2-10bb-5b31-719cf320036e@redhat.com> (raw)
In-Reply-To: <20180118160445.12732-3-agruenba@redhat.com>
On 18/01/18 16:04, Andreas Gruenbacher wrote:> diff --git
a/include/uapi/linux/gfs2_ondisk.h b/include/uapi/linux/gfs2_ondisk.h
> index 09f0920f07e9..7eb73c32272f 100644
> --- a/include/uapi/linux/gfs2_ondisk.h
> +++ b/include/uapi/linux/gfs2_ondisk.h
> @@ -403,7 +403,15 @@ struct gfs2_ea_header {
> * Log header structure
> */
>
> -#define GFS2_LOG_HEAD_UNMOUNT 0x00000001 /* log is clean */
> +#define GFS2_LOG_HEAD_UNMOUNT 0x00000001 /* log is clean */
> +#define GFS2_LOG_HEAD_FLUSH_NORMAL 0x00000002 /* normal log flush */
> +#define GFS2_LOG_HEAD_FLUSH_SYNC 0x00000004 /* Sync log flush */
> +#define GFS2_LOG_HEAD_FLUSH_SHUTDOWN 0x00000008 /* Shutdown log flush */
> +#define GFS2_LOG_HEAD_FLUSH_FREEZE 0x00000010 /* Freeze flush */
> +#define GFS2_LOG_HEAD_RECOVERY 0x00000020 /* Journal recovery */
> +#define GFS2_LOG_HEAD_USERSPACE 0x80000000 /* Written by gfs2-utils */
> +
> +#define LH_V1_SIZE (offsetofend(struct gfs2_log_header, lh_hash))
>
> struct gfs2_log_header {
> struct gfs2_meta_header lh_header;
> @@ -413,6 +421,21 @@ struct gfs2_log_header {
> __be32 lh_tail; /* Block number of log tail */
> __be32 lh_blkno;
> __be32 lh_hash;
> +
> + /* Version 2 additional fields start here */
> + __be32 lh_crc; /* crc32 of whole block with this field 0 */
> + __be32 lh_nsec; /* Nano second time stamp */
> + __be64 lh_sec; /* Second based time stamp */
> + __be64 lh_addr; /* Block addr of this log header (absolute) */
> + __be64 lh_jinode; /* Journal inode number */
> + __be64 lh_statfs_addr; /* Local statfs inode number */
> + __be64 lh_quota_addr; /* Local quota change inode number */
> +
> + /* Statfs local changes (i.e. diff from global statfs) */
> + __be64 lh_local_total;
> + __be64 lh_local_free;
> + __be64 lh_local_dinodes;
> + __be32 lh_log_origin; /* The origin of this log header */
> };
4 bytes of padding gets added at the end of the struct. Could it be made
explicit with a __pad field? It currently breaks the metadata
description test with "gfs2_log_header: size mismatch between struct 128
and fields 124".
I've pushed a gfs2-utils patch with basic support for the new log header
format to the andyp-lhv2 branch. I need to test it some more but it
should be useful for testing these patches already. I'll finalise it
once the v2 patches are in for-next.
Andy
next prev parent reply other threads:[~2018-01-19 14:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 16:04 [Cluster-devel] [PATCH v5 0/3] GFS2: Introduce new gfs2_log_header_v2 Andreas Gruenbacher
2018-01-18 16:04 ` [Cluster-devel] [PATCH v5 1/3] gfs2: Get rid of gfs2_log_header_in Andreas Gruenbacher
2018-01-18 16:04 ` [Cluster-devel] [PATCH v5 2/3] GFS2: Introduce new gfs2_log_header_v2 Andreas Gruenbacher
2018-01-19 10:47 ` Andrew Price
2018-01-19 10:53 ` Steven Whitehouse
2018-01-19 12:19 ` Andrew Price
2018-01-19 14:35 ` Andreas Gruenbacher
2018-01-19 14:31 ` Andrew Price [this message]
2018-01-19 14:39 ` Steven Whitehouse
2018-01-19 15:06 ` Andrew Price
2018-01-19 20:06 ` Andrew Price
2018-01-19 22:23 ` Andrew Price
2018-01-18 16:04 ` [Cluster-devel] [PATCH v5 3/3] GFS2: Log the reason for log flushes in every log header Andreas Gruenbacher
2018-01-18 16:23 ` [Cluster-devel] [PATCH v5 0/3] GFS2: Introduce new gfs2_log_header_v2 Steven Whitehouse
2018-01-19 14:40 ` [Cluster-devel] [PATCH v6] " Andreas Gruenbacher
2018-01-19 15:14 ` 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=b0dd0d59-d6f2-10bb-5b31-719cf320036e@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.