Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255140
b: refs/heads/master
c: 218106a
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig committed Jul 8, 2011
1 parent 925bd20 commit 887c8c4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 145 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2282396d8157033503318fe4dee77ba82dc9d144
refs/heads/master: 218106a1104c598011e5df9d9aac7e0416be03e6
7 changes: 6 additions & 1 deletion trunk/fs/xfs/linux-2.6/xfs_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#endif

#include <xfs_types.h>
#include <xfs_arch.h>

#include <kmem.h>
#include <mrlock.h>
Expand Down Expand Up @@ -88,6 +87,12 @@
#include <xfs_buf.h>
#include <xfs_message.h>

#ifdef __BIG_ENDIAN
#define XFS_NATIVE_HOST 1
#else
#undef XFS_NATIVE_HOST
#endif

/*
* Feature macros (disable/enable)
*/
Expand Down
136 changes: 0 additions & 136 deletions trunk/fs/xfs/xfs_arch.h

This file was deleted.

13 changes: 8 additions & 5 deletions trunk/fs/xfs/xfs_dir2_sf.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,22 @@ static void xfs_dir2_sf_toino4(xfs_da_args_t *args);
static void xfs_dir2_sf_toino8(xfs_da_args_t *args);
#endif /* XFS_BIG_INUMS */


/*
* Inode numbers in short-form directories can come in two versions,
* either 4 bytes or 8 bytes wide. These helpers deal with the
* two forms transparently by looking at the headers i8count field.
*
* For 64-bit inode number the most significant byte must be zero.
*/
static xfs_ino_t
xfs_dir2_sf_get_ino(
struct xfs_dir2_sf_hdr *hdr,
xfs_dir2_inou_t *from)
{
if (hdr->i8count)
return XFS_GET_DIR_INO8(from->i8);
return get_unaligned_be64(&from->i8.i) & 0x00ffffffffffffffULL;
else
return XFS_GET_DIR_INO4(from->i4);
return get_unaligned_be32(&from->i4.i);
}

static void
Expand All @@ -82,10 +83,12 @@ xfs_dir2_sf_put_ino(
xfs_dir2_inou_t *to,
xfs_ino_t ino)
{
ASSERT((ino & 0xff00000000000000ULL) == 0);

if (hdr->i8count)
XFS_PUT_DIR_INO8(ino, to->i8);
put_unaligned_be64(ino, &to->i8.i);
else
XFS_PUT_DIR_INO4(ino, to->i4);
put_unaligned_be32(ino, &to->i4.i);
}

xfs_ino_t
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/xfs_dir2_sf.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ static inline int xfs_dir2_sf_hdr_size(int i8count)
static inline xfs_dir2_data_aoff_t
xfs_dir2_sf_get_offset(xfs_dir2_sf_entry_t *sfep)
{
return INT_GET_UNALIGNED_16_BE(&(sfep)->offset.i);
return get_unaligned_be16(&sfep->offset.i);
}

static inline void
xfs_dir2_sf_put_offset(xfs_dir2_sf_entry_t *sfep, xfs_dir2_data_aoff_t off)
{
INT_SET_UNALIGNED_16_BE(&(sfep)->offset.i, off);
put_unaligned_be16(off, &sfep->offset.i);
}

static inline int
Expand Down

0 comments on commit 887c8c4

Please sign in to comment.