]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_dir2_data.h
piix: fix 82371MX enablebits
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_dir2_data.h
index eeff8557072328906e03e4ceff8482c7f141122c..a6ae2d21c40abf9d3ca6f7fa0402b084a114898a 100644 (file)
@@ -1,33 +1,19 @@
 /*
- * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000,2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms 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.
+ * 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.  See the
+ * GNU General Public License for more details.
  *
- * 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, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 #ifndef __XFS_DIR2_DATA_H__
 #define        __XFS_DIR2_DATA_H__
@@ -79,8 +65,8 @@ struct xfs_trans;
  * The freespace will be formatted as a xfs_dir2_data_unused_t.
  */
 typedef struct xfs_dir2_data_free {
-       xfs_dir2_data_off_t     offset;         /* start of freespace */
-       xfs_dir2_data_off_t     length;         /* length of freespace */
+       __be16                  offset;         /* start of freespace */
+       __be16                  length;         /* length of freespace */
 } xfs_dir2_data_free_t;
 
 /*
@@ -89,7 +75,7 @@ typedef struct xfs_dir2_data_free {
  * The code knows that XFS_DIR2_DATA_FD_COUNT is 3.
  */
 typedef struct xfs_dir2_data_hdr {
-       __uint32_t              magic;          /* XFS_DIR2_DATA_MAGIC */
+       __be32                  magic;          /* XFS_DIR2_DATA_MAGIC */
                                                /* or XFS_DIR2_BLOCK_MAGIC */
        xfs_dir2_data_free_t    bestfree[XFS_DIR2_DATA_FD_COUNT];
 } xfs_dir2_data_hdr_t;
@@ -99,11 +85,11 @@ typedef struct xfs_dir2_data_hdr {
  * Tag appears as the last 2 bytes.
  */
 typedef struct xfs_dir2_data_entry {
-       xfs_ino_t               inumber;        /* inode number */
-       __uint8_t               namelen;        /* name length */
-       __uint8_t               name[1];        /* name bytes, no null */
+       __be64                  inumber;        /* inode number */
+       __u8                    namelen;        /* name length */
+       __u8                    name[1];        /* name bytes, no null */
                                                /* variable offset */
-       xfs_dir2_data_off_t     tag;            /* starting offset of us */
+       __be16                  tag;            /* starting offset of us */
 } xfs_dir2_data_entry_t;
 
 /*
@@ -111,10 +97,10 @@ typedef struct xfs_dir2_data_entry {
  * Tag appears as the last 2 bytes.
  */
 typedef struct xfs_dir2_data_unused {
-       __uint16_t              freetag;        /* XFS_DIR2_DATA_FREE_TAG */
-       xfs_dir2_data_off_t     length;         /* total free length */
+       __be16                  freetag;        /* XFS_DIR2_DATA_FREE_TAG */
+       __be16                  length;         /* total free length */
                                                /* variable offset */
-       xfs_dir2_data_off_t     tag;            /* starting offset of us */
+       __be16                  tag;            /* starting offset of us */
 } xfs_dir2_data_unused_t;
 
 typedef union {
@@ -148,12 +134,11 @@ static inline int xfs_dir2_data_entsize(int n)
  * Pointer to an entry's tag word.
  */
 #define        XFS_DIR2_DATA_ENTRY_TAG_P(dep)  xfs_dir2_data_entry_tag_p(dep)
-static inline xfs_dir2_data_off_t *
+static inline __be16 *
 xfs_dir2_data_entry_tag_p(xfs_dir2_data_entry_t *dep)
 {
-       return (xfs_dir2_data_off_t *) \
-                ((char *)(dep) + XFS_DIR2_DATA_ENTSIZE((dep)->namelen) - \
-                 (uint)sizeof(xfs_dir2_data_off_t));
+       return (__be16 *)((char *)dep +
+               XFS_DIR2_DATA_ENTSIZE(dep->namelen) - sizeof(__be16));
 }
 
 /*
@@ -161,12 +146,11 @@ xfs_dir2_data_entry_tag_p(xfs_dir2_data_entry_t *dep)
  */
 #define        XFS_DIR2_DATA_UNUSED_TAG_P(dup) \
        xfs_dir2_data_unused_tag_p(dup)
-static inline xfs_dir2_data_off_t *
+static inline __be16 *
 xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup)
 {
-       return (xfs_dir2_data_off_t *) \
-                ((char *)(dup) + INT_GET((dup)->length, ARCH_CONVERT) \
-                               - (uint)sizeof(xfs_dir2_data_off_t));
+       return (__be16 *)((char *)dup +
+                       be16_to_cpu(dup->length) - sizeof(__be16));
 }
 
 /*