/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
*
* under the terms of version 3 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
*
* For further information regarding this notice, see:
*
*/
#ifndef __XFS_SB_H__
#define __XFS_SB_H__
/*
* Super block
* Fits into a 512-byte buffer at daddr_t 0 of each allocation group.
* Only the first of these is ever updated except during growfs.
*/
struct xfs_buf;
struct xfs_mount;
#define XFS_SB_VERSION_OKSASHFBITS \
#define XFS_SB_VERSION_OKREALFBITS \
#define XFS_SB_VERSION_OKSASHBITS \
#define XFS_SB_VERSION_OKREALBITS \
(XFS_SB_VERSION_4 | \
((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
((extflag) ? XFS_SB_VERSION_EXTFLGBIT : 0) | \
((dirv2) ? XFS_SB_VERSION_DIRV2BIT : 0)) : \
typedef struct xfs_sb
{
/* statistics */
/*
* These fields must remain contiguous. If you really
* want to change their layout, make sure you fix the
* code in xfs_trans_apply_sb_deltas().
*/
/*
* End contiguous fields.
*/
} xfs_sb_t;
/*
* Sequence number values for the fields.
*/
typedef enum {
/*
* Mask values, defined based on the xfs_sb_field_t values.
* Only define the ones we're using.
*/
#define XFS_SB_MOD_BITS \
/*
* Misc. Flags - warning - these will be cleared by xfs_repair unless
* a feature bit is set when the flag is used.
*/
/*
* define max. shared version we can interoperate with
*/
#define XFS_SB_MAX_SHARED_VN 0
#else
#endif
#else
#ifdef __KERNEL__
(XFS_SB_GOOD_VERSION_INT(sbp) && \
#else
/*
* extra 2 paren's here (( to unconfuse paren-matching editors
* like vi because XFS_SB_GOOD_VERSION_INT is a partial expression
* and the two XFS_SB_GOOD_VERSION's each 2 more close paren's to
* complete the expression.
*/
(XFS_SB_GOOD_VERSION_INT(sbp) && \
#endif /* __KERNEL__ */
#endif
unsigned xfs_sb_version_tonew(unsigned v);
#else
#define XFS_SB_VERSION_TONEW(v) \
((((v) == XFS_SB_VERSION_1) ? \
0 : \
(((v) == XFS_SB_VERSION_2) ? \
#endif
unsigned xfs_sb_version_toold(unsigned v);
#else
#define XFS_SB_VERSION_TOOLD(v) \
(((v) & (XFS_SB_VERSION_QUOTABIT | XFS_SB_VERSION_ALIGNBIT)) ? \
0 : \
(((v) & XFS_SB_VERSION_NLINKBIT) ? \
XFS_SB_VERSION_3 : \
(((v) & XFS_SB_VERSION_ATTRBIT) ? \
XFS_SB_VERSION_2 : \
#endif
#else
#endif
#else
((sbp)->sb_versionnum = \
XFS_SB_VERSION_2 : \
#endif
#else
#endif
#else
((sbp)->sb_versionnum = \
XFS_SB_VERSION_3 : \
#endif
#else
#endif
#else
((sbp)->sb_versionnum = \
#endif
#else
#endif
#else
((sbp)->sb_versionnum = \
#endif
#else
#endif
#else
((sbp)->sb_versionnum = \
#endif
#else
#endif
#else
((sbp)->sb_versionnum = \
#endif
#else
((sbp)->sb_versionnum = \
#endif
#else
#endif
#else
#endif
#else
((sbp)->sb_versionnum = \
#endif
#else
((sbp)->sb_versionnum = \
#endif
/*
* end of superblock version macros
*/
#else
#endif
#else
#endif
#else
#endif
#else
#endif
/*
* File system block to basic block conversions.
*/
/*
* File system block to byte conversions.
*/
#else
#endif
#endif /* __XFS_SB_H__ */