cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC] gfs2: Add sb and rgrp fields to aid fsck and grow
Date: Wed, 29 Jan 2014 14:54:58 +0000	[thread overview]
Message-ID: <52E91642.1050501@redhat.com> (raw)
In-Reply-To: <1391006826-31591-1-git-send-email-anprice@redhat.com>

On 29/01/14 14:47, Andrew Price wrote:
> This adds some fields to the superblock and resource group header
> structures that we can use in rg size and address discovery in gfs2_grow
> and fsck.gfs2. They are not intended to be changed after mkfs time.
>
> sb_rgsize is the base resource group size used by mkfs.gfs2, before any
> adjustment or alignment. It is required in order to extend the fs with
> the correct resource group size in gfs2_grow and can also be used by
> fsck.gfs2 when rebuilding broken resource groups.
>
> rg_next is the address of the next resource group and is set by
> mkfs.gfs2. It is intended to be used as a hint to fsck.gfs2 and can be
> used by other tools which need to read the resource groups sequentially.
>
> rg_uuid is intended to be the same as sb_uuid for the file system. It
> can be used by fsck.gfs2, when searching for resource group headers, in
> order to distinguish resource groups created as part of a previous file
> system on the device from resource groups in the current file system.
>
> Signed-off-by: Andrew Price <anprice@redhat.com>
> ---
>   include/uapi/linux/gfs2_ondisk.h | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/gfs2_ondisk.h b/include/uapi/linux/gfs2_ondisk.h
> index 0f24c07..f1489cb 100644
> --- a/include/uapi/linux/gfs2_ondisk.h
> +++ b/include/uapi/linux/gfs2_ondisk.h
> @@ -118,7 +118,8 @@ struct gfs2_sb {
>
>   	__be32 sb_bsize;
>   	__be32 sb_bsize_shift;
> -	__u32 __pad1;	/* Was journal segment size in gfs1 */
> +	__be32 sb_rgsize; /* Resource group size used on fs creation.
> +	                     Was journal segment size in gfs1 */
>
>   	struct gfs2_inum sb_master_dir; /* Was jindex dinode in gfs1 */
>   	struct gfs2_inum __pad2; /* Was rindex dinode in gfs1 */
> @@ -131,6 +132,7 @@ struct gfs2_sb {
>   	struct gfs2_inum __pad4; /* Was licence inode in gfs1 */
>   #define GFS2_HAS_UUID 1
>   	__u8 sb_uuid[16]; /* The UUID, maybe 0 for backwards compat */
> +

Please ignore :)

>   };
>
>   /*
> @@ -188,8 +190,10 @@ struct gfs2_rgrp {
>   	__be32 rg_dinodes;
>   	__be32 __pad;
>   	__be64 rg_igeneration;
> +	__be64 rg_next; /* Address of the next resource group */
> +	__u8 rg_uuid[16]; /* The UUID, maybe 0 for backwards compat */
>
> -	__u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */
> +	__u8 rg_reserved[64]; /* Several fields from gfs1 now reserved */

Oops, this should have been __u8 rg_reserved[56];

>   };
>
>   /*
>



  reply	other threads:[~2014-01-29 14:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 14:47 [Cluster-devel] [RFC] gfs2: Add sb and rgrp fields to aid fsck and grow Andrew Price
2014-01-29 14:54 ` Andrew Price [this message]
2014-01-29 15:32 ` Steven Whitehouse
2014-01-30 17:31   ` Andrew Price
     [not found]     ` <1391107830.2725.26.camel@menhir>
2014-04-07 15:50       ` Andrew Price
2014-04-09 12:29         ` Steven Whitehouse

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=52E91642.1050501@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 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).