]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_dir2_leaf.h
Merge branch 'master' into upstream
[karo-tx-linux.git] / fs / xfs / xfs_dir2_leaf.h
index 43f0ec2131a910efa0466a78571fbc18e80c8878..f57ca11624127795841f9f8ab4cc64421f7d7a57 100644 (file)
@@ -1,41 +1,23 @@
 /*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2001,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_LEAF_H__
 #define        __XFS_DIR2_LEAF_H__
 
-/*
- * Directory version 2, leaf block structures.
- */
-
 struct uio;
 struct xfs_dabuf;
 struct xfs_da_args;
@@ -64,23 +46,23 @@ typedef     __uint32_t      xfs_dir2_dataptr_t;
  */
 typedef struct xfs_dir2_leaf_hdr {
        xfs_da_blkinfo_t        info;           /* header for da routines */
-       __uint16_t              count;          /* count of entries */
-       __uint16_t              stale;          /* count of stale entries */
+       __be16                  count;          /* count of entries */
+       __be16                  stale;          /* count of stale entries */
 } xfs_dir2_leaf_hdr_t;
 
 /*
  * Leaf block entry.
  */
 typedef struct xfs_dir2_leaf_entry {
-       xfs_dahash_t            hashval;        /* hash value of name */
-       xfs_dir2_dataptr_t      address;        /* address of data entry */
+       __be32                  hashval;        /* hash value of name */
+       __be32                  address;        /* address of data entry */
 } xfs_dir2_leaf_entry_t;
 
 /*
  * Leaf block tail.
  */
 typedef struct xfs_dir2_leaf_tail {
-       __uint32_t              bestcount;
+       __be32                  bestcount;
 } xfs_dir2_leaf_tail_t;
 
 /*
@@ -123,11 +105,10 @@ xfs_dir2_leaf_tail_p(struct xfs_mount *mp, xfs_dir2_leaf_t *lp)
  * Get address of the bests array in the single-leaf block.
  */
 #define        XFS_DIR2_LEAF_BESTS_P(ltp)      xfs_dir2_leaf_bests_p(ltp)
-static inline xfs_dir2_data_off_t *
+static inline __be16 *
 xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp)
 {
-       return (xfs_dir2_data_off_t *)
-               (ltp) - INT_GET((ltp)->bestcount, ARCH_CONVERT);
+       return (__be16 *)ltp - be32_to_cpu(ltp->bestcount);
 }
 
 /*