LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM
+ LINUX_FS_STRUCT_INODE_HAS_I_BLKBITS
LINUX_FS_STRUCT_INODE_HAS_I_BLKSIZE
LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
extern int hz;
#endif
-#define PAGESIZE 8192
-
#define AFS_UCRED ucred
#define AFS_PROC struct proc
#define osi_Time() time_second
#define afs_hz hz
-#define PAGESIZE 8192
-
#define AFS_UCRED ucred
#define AFS_PROC struct proc
extern struct timeval time;
#define osi_Time() (time.tv_sec)
-#ifdef PAGESIZE
-#undef PAGESIZE
-#endif
-#define PAGESIZE 8192
-
#define AFS_UCRED ucred
#define AFS_PROC proc_t
#define afs_hz HZ
-#ifdef PAGESIZE
-#undef PAGESIZE
-#endif
-#define PAGESIZE 4096
-
#ifdef AFS_SGI64_ENV
#undef setuerror
#undef getuerror
#define uprintf printk
-#define PAGESIZE PAGE_SIZE
#ifndef NGROUPS
#define NGROUPS NGROUPS_SMALL
#endif
ip->i_ino = vp->va_nodeid;
ip->i_nlink = vp->va_nlink;
ip->i_blocks = vp->va_blocks;
+#ifdef STRUCT_INODE_HAS_I_BLKBITS
+ ip->i_blkbits = AFS_BLKBITS;
+#endif
#ifdef STRUCT_INODE_HAS_I_BLKSIZE
ip->i_blksize = vp->va_blocksize;
#endif
clear_bit(PG_error, &pp->flags);
#endif
- setup_uio(&tuio, &iovec, (char *)address, offset, PAGESIZE, UIO_READ,
+ setup_uio(&tuio, &iovec, (char *)address, offset, PAGE_SIZE, UIO_READ,
AFS_UIOSYS);
#ifdef AFS_LINUX24_ENV
lock_kernel();
if (!code) {
if (tuio.uio_resid) /* zero remainder of page */
- memset((void *)(address + (PAGESIZE - tuio.uio_resid)), 0,
+ memset((void *)(address + (PAGE_SIZE - tuio.uio_resid)), 0,
tuio.uio_resid);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
flush_dcache_page(pp);
#define osi_Time() (time.tv_sec)
#define afs_hz hz
-#define PAGESIZE 8192
-
#define AFS_UCRED ucred
#define AFS_PROC struct proc
#ifndef iodone
#define iodone biodone
#endif
-#define PAGESIZE 8192
#define printk printf /* for RX version of xdr_* */
#define setgroups sys_setgroups
#define UVM
#define MAXNAMLEN 512
#endif
-#ifndef PAGESIZE
-#define PAGESIZE 4096
-#endif
-
/*
* This file contains data types and definitions for running
* the AFS client in user space. Kernel data structures
attrs->va_flags = 0;
#endif
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
- attrs->va_blksize = PAGESIZE; /* XXX Was 8192 XXX */
+ attrs->va_blksize = AFS_BLKSIZE; /* XXX Was 8192 XXX */
#else
- attrs->va_blocksize = PAGESIZE; /* XXX Was 8192 XXX */
+ attrs->va_blocksize = AFS_BLKSIZE; /* XXX Was 8192 XXX */
#endif
attrs->va_rdev = 1;
#if defined(AFS_HPUX110_ENV)
#define AFS_NRXPACKETS 80
#define AFS_RXDEADTIME 50
#define AFS_HARDDEADTIME 120
+#define AFS_BLKBITS 12
+#define AFS_BLKSIZE (1 << AFS_BLKBITS)
extern afs_int32 afs_rx_deadtime;
extern afs_int32 afs_rx_harddead;
ac_cv_linux_fs_struct_inode_has_i_blksize=no)])
AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_blksize)])
+AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_BLKBITS], [
+ AC_MSG_CHECKING([for i_blkbits in struct inode])
+ AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_blkbits], [
+ AC_TRY_KBUILD(
+[#include <linux/fs.h>],
+[struct inode _inode;
+printk("%d\n", _inode.i_blkbits);],
+ ac_cv_linux_fs_struct_inode_has_i_blkbits=yes,
+ ac_cv_linux_fs_struct_inode_has_i_blkbits=no)])
+ AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_blkbits)
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_blkbits" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_BLKBITS, 1, [define if your struct inode has i_blkbits])
+ fi])
+
+
AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_CDEV], [
AC_MSG_CHECKING([for i_cdev in struct inode])
AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_cdev], [