]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_dir2_data.h
[XFS] endianess annotations for xfs_dir2_data_unused_t
[linux-2.6] / fs / xfs / xfs_dir2_data.h
index 5e3a7f9ec735322ab60f01b873b4441c09ca6c7f..28adddb48e8881015a56f162165af26d5fd6fc9a 100644 (file)
@@ -65,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;
 
 /*
@@ -75,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;
@@ -97,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 {
@@ -151,7 +151,7 @@ static inline xfs_dir2_data_off_t *
 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) \
+                ((char *)(dup) + be16_to_cpu((dup)->length) \
                                - (uint)sizeof(xfs_dir2_data_off_t));
 }