xfs
[Top] [All Lists]

Re: [PATCH 1/5] xfs: struct xfs_sb is no longer tied to the on-disk form

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/5] xfs: struct xfs_sb is no longer tied to the on-disk format
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 2 Feb 2015 00:41:02 -0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1422826983-29570-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1422826983-29570-1-git-send-email-david@xxxxxxxxxxxxx> <1422826983-29570-2-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
>  /*
> - * Superblock - in core version.  Must match the ondisk version below.
> - * Must be padded to 64 bit alignment.
> - */
> -typedef struct xfs_sb {
> -     __uint32_t      sb_magicnum;    /* magic number == XFS_SB_MAGIC */
> -     __uint32_t      sb_blocksize;   /* logical block size, bytes */

> -static inline int xfs_sb_version_hasfinobt(xfs_sb_t *sbp)
> +static inline int xfs_sb_version_hasfinobt(struct xfs_sb *sbp)

So xfs_format.h now requires struct xfs_sb to be defined before it
can be included?  I guess we need to move these macros around as well.

> diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
> index 2b830c2..a02236b 100644
> --- a/fs/xfs/xfs_super.h
> +++ b/fs/xfs/xfs_super.h
> @@ -61,6 +61,87 @@ struct xfs_mount;
>  struct xfs_buftarg;
>  struct block_device;
>  
> +/*
> + * Superblock - in core version.  This does not have ot match the size and 
> shape
> + * of the on-disk superblock, but must contain all the fields that we use in 
> the
> + * on-disk superblock.
> + */
> +struct xfs_sb {

Is this really the right header?  xfs_super.h only really is for bits
related to linux super block operastions.

I'd expect to move it close to stuct xfs_mount, and maybe even merge
it into that in the long run.

<Prev in Thread] Current Thread [Next in Thread>