From: Nathan Scott Date: Sun, 3 Feb 2002 09:54:01 +0000 (+0000) Subject: sync with recent kernel changes (uchar) - noop change cos we X-Git-Tag: v2.0.0~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43a8fc1e6a4b20445f4088d4a6f0725bed474a08;p=thirdparty%2Fxfsprogs-dev.git sync with recent kernel changes (uchar) - noop change cos we build userspace with -funsigned-char anyway. --- diff --git a/db/hash.h b/db/hash.h index 05c807503..435f46132 100644 --- a/db/hash.h +++ b/db/hash.h @@ -31,4 +31,3 @@ */ extern void hash_init(void); -extern xfs_dahash_t xfs_da_hashname(char *name, int namelen); diff --git a/include/libxfs.h b/include/libxfs.h index 7701de512..3df81732a 100644 --- a/include/libxfs.h +++ b/include/libxfs.h @@ -422,7 +422,7 @@ extern int libxfs_alloc_fix_freelist (xfs_alloc_arg_t *, int); extern int libxfs_alloc_file_space (xfs_inode_t *, xfs_off_t, xfs_off_t, int, int); -extern xfs_dahash_t libxfs_da_hashname (char *, int); +extern xfs_dahash_t libxfs_da_hashname (uchar_t *, int); extern int libxfs_attr_leaf_newentsize (xfs_da_args_t *, int, int *); extern xfs_filblks_t libxfs_bmbt_get_blockcount (xfs_bmbt_rec_t *); diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in index 3715fdd13..2390eb912 100644 --- a/include/platform_defs.h.in +++ b/include/platform_defs.h.in @@ -74,6 +74,8 @@ typedef __uint32_t xfs_dev_t; typedef __int64_t xfs_daddr_t; typedef char* xfs_caddr_t; +typedef unsigned char uchar_t; + /* long and pointer must be either 32 bit or 64 bit */ #undef HAVE_64BIT_LONG #undef HAVE_32BIT_LONG diff --git a/include/xfs_da_btree.h b/include/xfs_da_btree.h index a9d2a1502..706516774 100644 --- a/include/xfs_da_btree.h +++ b/include/xfs_da_btree.h @@ -177,9 +177,9 @@ int xfs_da_cookie_entry(struct xfs_mount *mp, xfs_off_t cookie); * Structure to ease passing around component names. */ typedef struct xfs_da_args { - char *name; /* string (maybe not NULL terminated) */ + uchar_t *name; /* string (maybe not NULL terminated) */ int namelen; /* length of string (maybe no NULL) */ - char *value; /* set of bytes (maybe contain NULLs) */ + uchar_t *value; /* set of bytes (maybe contain NULLs) */ int valuelen; /* length of value */ int flags; /* argument flags (eg: ATTR_NOCREATE) */ xfs_dahash_t hashval; /* hash value of name */ @@ -322,7 +322,7 @@ xfs_daddr_t xfs_da_reada_buf(struct xfs_trans *trans, struct xfs_inode *dp, int xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, xfs_dabuf_t *dead_buf); -uint xfs_da_hashname(char *name_string, int name_length); +uint xfs_da_hashname(uchar_t *name_string, int name_length); uint xfs_da_log2_roundup(uint i); xfs_da_state_t *xfs_da_state_alloc(void); void xfs_da_state_free(xfs_da_state_t *state); diff --git a/include/xfs_inode.h b/include/xfs_inode.h index 40b90568a..e27f03b8d 100644 --- a/include/xfs_inode.h +++ b/include/xfs_inode.h @@ -457,18 +457,18 @@ void xfs_ifork_next_set(xfs_inode_t *ip, int w, int n); #define XFS_ITRUNC_MAYBE 0x2 /* - * if XFS_BIG_FILES, 2^(32+PAGE_SHIFT) - 1 (due to linux page cache), + * if XFS_BIG_FILES, 2^(31+PAGE_SHIFT) - 1 (due to linux page cache), * else 2^40 - 1 (40=31+9) (might be an int holding a block #) * For the not XFS_BIG_FILES case, the value could be 1 higher but we don't * do that, for symmetry. * * NOTE: XFS itself can handle 2^63 - 1 (largest positive value of xfs_fsize_t) - * but Linux can't go above 2^(32+PAGE_SHIFT)-1: the Linux VM uses a 32 bit - * page number index to index cache data, so 2^32 * PAGE_SIZE is as big as + * but Linux can't go above 2^(31+PAGE_SHIFT)-1: the Linux VM uses a 32 bit + * signed variable to index cache data, so 2^31 * PAGE_SIZE is as big as * you can go. */ #if XFS_BIG_FILES -#define XFS_MAX_FILE_OFFSET ((long long)((1ULL<<(32+PAGE_SHIFT))-1ULL)) +#define XFS_MAX_FILE_OFFSET ((long long)((1ULL<<(31+PAGE_SHIFT))-1ULL)) #else #define XFS_MAX_FILE_OFFSET ((1LL<<40)-1LL) #endif diff --git a/libxfs/xfs_da_btree.c b/libxfs/xfs_da_btree.c index be44b985f..e38bf0fe8 100644 --- a/libxfs/xfs_da_btree.c +++ b/libxfs/xfs_da_btree.c @@ -1551,7 +1551,7 @@ xfs_da_path_shift(xfs_da_state_t *state, xfs_da_state_path_t *path, * This is implemented with some source-level loop unrolling. */ xfs_dahash_t -xfs_da_hashname(char *name, int namelen) +xfs_da_hashname(uchar_t *name, int namelen) { xfs_dahash_t hash;