Commit 95d01fa4 authored by Russell Cattelan's avatar Russell Cattelan Committed by Nathan Scott

[XFS] Whitespace cleanup

Merge whitespace cleanup to 2.5 tree

SGI Modid: 2.5.x-xfs:slinx:144573a
parent b94ca00e
......@@ -11,7 +11,7 @@
#
# 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
# 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.
......
......@@ -583,7 +583,7 @@ cluster_write(
/*
* Calling this without startio set means we are being asked to make a dirty
* page ready for freeing it's buffers. When called with startio set then
* we are coming from writepage.
* we are coming from writepage.
*
* When called with startio set it is important that we write the WHOLE
* page if possible.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -94,7 +94,7 @@ bhv_insert(bhv_head_t *bhp, bhv_desc_t *bdp)
prev->bd_next = bdp;
}
return 0;
return 0;
}
/*
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -36,8 +36,8 @@
* Header file used to associate behaviors with virtualized objects.
*
* A virtualized object is an internal, virtualized representation of
* OS entities such as persistent files, processes, or sockets. Examples
* of virtualized objects include vnodes, vprocs, and vsockets. Often
* OS entities such as persistent files, processes, or sockets. Examples
* of virtualized objects include vnodes, vprocs, and vsockets. Often
* a virtualized object is referred to simply as an "object."
*
* A behavior is essentially an implementation layer associated with
......@@ -91,7 +91,7 @@
* active object
*
*/
struct bhv_head_lock;
/*
......@@ -179,10 +179,10 @@ extern void bhv_insert_initial(bhv_head_t *, bhv_desc_t *);
if ((bhp)->bh_first == (bdp)) { \
/* \
* Remove from front of chain. \
* Atomic wrt oip's. \
* Atomic wrt oip's. \
*/ \
(bhp)->bh_first = (bdp)->bd_next; \
} else { \
} else { \
/* remove from non-front of chain */ \
bhv_remove_not_first(bhp, bdp); \
} \
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -47,4 +47,4 @@ static __inline int capable_cred(cred_t *cr, int cid)
return (cr == sys_cred) ? 1 : capable(cid);
}
#endif /* __XFS_CRED_H__ */
#endif /* __XFS_CRED_H__ */
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -209,7 +209,7 @@ linvfs_fsync(
* We need to build a uio, cred, ...
*/
#define nextdp(dp) ((struct xfs_dirent *)((char *)(dp) + (dp)->d_reclen))
#define nextdp(dp) ((struct xfs_dirent *)((char *)(dp) + (dp)->d_reclen))
STATIC int
linvfs_readdir(
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -122,4 +122,3 @@ fs_flush_pages(
return 0;
}
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -29,7 +29,7 @@
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_SUBR_H__
#ifndef __XFS_SUBR_H__
#define __XFS_SUBR_H__
/*
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -37,7 +37,7 @@
* somewhere else in IRIX.
*/
extern uint64_t xfs_panic_mask; /* set to cause more panics */
extern uint64_t xfs_panic_mask; /* set to cause more panics */
extern unsigned long xfs_physmem;
extern struct cred *sys_cred;
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -168,7 +168,7 @@ xfs_find_handle(
STATIC int
xfs_vget_fsop_handlereq(
xfs_mount_t *mp,
struct inode *parinode, /* parent inode pointer */
struct inode *parinode, /* parent inode pointer */
int cap, /* capability level for op */
unsigned long arg, /* userspace data pointer */
unsigned long size, /* size of expected struct */
......@@ -362,10 +362,10 @@ xfs_readlink_by_handle(
aiov.iov_base = hreq.ohandle;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_iovcnt = 1;
auio.uio_fmode = FINVIS;
auio.uio_offset = 0;
auio.uio_segflg = UIO_USERSPACE;
auio.uio_offset = 0;
auio.uio_segflg = UIO_USERSPACE;
auio.uio_resid = olen;
VOP_READLINK(vp, &auio, NULL, error);
......@@ -578,7 +578,7 @@ xfs_ioctl(
case XFS_IOC_FREESP64:
case XFS_IOC_RESVSP64:
case XFS_IOC_UNRESVSP64:
/*
/*
* Only allow the sys admin to reserve space unless
* unwritten extents are enabled.
*/
......@@ -986,7 +986,7 @@ xfs_ioc_xattr(
return -XFS_ERROR(EFAULT);
return 0;
}
default:
return -ENOTTY;
......
......@@ -265,7 +265,7 @@ xfs_iomap_write_direct(
maps = min(XFS_WRITE_IMAPS, *nmaps);
nimaps = maps;
isize = ip->i_d.di_size;
isize = ip->i_d.di_size;
aeof = (offset + count) > isize;
if (io->io_new_size > isize)
......@@ -628,7 +628,7 @@ xfs_iomap_write_allocate(
for (i = 0; i < nimaps; i++) {
if ((map->br_startoff >= imap[i].br_startoff) &&
(map->br_startoff < (imap[i].br_startoff +
imap[i].br_blockcount))) {
imap[i].br_blockcount))) {
*map = imap[i];
*retmap = 1;
XFS_STATS_INC(xfsstats.xs_xstrat_quick);
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -478,7 +478,7 @@ linvfs_setattr(
VOP_SETATTR(vp, &vattr, flags, NULL, error);
if (error)
return(-error); /* Positive error up from XFS */
return(-error); /* Positive error up from XFS */
if (ia_valid & ATTR_SIZE) {
error = vmtruncate(inode, attr->ia_size);
}
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -98,41 +98,41 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh)
#define dpoff(DD) ((DD) & (NDPP-1))
#define NBBY 8 /* number of bits per byte */
#define NBPC PAGE_SIZE /* Number of bytes per click */
#define BPCSHIFT PAGE_SHIFT /* LOG2(NBPC) if exact */
#define NBPC PAGE_SIZE /* Number of bytes per click */
#define BPCSHIFT PAGE_SHIFT /* LOG2(NBPC) if exact */
/*
* Size of block device i/o is parameterized here.
* Currently the system supports page-sized i/o.
*/
#define BLKDEV_IOSHIFT BPCSHIFT
#define BLKDEV_IOSIZE (1<<BLKDEV_IOSHIFT)
#define BLKDEV_IOSHIFT BPCSHIFT
#define BLKDEV_IOSIZE (1<<BLKDEV_IOSHIFT)
/* number of BB's per block device block */
#define BLKDEV_BB BTOBB(BLKDEV_IOSIZE)
#define BLKDEV_BB BTOBB(BLKDEV_IOSIZE)
/* bytes to clicks */
#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
#define btoc64(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
#define btoct64(x) ((__uint64_t)(x)>>BPCSHIFT)
#define io_btoc(x) (((__psunsigned_t)(x)+(IO_NBPC-1))>>IO_BPCSHIFT)
#define io_btoct(x) ((__psunsigned_t)(x)>>IO_BPCSHIFT)
#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
#define btoc64(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
#define btoct64(x) ((__uint64_t)(x)>>BPCSHIFT)
#define io_btoc(x) (((__psunsigned_t)(x)+(IO_NBPC-1))>>IO_BPCSHIFT)
#define io_btoct(x) ((__psunsigned_t)(x)>>IO_BPCSHIFT)
/* off_t bytes to clicks */
#define offtoc(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
#define offtoct(x) ((xfs_off_t)(x)>>BPCSHIFT)
#define offtoc(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
#define offtoct(x) ((xfs_off_t)(x)>>BPCSHIFT)
/* clicks to off_t bytes */
#define ctooff(x) ((xfs_off_t)(x)<<BPCSHIFT)
#define ctooff(x) ((xfs_off_t)(x)<<BPCSHIFT)
/* clicks to bytes */
#define ctob(x) ((__psunsigned_t)(x)<<BPCSHIFT)
#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
#define ctob64(x) ((__uint64_t)(x)<<BPCSHIFT)
#define io_ctob(x) ((__psunsigned_t)(x)<<IO_BPCSHIFT)
#define ctob(x) ((__psunsigned_t)(x)<<BPCSHIFT)
#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
#define ctob64(x) ((__uint64_t)(x)<<BPCSHIFT)
#define io_ctob(x) ((__psunsigned_t)(x)<<IO_BPCSHIFT)
/* bytes to clicks */
#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
#ifndef CELL_CAPABLE
#define FSC_NOTIFY_NAME_CHANGED(vp)
......@@ -143,7 +143,7 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh)
#endif
/* Note: EWRONGFS never visible outside the kernel */
#define EWRONGFS EINVAL /* Mount with wrong filesystem type */
#define EWRONGFS EINVAL /* Mount with wrong filesystem type */
/*
* XXX EFSCORRUPTED needs a real value in errno.h. asm-i386/errno.h won't
......@@ -156,14 +156,14 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh)
* 3/ EUCLEAN ["Structure needs cleaning"]
* 4/ Convert EFSCORRUPTED to EIO [just prior to return into userspace]
*/
#define EFSCORRUPTED 990 /* Filesystem is corrupted */
#define EFSCORRUPTED 990 /* Filesystem is corrupted */
#define SYNCHRONIZE() barrier()
#define __return_address __builtin_return_address(0)
/*
* IRIX (BSD) quotactl makes use of separate commands for user/group,
* whereas on Linux the syscall encodes this information into the cmd
* whereas on Linux the syscall encodes this information into the cmd
* field (see the QCMD macro in quota.h). These macros help keep the
* code portable - they are not visible from the syscall interface.
*/
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -50,7 +50,7 @@
*/
STATIC int
xfs_iozero(
struct inode *ip, /* inode */
struct inode *ip, /* inode */
loff_t pos, /* offset in file */
size_t count, /* size of data to zero */
loff_t end_size) /* max file size to set */
......@@ -280,7 +280,7 @@ xfs_zero_last_block(
int zero_len;
int isize_fsb_offset;
int error = 0;
xfs_bmbt_irec_t imap;
xfs_bmbt_irec_t imap;
loff_t loff;
size_t lsize;
......@@ -334,7 +334,7 @@ xfs_zero_last_block(
/*
* Zero any on disk space between the current EOF and the new,
* larger EOF. This handles the normal case of zeroing the remainder
* larger EOF. This handles the normal case of zeroing the remainder
* of the last block in the file and the unusual case of zeroing blocks
* out beyond the size of the file. This second case only happens
* with fixed size extents and when the system crashes before the inode
......@@ -362,7 +362,7 @@ xfs_zero_eof(
xfs_mount_t *mp;
int nimaps;
int error = 0;
xfs_bmbt_irec_t imap;
xfs_bmbt_irec_t imap;
loff_t loff;
size_t lsize;
......@@ -384,10 +384,10 @@ xfs_zero_eof(
/*
* Calculate the range between the new size and the old
* where blocks needing to be zeroed may exist. To get the
* where blocks needing to be zeroed may exist. To get the
* block where the last byte in the file currently resides,
* we need to subtract one from the size and truncate back
* to a block boundary. We subtract 1 in case the size is
* to a block boundary. We subtract 1 in case the size is
* exactly on a block boundary.
*/
last_fsb = isize ? XFS_B_TO_FSBT(mp, isize - 1) : (xfs_fileoff_t)-1;
......@@ -435,7 +435,7 @@ xfs_zero_eof(
/*
* There are blocks in the range requested.
* Zero them a single write at a time. We actually
* Zero them a single write at a time. We actually
* don't zero the entire range returned if it is
* too big and simply loop around to get the rest.
* That is not the most efficient thing to do, but it
......@@ -709,7 +709,7 @@ xfs_write(
* the fact that buffered writes lock out direct I/O
* writes - the direct I/O write could have extended
* the size nontransactionally, then finished before
* we started. xfs_write_file will think that the file
* we started. xfs_write_file will think that the file
* didn't grow but the update isn't safe unless the
* size change is logged.
*
......@@ -903,4 +903,3 @@ xfs_dev_is_read_only(xfs_mount_t *mp, char *message)
return 0;
}
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -45,7 +45,7 @@ struct page_buf_bmap_s;
/*
* Maximum count of bmaps used by read and write paths.
*/
#define XFS_MAX_RW_NBMAPS 4
#define XFS_MAX_RW_NBMAPS 4
extern int xfs_bmap(struct bhv_desc *, xfs_off_t, ssize_t, int,
struct page_buf_bmap_s *, int *);
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -330,7 +330,7 @@ xfs_revalidate_inode(
inode->i_mode = (ip->i_d.di_mode & MODEMASK) | VTTOIF(vp->v_type);
inode->i_nlink = ip->i_d.di_nlink;
inode->i_uid = ip->i_d.di_uid;
inode->i_gid = ip->i_d.di_gid;
inode->i_gid = ip->i_d.di_gid;
if (((1 << vp->v_type) & ((1<<VBLK) | (1<<VCHR))) == 0) {
inode->i_rdev = NODEV;
} else {
......@@ -941,7 +941,7 @@ init_xfs_fs( void )
int error;
struct sysinfo si;
static char message[] __initdata =
KERN_INFO "SGI XFS " XFS_VERSION_STRING " with "
KERN_INFO "SGI XFS " XFS_VERSION_STRING " with "
XFS_BUILD_OPTIONS " enabled\n";
printk(message);
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -100,7 +100,7 @@ STATIC ctl_table xfs_dir_table[] = {
};
STATIC ctl_table xfs_root_table[] = {
{CTL_FS, "fs", NULL, 0, 0555, xfs_dir_table},
{CTL_FS, "fs", NULL, 0, 0555, xfs_dir_table},
{0}
};
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -40,8 +40,8 @@ spinlock_t vnumber_lock = SPIN_LOCK_UNLOCKED;
* Dedicated vnode inactive/reclaim sync semaphores.
* Prime number of hash buckets since address is used as the key.
*/
#define NVSYNC 37
#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC])
#define NVSYNC 37
#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC])
sv_t vsync[NVSYNC];
/*
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -118,11 +118,11 @@ typedef enum {
* Conversion between vnode types/modes and encoded type/mode as
* seen by stat(2) and mknod(2).
*/
extern enum vtype iftovt_tab[];
extern ushort vttoif_tab[];
#define IFTOVT(M) (iftovt_tab[((M) & S_IFMT) >> 12])
#define VTTOIF(T) (vttoif_tab[(int)(T)])
#define MAKEIMODE(T, M) (VTTOIF(T) | ((M) & ~S_IFMT))
extern enum vtype iftovt_tab[];
extern ushort vttoif_tab[];
#define IFTOVT(M) (iftovt_tab[((M) & S_IFMT) >> 12])
#define VTTOIF(T) (vttoif_tab[(int)(T)])
#define MAKEIMODE(T, M) (VTTOIF(T) | ((M) & ~S_IFMT))
/*
* Vnode flags.
......@@ -142,8 +142,8 @@ typedef enum vrwlock { VRWLOCK_NONE, VRWLOCK_READ,
* VN_INACTIVE_NOCACHE implies that the file system behavior
* has disassociated its state and bhv_desc_t from the vnode.
*/
#define VN_INACTIVE_CACHE 0
#define VN_INACTIVE_NOCACHE 1
#define VN_INACTIVE_CACHE 0
#define VN_INACTIVE_NOCACHE 1
/*
* Values for the cmd code given to VOP_VNODE_CHANGE.
......@@ -203,10 +203,10 @@ typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int,
typedef int (*vop_reclaim_t)(bhv_desc_t *);
typedef int (*vop_attr_get_t)(bhv_desc_t *, char *, char *, int *, int,
struct cred *);
typedef int (*vop_attr_set_t)(bhv_desc_t *, char *, char *, int, int,
typedef int (*vop_attr_set_t)(bhv_desc_t *, char *, char *, int, int,
struct cred *);
typedef int (*vop_attr_remove_t)(bhv_desc_t *, char *, int, struct cred *);
typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int,
typedef int (*vop_attr_remove_t)(bhv_desc_t *, char *, int, struct cred *);
typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int,
struct attrlist_cursor_kern *, struct cred *);
typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int);
typedef void (*vop_vnode_change_t)(bhv_desc_t *, vchange_t, __psint_t);
......@@ -218,7 +218,7 @@ typedef int (*vop_iflush_t)(bhv_desc_t *, int);
typedef struct vnodeops {
bhv_position_t vn_position; /* position within behavior chain */
bhv_position_t vn_position; /* position within behavior chain */
vop_open_t vop_open;
vop_read_t vop_read;
vop_write_t vop_write;
......@@ -274,31 +274,31 @@ typedef struct vnodeops {
rv = _VOP_(vop_open, vp)((vp)->v_fbhv, cr)
#define VOP_GETATTR(vp, vap, f, cr, rv) \
rv = _VOP_(vop_getattr, vp)((vp)->v_fbhv, vap, f, cr)
#define VOP_SETATTR(vp, vap, f, cr, rv) \
#define VOP_SETATTR(vp, vap, f, cr, rv) \
rv = _VOP_(vop_setattr, vp)((vp)->v_fbhv, vap, f, cr)
#define VOP_ACCESS(vp, mode, cr, rv) \
#define VOP_ACCESS(vp, mode, cr, rv) \
rv = _VOP_(vop_access, vp)((vp)->v_fbhv, mode, cr)
#define VOP_LOOKUP(vp,d,vpp,f,rdir,cr,rv) \
#define VOP_LOOKUP(vp,d,vpp,f,rdir,cr,rv) \
rv = _VOP_(vop_lookup, vp)((vp)->v_fbhv,d,vpp,f,rdir,cr)
#define VOP_CREATE(dvp,d,vap,vpp,cr,rv) \
rv = _VOP_(vop_create, dvp)((dvp)->v_fbhv,d,vap,vpp,cr)
#define VOP_REMOVE(dvp,d,cr,rv) \
rv = _VOP_(vop_remove, dvp)((dvp)->v_fbhv,d,cr)
#define VOP_LINK(tdvp,fvp,d,cr,rv) \
#define VOP_LINK(tdvp,fvp,d,cr,rv) \
rv = _VOP_(vop_link, tdvp)((tdvp)->v_fbhv,fvp,d,cr)
#define VOP_RENAME(fvp,fnm,tdvp,tnm,cr,rv) \
#define VOP_RENAME(fvp,fnm,tdvp,tnm,cr,rv) \
rv = _VOP_(vop_rename, fvp)((fvp)->v_fbhv,fnm,tdvp,tnm,cr)
#define VOP_MKDIR(dp,d,vap,vpp,cr,rv) \
#define VOP_MKDIR(dp,d,vap,vpp,cr,rv) \
rv = _VOP_(vop_mkdir, dp)((dp)->v_fbhv,d,vap,vpp,cr)
#define VOP_RMDIR(dp,d,cr,rv) \
rv = _VOP_(vop_rmdir, dp)((dp)->v_fbhv,d,cr)
#define VOP_READDIR(vp,uiop,cr,eofp,rv) \
#define VOP_READDIR(vp,uiop,cr,eofp,rv) \
rv = _VOP_(vop_readdir, vp)((vp)->v_fbhv,uiop,cr,eofp)
#define VOP_SYMLINK(dvp,d,vap,tnm,vpp,cr,rv) \
#define VOP_SYMLINK(dvp,d,vap,tnm,vpp,cr,rv) \
rv = _VOP_(vop_symlink, dvp) ((dvp)->v_fbhv,d,vap,tnm,vpp,cr)
#define VOP_READLINK(vp,uiop,cr,rv) \
#define VOP_READLINK(vp,uiop,cr,rv) \
rv = _VOP_(vop_readlink, vp)((vp)->v_fbhv,uiop,cr)
#define VOP_FSYNC(vp,f,cr,b,e,rv) \
#define VOP_FSYNC(vp,f,cr,b,e,rv) \
rv = _VOP_(vop_fsync, vp)((vp)->v_fbhv,f,cr,b,e)
#define VOP_INACTIVE(vp, cr, rv) \
rv = _VOP_(vop_inactive, vp)((vp)->v_fbhv, cr)
......@@ -318,11 +318,11 @@ typedef struct vnodeops {
rv = _VOP_(vop_reclaim, vp)((vp)->v_fbhv)
#define VOP_ATTR_GET(vp, name, val, vallenp, fl, cred, rv) \
rv = _VOP_(vop_attr_get, vp)((vp)->v_fbhv,name,val,vallenp,fl,cred)
#define VOP_ATTR_SET(vp, name, val, vallen, fl, cred, rv) \
#define VOP_ATTR_SET(vp, name, val, vallen, fl, cred, rv) \
rv = _VOP_(vop_attr_set, vp)((vp)->v_fbhv,name,val,vallen,fl,cred)
#define VOP_ATTR_REMOVE(vp, name, flags, cred, rv) \
#define VOP_ATTR_REMOVE(vp, name, flags, cred, rv) \
rv = _VOP_(vop_attr_remove, vp)((vp)->v_fbhv,name,flags,cred)
#define VOP_ATTR_LIST(vp, buf, buflen, fl, cursor, cred, rv) \
#define VOP_ATTR_LIST(vp, buf, buflen, fl, cursor, cred, rv) \
rv = _VOP_(vop_attr_list, vp)((vp)->v_fbhv,buf,buflen,fl,cursor,cred)
#define VOP_LINK_REMOVED(vp, dvp, linkzero) \
(void)_VOP_(vop_link_removed, vp)((vp)->v_fbhv, dvp, linkzero)
......@@ -569,12 +569,12 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag)
/*
* Flags to VOP_SETATTR/VOP_GETATTR.
*/
#define ATTR_UTIME 0x01 /* non-default utime(2) request */
#define ATTR_EXEC 0x02 /* invocation from exec(2) */
#define ATTR_COMM 0x04 /* yield common vp attributes */
#define ATTR_DMI 0x08 /* invocation from a DMI function */
#define ATTR_LAZY 0x80 /* set/get attributes lazily */
#define ATTR_NONBLOCK 0x100 /* return EAGAIN if operation would block */
#define ATTR_UTIME 0x01 /* non-default utime(2) request */
#define ATTR_EXEC 0x02 /* invocation from exec(2) */
#define ATTR_COMM 0x04 /* yield common vp attributes */
#define ATTR_DMI 0x08 /* invocation from a DMI function */
#define ATTR_LAZY 0x80 /* set/get attributes lazily */
#define ATTR_NONBLOCK 0x100 /* return EAGAIN if operation would block */
#define ATTR_NOLOCK 0x200 /* Don't grab any conflicting locks */
#define ATTR_NOSIZETOK 0x400 /* Don't get the DVN_SIZE_READ token */
......@@ -588,33 +588,33 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag)
#if (defined(CONFIG_XFS_VNODE_TRACING))
#define VNODE_TRACE_SIZE 16 /* number of trace entries */
#define VNODE_TRACE_SIZE 16 /* number of trace entries */
/*
* Tracing entries.
*/
#define VNODE_KTRACE_ENTRY 1
#define VNODE_KTRACE_EXIT 2
#define VNODE_KTRACE_HOLD 3
#define VNODE_KTRACE_REF 4
#define VNODE_KTRACE_RELE 5
#define VNODE_KTRACE_ENTRY 1
#define VNODE_KTRACE_EXIT 2
#define VNODE_KTRACE_HOLD 3
#define VNODE_KTRACE_REF 4
#define VNODE_KTRACE_RELE 5
extern void vn_trace_entry(struct vnode *, char *, inst_t *);
extern void vn_trace_exit(struct vnode *, char *, inst_t *);
extern void vn_trace_hold(struct vnode *, char *, int, inst_t *);
extern void vn_trace_ref(struct vnode *, char *, int, inst_t *);
extern void vn_trace_rele(struct vnode *, char *, int, inst_t *);
#define VN_TRACE(vp) \
#define VN_TRACE(vp) \
vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address)
#else /* ! (defined(CONFIG_XFS_VNODE_TRACING)) */
#define vn_trace_entry(a,b,c)
#define vn_trace_exit(a,b,c)
#define vn_trace_hold(a,b,c,d)
#define vn_trace_ref(a,b,c,d)
#define vn_trace_rele(a,b,c,d)
#define VN_TRACE(vp)
#define vn_trace_entry(a,b,c)
#define vn_trace_exit(a,b,c)
#define vn_trace_hold(a,b,c,d)
#define vn_trace_ref(a,b,c,d)
#define vn_trace_rele(a,b,c,d)
#define VN_TRACE(vp)
#endif /* ! (defined(CONFIG_XFS_VNODE_TRACING)) */
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -40,7 +40,7 @@
* cached pages for I/O.
*
*
* Written by Steve Lord, Jim Mostek, Russell Cattelan
* Written by Steve Lord, Jim Mostek, Russell Cattelan
* and Rajagopal Ananthanarayanan ("ananth") at SGI.
*
*/
......@@ -80,7 +80,7 @@ static spinlock_t pb_trace_lock = SPIN_LOCK_UNLOCKED;
struct pagebuf_trace_buf pb_trace;
EXPORT_SYMBOL(pb_trace);
EXPORT_SYMBOL(pb_trace_func);
#define CIRC_INC(i) (((i) + 1) & (PB_TRACE_BUFSIZE - 1))
#define CIRC_INC(i) (((i) + 1) & (PB_TRACE_BUFSIZE - 1))
void
pb_trace_func(
......@@ -129,7 +129,7 @@ STATIC struct workqueue_struct *pagebuf_dataio_workqueue;
* /proc/sys/vm/pagebuf
*/
unsigned long pagebuf_min[P_PARAM] = { HZ/2, 1*HZ, 0, 0 };
unsigned long pagebuf_min[P_PARAM] = { HZ/2, 1*HZ, 0, 0 };
unsigned long pagebuf_max[P_PARAM] = { HZ*30, HZ*300, 1, 1 };
pagebuf_param_t pb_params = {{ HZ, 15 * HZ, 0, 0 }};
......@@ -194,13 +194,13 @@ _bhash(
STATIC void *pagebuf_mapout_locked(page_buf_t *);
STATIC spinlock_t as_lock = SPIN_LOCK_UNLOCKED;
STATIC spinlock_t as_lock = SPIN_LOCK_UNLOCKED;
typedef struct a_list {
void *vm_addr;
struct a_list *next;
} a_list_t;
STATIC a_list_t *as_free_head;
STATIC int as_list_len;
STATIC a_list_t *as_free_head;
STATIC int as_list_len;
/*
......@@ -251,7 +251,7 @@ purge_addresses(void)
*
* Buffers associated with inodes for which buffer locking
* is not enabled are not protected by semaphores, and are
* assumed to be exclusively owned by the caller. There is
* assumed to be exclusively owned by the caller. There is
* spinlock in the buffer, for use by the caller when concurrent
* access is possible.
*/
......@@ -549,7 +549,7 @@ _pagebuf_lookup_pages(
/* A single page buffer is always mappable */
if (page_count == 1) {
pb->pb_addr = (caddr_t)
page_address(pb->pb_pages[0]) + pb->pb_offset;
page_address(pb->pb_pages[0]) + pb->pb_offset;
pb->pb_flags |= PBF_MAPPED;
} else if (flags & PBF_MAPPED) {
if (as_list_len > 64)
......@@ -701,8 +701,8 @@ _pagebuf_find( /* find buffer for block */
*
* pagebuf_find returns a buffer matching the specified range of
* data for the specified target, if any of the relevant blocks
* are in memory. The buffer may have unallocated holes, if
* some, but not all, of the blocks are in memory. Even where
* are in memory. The buffer may have unallocated holes, if
* some, but not all, of the blocks are in memory. Even where
* pages are present in the buffer, not all of every page may be
* valid.
*/
......@@ -728,7 +728,7 @@ pagebuf_find( /* find buffer for block */
*/
page_buf_t *
pagebuf_get( /* allocate a buffer */
pb_target_t *target,/* target for buffer */
pb_target_t *target,/* target for buffer */
loff_t ioff, /* starting offset of range */
size_t isize, /* length of range */
page_buf_flags_t flags) /* PBF_TRYLOCK */
......@@ -846,7 +846,7 @@ mem_to_page(
void *addr)
{
if (((unsigned long)addr < VMALLOC_START) ||
((unsigned long)addr >= VMALLOC_END)) {
((unsigned long)addr >= VMALLOC_END)) {
return virt_to_page(addr);
} else {
return vmalloc_to_page(addr);
......@@ -1049,7 +1049,7 @@ pagebuf_rele(
* pagebuf_pin
*
* pagebuf_pin locks all of the memory represented by a buffer in
* memory. Multiple calls to pagebuf_pin and pagebuf_unpin, for
* memory. Multiple calls to pagebuf_pin and pagebuf_unpin, for
* the same or different buffers affecting a given page, will
* properly count the number of outstanding "pin" requests. The
* buffer may be released after the pagebuf_pin and a different
......@@ -1095,7 +1095,7 @@ pagebuf_ispin(
* pagebuf_wait_unpin
*
* pagebuf_wait_unpin waits until all of the memory associated
* with the buffer is not longer locked in memory. It returns
* with the buffer is not longer locked in memory. It returns
* immediately if none of the affected pages are locked.
*/
static inline void
......@@ -1776,7 +1776,7 @@ pagebuf_daemon_start(void)
/*
* pagebuf_daemon_stop
*
*
* Note: do not mark as __exit, it is called from pagebuf_terminate.
*/
STATIC void
......@@ -1845,7 +1845,7 @@ STATIC ctl_table pagebuf_dir_table[] = {
};
STATIC ctl_table pagebuf_root_table[] = {
{CTL_VM, "vm", NULL, 0, 0555, pagebuf_dir_table},
{CTL_VM, "vm", NULL, 0, 0555, pagebuf_dir_table},
{0}
};
......@@ -1881,7 +1881,7 @@ pagebuf_readstats(
return len;
}
#endif /* CONFIG_PROC_FS */
#endif /* CONFIG_PROC_FS */
STATIC void
pagebuf_shaker(void)
......@@ -1935,8 +1935,8 @@ pagebuf_init(void)
/*
* pagebuf_terminate.
*
* pagebuf_terminate.
*
* Note: do not mark as __exit, this is also called from the __init code.
*/
void
......@@ -1948,7 +1948,7 @@ pagebuf_terminate(void)
kmem_shake_deregister(pagebuf_shaker);
unregister_sysctl_table(pagebuf_table_header);
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
remove_proc_entry("fs/pagebuf/stat", NULL);
remove_proc_entry("fs/pagebuf", NULL);
#endif
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -86,14 +86,14 @@ typedef enum { /* pbm_flags values */
typedef enum page_buf_flags_e { /* pb_flags values */
PBF_READ = (1 << 0), /* buffer intended for reading from device */
PBF_WRITE = (1 << 1), /* buffer intended for writing to device */
PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */
PBF_PARTIAL = (1 << 3), /* buffer partially read */
PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */
PBF_NONE = (1 << 5), /* buffer not read at all */
PBF_DELWRI = (1 << 6), /* buffer has dirty pages */
PBF_FREED = (1 << 7), /* buffer has been freed and is invalid */
PBF_SYNC = (1 << 8), /* force updates to disk */
PBF_MAPPABLE = (1 << 9),/* use directly-addressable pages */
PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */
PBF_PARTIAL = (1 << 3), /* buffer partially read */
PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */
PBF_NONE = (1 << 5), /* buffer not read at all */
PBF_DELWRI = (1 << 6), /* buffer has dirty pages */
PBF_FREED = (1 << 7), /* buffer has been freed and is invalid */
PBF_SYNC = (1 << 8), /* force updates to disk */
PBF_MAPPABLE = (1 << 9),/* use directly-addressable pages */
PBF_STALE = (1 << 10), /* buffer has been staled, do not find it */
PBF_FS_MANAGED = (1 << 11), /* filesystem controls freeing memory */
PBF_FS_DATAIOD = (1 << 12), /* schedule IO completion on fs datad */
......@@ -170,10 +170,10 @@ typedef page_buf_bmap_t pb_bmap_t;
* This buffer structure is used by the page cache buffer management routines
* to refer to an assembly of pages forming a logical buffer. The actual
* I/O is performed with buffer_head or bio structures, as required by drivers,
* for drivers which do not understand this structure. The buffer structure is
* for drivers which do not understand this structure. The buffer structure is
* used on temporary basis only, and discarded when released.
*
* The real data storage is recorded in the page cache. Metadata is
* The real data storage is recorded in the page cache. Metadata is
* hashed to the inode for the block device on which the file system resides.
* File data is hashed to the inode for the file. Pages which are only
* partially filled with data have bits set in their block_map entry
......@@ -200,7 +200,7 @@ typedef struct page_buf_s {
struct pb_target *pb_target; /* logical object */
atomic_t pb_hold; /* reference count */
page_buf_daddr_t pb_bn; /* block number for I/O */
loff_t pb_file_offset; /* offset in file */
loff_t pb_file_offset; /* offset in file */
size_t pb_buffer_length; /* size of buffer in bytes */
size_t pb_count_desired; /* desired transfer size */
void *pb_addr; /* virtual address of buffer */
......@@ -241,10 +241,10 @@ extern page_buf_t *pagebuf_find( /* find buffer for block if */
extern page_buf_t *pagebuf_get( /* allocate a buffer */
struct pb_target *, /* inode for buffer */
loff_t, /* starting offset of range */
size_t, /* length of range */
loff_t, /* starting offset of range */
size_t, /* length of range */
page_buf_flags_t); /* PBF_LOCK, PBF_READ, */
/* PBF_ASYNC */
/* PBF_ASYNC */
extern page_buf_t *pagebuf_lookup(
struct pb_target *,
......@@ -253,7 +253,7 @@ extern page_buf_t *pagebuf_lookup(
page_buf_flags_t); /* PBF_READ, PBF_WRITE, */
/* PBF_FORCEIO, _PBF_LOCKABLE */
extern page_buf_t *pagebuf_get_empty( /* allocate pagebuf struct with */
extern page_buf_t *pagebuf_get_empty( /* allocate pagebuf struct with */
/* no memory or disk address */
struct pb_target *); /* mount point "fake" inode */
......@@ -273,8 +273,8 @@ extern void pagebuf_hold( /* increment reference count */
extern void pagebuf_readahead( /* read ahead into cache */
struct pb_target *, /* target for buffer (or NULL) */
loff_t, /* starting offset of range */
size_t, /* length of range */
loff_t, /* starting offset of range */
size_t, /* length of range */
page_buf_flags_t); /* additional read flags */
/* Writing and Releasing Buffers */
......@@ -292,10 +292,10 @@ extern int pagebuf_cond_lock( /* lock buffer, if not locked */
page_buf_t *); /* buffer to lock */
extern int pagebuf_lock_value( /* return count on lock */
page_buf_t *); /* buffer to check */
page_buf_t *); /* buffer to check */
extern int pagebuf_lock( /* lock buffer */
page_buf_t *); /* buffer to lock */
extern int pagebuf_lock( /* lock buffer */
page_buf_t *); /* buffer to lock */
extern void pagebuf_unlock( /* unlock buffer */
page_buf_t *); /* buffer to unlock */
......@@ -310,9 +310,9 @@ extern void pagebuf_iodone( /* mark buffer I/O complete */
page_buf_t *, /* buffer to mark */
int, /* use data/log helper thread. */
int); /* run completion locally, or in
* a helper thread. */
* a helper thread. */
extern void pagebuf_ioerror( /* mark buffer in error (or not) */
extern void pagebuf_ioerror( /* mark buffer in error (or not) */
page_buf_t *, /* buffer to mark */
unsigned int); /* error to store (0 if none) */
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -79,20 +79,20 @@ struct pagebuf_trace_buf {
};
#define PB_TRACE_BUFSIZE 1024
#define CIRC_INC(i) (((i) + 1) & (PB_TRACE_BUFSIZE - 1))
#define CIRC_INC(i) (((i) + 1) & (PB_TRACE_BUFSIZE - 1))
/*
* Tunable pagebuf parameters
*/
#define P_PARAM 4
#define P_PARAM 4
typedef union pagebuf_param {
struct {
ulong flush_interval; /* interval between runs of the
* delwri flush daemon. */
ulong flush_interval; /* interval between runs of the
* delwri flush daemon. */
ulong age_buffer; /* time for buffer to age before
* we flush it. */
* we flush it. */
ulong debug; /* debug tracing on or off */
ulong stats_clear; /* clear the pagebuf stats */
} p_un;
......@@ -129,7 +129,7 @@ extern struct pbstats pbstats;
#define PB_STATS_INC(count) ( count ++ )
#ifndef STATIC
# define STATIC static
# define STATIC static
#endif
#endif /* __PAGE_BUF_PRIVATE_H__ */
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -40,7 +40,7 @@
* cached pages for I/O. The page_buf_locking module adds support for
* locking such page buffers.
*
* Written by Steve Lord at SGI
* Written by Steve Lord at SGI
*
*/
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -35,11 +35,11 @@
#ifdef PB_DEFINE_TRACES
#define PB_TRACE_START typedef enum {
#define PB_TRACE_REC(x) pb_trace_point_##x
#define PB_TRACE_REC(x) pb_trace_point_##x
#define PB_TRACE_END } pb_trace_var_t;
#else
#define PB_TRACE_START static char *event_names[] = {
#define PB_TRACE_REC(x) #x
#define PB_TRACE_REC(x) #x
#define PB_TRACE_END };
#endif
......@@ -86,7 +86,7 @@ PB_TRACE_END
extern void pb_trace_func(page_buf_t *, int, void *, void *);
#ifdef PAGEBUF_TRACE
# define PB_TRACE(pb, event, misc) \
pb_trace_func(pb, event, (void *) misc, \
pb_trace_func(pb, event, (void *) misc, \
(void *)__builtin_return_address(0))
#else
# define PB_TRACE(pb, event, misc) do { } while (0)
......
......@@ -69,11 +69,11 @@ xfs_qm_quotactl(
xfs_caddr_t addr)
{
xfs_mount_t *mp;
int error;
int error;
struct vfs *vfsp;
vfsp = bhvtovfs(bdp);
mp = XFS_VFSTOM(vfsp);
mp = XFS_VFSTOM(vfsp);
if (addr == NULL && cmd != Q_SYNC)
return XFS_ERROR(EINVAL);
......@@ -84,7 +84,7 @@ xfs_qm_quotactl(
* The following commands are valid even when quotaoff.
*/
switch (cmd) {
/*
/*
* truncate quota files. quota must be off.
*/
case Q_XQUOTARM:
......@@ -92,7 +92,7 @@ xfs_qm_quotactl(
return XFS_ERROR(EINVAL);
if (vfsp->vfs_flag & VFS_RDONLY)
return XFS_ERROR(EROFS);
return (xfs_qm_scall_trunc_qfiles(mp,
return (xfs_qm_scall_trunc_qfiles(mp,
xfs_qm_import_qtype_flags(*(uint *)addr)));
/*
* Get quota status information.
......@@ -116,7 +116,7 @@ xfs_qm_quotactl(
if (vfsp->vfs_flag & VFS_RDONLY)
return XFS_ERROR(EROFS);
break;
default:
break;
}
......@@ -133,11 +133,11 @@ xfs_qm_quotactl(
B_FALSE);
break;
/*
* Defaults to XFS_GETUQUOTA.
/*
* Defaults to XFS_GETUQUOTA.
*/
case Q_XGETQUOTA:
error = xfs_qm_scall_getquota(mp, (xfs_dqid_t)id, XFS_DQ_USER,
error = xfs_qm_scall_getquota(mp, (xfs_dqid_t)id, XFS_DQ_USER,
(fs_disk_quota_t *)addr);
break;
/*
......@@ -157,9 +157,9 @@ xfs_qm_quotactl(
(fs_disk_quota_t *)addr);
break;
case Q_XGETGQUOTA:
error = xfs_qm_scall_getquota(mp, (xfs_dqid_t)id, XFS_DQ_GROUP,
error = xfs_qm_scall_getquota(mp, (xfs_dqid_t)id, XFS_DQ_GROUP,
(fs_disk_quota_t *)addr);
break;
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -38,7 +38,7 @@
int doass = 1;
static char message[256]; /* keep it off the stack */
static spinlock_t xfs_err_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t xfs_err_lock = SPIN_LOCK_UNLOCKED;
/* Translate from CE_FOO to KERN_FOO, err_level(CE_FOO) == KERN_FOO */
#define XFS_MAX_ERR_LEVEL 7
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -29,17 +29,17 @@
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_SUPPORT_DEBUG_H__
#define __XFS_SUPPORT_DEBUG_H__
#ifndef __XFS_SUPPORT_DEBUG_H__
#define __XFS_SUPPORT_DEBUG_H__
#include <stdarg.h>
#define CE_DEBUG 7 /* debug */
#define CE_CONT 6 /* continuation */
#define CE_NOTE 5 /* notice */
#define CE_WARN 4 /* warning */
#define CE_ALERT 1 /* alert */
#define CE_PANIC 0 /* panic */
#define CE_DEBUG 7 /* debug */
#define CE_CONT 6 /* continuation */
#define CE_NOTE 5 /* notice */
#define CE_WARN 4 /* warning */
#define CE_ALERT 1 /* alert */
#define CE_PANIC 0 /* panic */
extern void icmn_err(int, char *, va_list);
extern void cmn_err(int, char *, ...);
......@@ -49,7 +49,7 @@ extern void cmn_err(int, char *, ...);
# define ASSERT(EX) ((void)0) /* avoid "constant in conditional" babble */
# else
# define ASSERT(EX) ((!doass||(EX))?((void)0):assfail(#EX, __FILE__, __LINE__))
# endif /* lint */
# endif /* lint */
#else
# define ASSERT(x) ((void)0)
#endif
......@@ -62,6 +62,6 @@ extern int get_thread_id(void);
#endif
#define ASSERT_ALWAYS(EX) ((EX)?((void)0):assfail(#EX, __FILE__, __LINE__))
#define debug_stop_all_cpus(param) /* param is "cpumask_t *" */
#define debug_stop_all_cpus(param) /* param is "cpumask_t *" */
#endif /* __XFS_SUPPORT_DEBUG_H__ */
#endif /* __XFS_SUPPORT_DEBUG_H__ */
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -162,7 +162,7 @@ void
kmem_free(void *ptr, size_t size)
{
if (((unsigned long)ptr < VMALLOC_START) ||
((unsigned long)ptr >= VMALLOC_END)) {
((unsigned long)ptr >= VMALLOC_END)) {
kfree(ptr);
} else {
vfree(ptr);
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -47,12 +47,12 @@
extern kmem_zone_t *kmem_zone_init(int, char *);
extern void *kmem_zone_zalloc(kmem_zone_t *, int);
extern void *kmem_zone_alloc(kmem_zone_t *, int);
extern void kmem_zone_free(kmem_zone_t *, void *);
extern void kmem_zone_free(kmem_zone_t *, void *);
extern void *kmem_alloc(size_t, int);
extern void *kmem_realloc(void *, size_t, size_t, int);
extern void *kmem_zalloc(size_t, int);
extern void kmem_free(void *, size_t);
extern void kmem_free(void *, size_t);
typedef void (*kmem_shake_func_t)(void);
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -43,7 +43,7 @@
static kmem_zone_t *ktrace_hdr_zone;
static kmem_zone_t *ktrace_ent_zone;
static int ktrace_zentries;
static int ktrace_zentries;
void
ktrace_init(int zentries)
......@@ -76,8 +76,8 @@ ktrace_uninit(void)
ktrace_t *
ktrace_alloc(int nentries, int sleep)
{
ktrace_t *ktp;
ktrace_entry_t *ktep;
ktrace_t *ktp;
ktrace_entry_t *ktep;
ktp = (ktrace_t*)kmem_zone_alloc(ktrace_hdr_zone, sleep);
......@@ -116,9 +116,9 @@ ktrace_alloc(int nentries, int sleep)
spinlock_init(&(ktp->kt_lock), "kt_lock");
ktp->kt_entries = ktep;
ktp->kt_entries = ktep;
ktp->kt_nentries = nentries;
ktp->kt_index = 0;
ktp->kt_index = 0;
ktp->kt_rollover = 0;
return ktp;
......@@ -134,7 +134,7 @@ ktrace_alloc(int nentries, int sleep)
void
ktrace_free(ktrace_t *ktp)
{
int entries_size;
int entries_size;
if (ktp == (ktrace_t *)NULL)
return;
......@@ -162,27 +162,27 @@ ktrace_free(ktrace_t *ktp)
*/
void
ktrace_enter(
ktrace_t *ktp,
void *val0,
void *val1,
void *val2,
void *val3,
void *val4,
void *val5,
void *val6,
void *val7,
void *val8,
void *val9,
void *val10,
void *val11,
void *val12,
void *val13,
void *val14,
void *val15)
ktrace_t *ktp,
void *val0,
void *val1,
void *val2,
void *val3,
void *val4,
void *val5,
void *val6,
void *val7,
void *val8,
void *val9,
void *val10,
void *val11,
void *val12,
void *val13,
void *val14,
void *val15)
{
static lock_t wrap_lock = SPIN_LOCK_UNLOCKED;
int index;
ktrace_entry_t *ktep;
int index;
ktrace_entry_t *ktep;
ASSERT(ktp != NULL);
......@@ -225,7 +225,7 @@ ktrace_enter(
*/
int
ktrace_nentries(
ktrace_t *ktp)
ktrace_t *ktp)
{
if (ktp == NULL) {
return 0;
......@@ -246,15 +246,15 @@ ktrace_nentries(
*
* The caller must pass in a pointer to a ktrace_snap
* structure in which we will keep some state used to
* iterate through the buffer. This state must not touched
* iterate through the buffer. This state must not touched
* by any code outside of this module.
*/
ktrace_entry_t *
ktrace_first(ktrace_t *ktp, ktrace_snap_t *ktsp)
ktrace_first(ktrace_t *ktp, ktrace_snap_t *ktsp)
{
ktrace_entry_t *ktep;
int index;
int nentries;
ktrace_entry_t *ktep;
int index;
int nentries;
if (ktp->kt_rollover)
index = ktp->kt_index;
......@@ -288,11 +288,11 @@ ktrace_first(ktrace_t *ktp, ktrace_snap_t *ktsp)
*/
ktrace_entry_t *
ktrace_next(
ktrace_t *ktp,
ktrace_snap_t *ktsp)
ktrace_t *ktp,
ktrace_snap_t *ktsp)
{
int index;
ktrace_entry_t *ktep;
int index;
ktrace_entry_t *ktep;
index = ktsp->ks_index;
if (index == ktsp->ks_start) {
......@@ -325,14 +325,14 @@ EXPORT_SYMBOL(ktrace_next);
ktrace_entry_t *
ktrace_skip(
ktrace_t *ktp,
int count,
ktrace_snap_t *ktsp)
ktrace_t *ktp,
int count,
ktrace_snap_t *ktsp)
{
int index;
int new_index;
ktrace_entry_t *ktep;
int nentries = ktrace_nentries(ktp);
int index;
int new_index;
ktrace_entry_t *ktep;
int nentries = ktrace_nentries(ktp);
index = ktsp->ks_index;
new_index = index + count;
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -90,15 +90,15 @@ extern void ktrace_enter(
void *,
void *);
extern ktrace_entry_t *ktrace_first(ktrace_t *, ktrace_snap_t *);
extern int ktrace_nentries(ktrace_t *);
extern ktrace_entry_t *ktrace_next(ktrace_t *, ktrace_snap_t *);
extern ktrace_entry_t *ktrace_skip(ktrace_t *, int, ktrace_snap_t *);
extern ktrace_entry_t *ktrace_first(ktrace_t *, ktrace_snap_t *);
extern int ktrace_nentries(ktrace_t *);
extern ktrace_entry_t *ktrace_next(ktrace_t *, ktrace_snap_t *);
extern ktrace_entry_t *ktrace_skip(ktrace_t *, int, ktrace_snap_t *);
#else
#define ktrace_free(ktp)
#define ktrace_enter(ktp,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15)
#define ktrace_free(ktp)
#define ktrace_enter(ktp,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15)
#endif
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -41,7 +41,7 @@
/*
* Move "n" bytes at byte address "cp"; "rw" indicates the direction
* of the move, and the I/O parameters are provided in "uio", which is
* update to reflect the data which was moved. Returns 0 on success or
* update to reflect the data which was moved. Returns 0 on success or
* a non-zero errno on failure.
*/
int
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -39,12 +39,12 @@
typedef struct iovec iovec_t;
typedef struct uio {
iovec_t *uio_iov; /* pointer to array of iovecs */
int uio_iovcnt; /* number of iovecs */
int uio_fmode; /* file mode flags */
xfs_off_t uio_offset; /* file offset */
short uio_segflg; /* address space (kernel or user) */
ssize_t uio_resid; /* residual count */
iovec_t *uio_iov; /* pointer to array of iovecs */
int uio_iovcnt; /* number of iovecs */
int uio_fmode; /* file mode flags */
xfs_off_t uio_offset; /* file offset */
short uio_segflg; /* address space (kernel or user) */
ssize_t uio_resid; /* residual count */
} uio_t;
/*
......@@ -56,11 +56,11 @@ typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
* Segment flag values.
*/
typedef enum uio_seg {
UIO_USERSPACE, /* uio_iov describes user space */
UIO_SYSSPACE, /* uio_iov describes system space */
UIO_USERSPACE, /* uio_iov describes user space */
UIO_SYSSPACE, /* uio_iov describes system space */
} uio_seg_t;
extern int uiomove (void *, size_t, uio_rw_t, uio_t *);
#endif /* __XFS_SUPPORT_MOVE_H__ */
#endif /* __XFS_SUPPORT_MOVE_H__ */
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -251,7 +251,7 @@ ismrlocked(mrlock_t *mrp, int type) /* No need to lock since info can change */
else if (type == MR_UPDATE)
return (mrp->mr_count < 0); /* Write lock */
else if (type == (MR_UPDATE | MR_ACCESS))
return (mrp->mr_count); /* Any type of lock held */
return (mrp->mr_count); /* Any type of lock held */
else /* Any waiters */
return (mrp->mr_reads_waiting | mrp->mr_writes_waiting);
}
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -67,17 +67,17 @@ typedef struct mrlock_s {
extern void mraccessf(mrlock_t *, int);
extern void mrupdatef(mrlock_t *, int);
extern void mrlock(mrlock_t *, int, int);
extern void mrunlock(mrlock_t *);
extern void mraccunlock(mrlock_t *);
extern int mrtryupdate(mrlock_t *);
extern int mrtryaccess(mrlock_t *);
extern void mrlock(mrlock_t *, int, int);
extern void mrunlock(mrlock_t *);
extern void mraccunlock(mrlock_t *);
extern int mrtryupdate(mrlock_t *);
extern int mrtryaccess(mrlock_t *);
extern int mrtrypromote(mrlock_t *);
extern void mrdemote(mrlock_t *);
extern void mrdemote(mrlock_t *);
extern int ismrlocked(mrlock_t *, int);
extern void mrlock_init(mrlock_t *, int type, char *name, long sequence);
extern void mrfree(mrlock_t *);
extern void mrlock_init(mrlock_t *, int type, char *name, long sequence);
extern void mrfree(mrlock_t *);
#define mrinit(mrp, name) mrlock_init(mrp, MRLOCK_BARRIER, name, -1)
#define mraccess(mrp) mraccessf(mrp, 0) /* grab for READ/ACCESS */
......
......@@ -12,7 +12,7 @@
*
* 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
* 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.
......
......@@ -9,7 +9,7 @@
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
......@@ -55,12 +55,12 @@ typedef struct
upper bound for log (total_elements):
bits per byte (CHAR_BIT) * sizeof(size_t). */
#define STACK_SIZE (8 * sizeof(unsigned long int))
#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi)))
#define STACK_NOT_EMPTY (stack < top)
#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi)))
#define STACK_NOT_EMPTY (stack < top)
/* Order size using quicksort. This implementation incorporates
/* Order size using quicksort. This implementation incorporates
four optimizations discussed in Sedgewick:
1. Non-recursive, using an explicit stack of pointer that store the
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -12,7 +12,7 @@
*
* 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
* 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.
......@@ -46,7 +46,7 @@
typedef spinlock_t lock_t;
#define spinlock_init(lock, name) spin_lock_init(lock)
#define spinlock_destroy(lock)
#define spinlock_destroy(lock)
static inline unsigned long mutex_spinlock(lock_t *lock)
{
......
......@@ -12,7 +12,7 @@
*
* 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
* 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.
......@@ -51,7 +51,7 @@ typedef struct sv_s {
#define SV_LIFO 0x2 /* sv_t is LIFO type */
#define SV_PRIO 0x4 /* sv_t is PRIO type */
#define SV_KEYED 0x6 /* sv_t is KEYED type */
#define SV_DEFAULT SV_FIFO
#define SV_DEFAULT SV_FIFO
static inline void _sv_wait(sv_t *sv, spinlock_t *lock, int state,
......@@ -76,7 +76,7 @@ static inline void _sv_wait(sv_t *sv, spinlock_t *lock, int state,
/*NOTHING*/
#define sv_wait(sv, pri, lock, s) \
_sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT)
#define sv_wait_sig(sv, pri, lock, s) \
#define sv_wait_sig(sv, pri, lock, s) \
_sv_wait(sv, lock, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT)
#define sv_timedwait(sv, pri, lock, s, svf, ts, rts) \
_sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, timespec_to_jiffies(ts))
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -34,7 +34,7 @@
#include <linux/posix_acl_xattr.h>
STATIC int xfs_acl_setmode(vnode_t *, xfs_acl_t *, int *);
STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *);
STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *);
STATIC void xfs_acl_get_endian(xfs_acl_t *);
STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *);
STATIC int xfs_acl_invalid(xfs_acl_t *);
......@@ -146,7 +146,7 @@ xfs_acl_entry_compare(
const void *va,
const void *vb)
{
xfs_acl_entry_t *a = (xfs_acl_entry_t *)va,
xfs_acl_entry_t *a = (xfs_acl_entry_t *)va,
*b = (xfs_acl_entry_t *)vb;
if (a->ae_tag == b->ae_tag)
......@@ -233,7 +233,7 @@ xfs_acl_vget(
goto out;
}
if (kind == _ACL_TYPE_ACCESS) {
vattr_t va;
vattr_t va;
va.va_mask = XFS_AT_MODE;
VOP_GETATTR(vp, &va, 0, sys_cred, error);
......@@ -317,7 +317,7 @@ xfs_acl_vset(
} else {
xfs_acl_vremove(vp, _ACL_TYPE_ACCESS);
}
out:
VN_RELE(vp);
......@@ -437,7 +437,7 @@ xfs_acl_capability_check(
return EACCES;
if ((mode & ACL_EXECUTE) &&
(!capable_cred(cr, CAP_DAC_OVERRIDE) ||
!xfs_acl_find_any_exec(fap))) {
!xfs_acl_find_any_exec(fap))) {
return EACCES;
}
......@@ -446,9 +446,9 @@ xfs_acl_capability_check(
/*
* Note: cr is only used here for the capability check if the ACL test fails.
* It is not used to find out the credentials uid or groups etc, as was
* done in IRIX. It is assumed that the uid and groups for the current
* thread are taken from "current" instead of the cr parameter.
* It is not used to find out the credentials uid or groups etc, as was
* done in IRIX. It is assumed that the uid and groups for the current
* thread are taken from "current" instead of the cr parameter.
*/
STATIC int
xfs_acl_access(
......@@ -458,7 +458,7 @@ xfs_acl_access(
mode_t md,
cred_t *cr)
{
xfs_acl_entry_t matched;
xfs_acl_entry_t matched;
int i, allows;
int maskallows = -1; /* true, but not 1, either */
int seen_userobj = 0;
......@@ -557,7 +557,7 @@ STATIC int
xfs_acl_invalid(
xfs_acl_t *aclp)
{
xfs_acl_entry_t *entry, *e;
xfs_acl_entry_t *entry, *e;
int user = 0, group = 0, other = 0, mask = 0;
int mask_required = 0;
int i, j;
......@@ -616,7 +616,7 @@ STATIC void
xfs_acl_get_endian(
xfs_acl_t *aclp)
{
xfs_acl_entry_t *ace, *end;
xfs_acl_entry_t *ace, *end;
INT_SET(aclp->acl_cnt, ARCH_CONVERT, aclp->acl_cnt);
end = &aclp->acl_entry[0]+aclp->acl_cnt;
......@@ -659,7 +659,7 @@ xfs_acl_set_attr(
int kind,
int *error)
{
xfs_acl_entry_t *ace, *newace, *end;
xfs_acl_entry_t *ace, *newace, *end;
xfs_acl_t *newacl;
int len;
......@@ -759,7 +759,7 @@ xfs_acl_inherit(
xfs_acl_setmode(vp, cacl, &basicperms);
/*
* Set the Default and Access ACL on the file. The mode is already
* Set the Default and Access ACL on the file. The mode is already
* set on the file, so we don't need to worry about that.
*
* If the new file is a directory, its default ACL is a copy of
......@@ -787,8 +787,8 @@ xfs_acl_setmode(
int *basicperms)
{
vattr_t va;
xfs_acl_entry_t *ap;
xfs_acl_entry_t *gap = NULL;
xfs_acl_entry_t *ap;
xfs_acl_entry_t *gap = NULL;
int i, error, nomask = 1;
*basicperms = 1;
......@@ -858,16 +858,16 @@ xfs_acl_setmode(
* most accurately reflects what the special ACL entries should permit/deny.
*
* CAVEAT: If someone sets the SGI_ACL_FILE attribute directly,
* the existing mode bits will override whatever is in the
* ACL. Similarly, if there is a pre-existing ACL that was
* never in sync with its mode (owing to a bug in 6.5 and
* before), it will now magically (or mystically) be
* synchronized. This could cause slight astonishment, but
* it is better than inconsistent permissions.
* the existing mode bits will override whatever is in the
* ACL. Similarly, if there is a pre-existing ACL that was
* never in sync with its mode (owing to a bug in 6.5 and
* before), it will now magically (or mystically) be
* synchronized. This could cause slight astonishment, but
* it is better than inconsistent permissions.
*
* The supplied ACL is a template that may contain any combination
* of special entries. These are treated as place holders when we fill
* out the ACL. This routine does not add or remove special entries, it
* of special entries. These are treated as place holders when we fill
* out the ACL. This routine does not add or remove special entries, it
* simply unites each special entry with its associated set of permissions.
*/
STATIC void
......@@ -876,8 +876,8 @@ xfs_acl_sync_mode(
xfs_acl_t *acl)
{
int i, nomask = 1;
xfs_acl_entry_t *ap;
xfs_acl_entry_t *gap = NULL;
xfs_acl_entry_t *ap;
xfs_acl_entry_t *gap = NULL;
/*
* Set ACL entries. POSIX1003.1eD16 requires that the MASK
......@@ -920,8 +920,8 @@ xfs_acl_filter_mode(
xfs_acl_t *acl)
{
int i, nomask = 1;
xfs_acl_entry_t *ap;
xfs_acl_entry_t *gap = NULL;
xfs_acl_entry_t *ap;
xfs_acl_entry_t *gap = NULL;
/*
* Set ACL entries. POSIX1003.1eD16 requires that the MASK
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -51,12 +51,12 @@ typedef struct xfs_acl_entry {
typedef struct xfs_acl {
__int32_t acl_cnt;
xfs_acl_entry_t acl_entry[XFS_ACL_MAX_ENTRIES];
xfs_acl_entry_t acl_entry[XFS_ACL_MAX_ENTRIES];
} xfs_acl_t;
/* On-disk XFS extended attribute names */
#define SGI_ACL_FILE "SGI_ACL_FILE"
#define SGI_ACL_DEFAULT "SGI_ACL_DEFAULT"
#define SGI_ACL_DEFAULT "SGI_ACL_DEFAULT"
#define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1)
#define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1)
......@@ -84,7 +84,7 @@ extern struct kmem_zone *xfs_acl_zone;
#define _ACL_TYPE_ACCESS 1
#define _ACL_TYPE_DEFAULT 2
#define _ACL_PERM_INVALID(perm) ((perm) & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE))
#define _ACL_PERM_INVALID(perm) ((perm) & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE))
#define _ACL_DECL(a) xfs_acl_t *(a) = NULL
#define _ACL_ALLOC(a) ((a) = kmem_zone_alloc(xfs_acl_zone, KM_SLEEP))
......@@ -93,7 +93,7 @@ extern struct kmem_zone *xfs_acl_zone;
#define _ACL_ZONE_DESTROY(z) (kmem_cache_destroy(z))
#define _ACL_INHERIT(c,v,d) (xfs_acl_inherit(c,v,d))
#define _ACL_GET_ACCESS(pv,pa) (xfs_acl_vtoacl(pv,pa,NULL) == 0)
#define _ACL_GET_DEFAULT(pv,pd) (xfs_acl_vtoacl(pv,NULL,pd) == 0)
#define _ACL_GET_DEFAULT(pv,pd) (xfs_acl_vtoacl(pv,NULL,pd) == 0)
#define _ACL_ACCESS_EXISTS xfs_acl_vhasacl_access
#define _ACL_DEFAULT_EXISTS xfs_acl_vhasacl_default
#define _ACL_XFS_IACCESS(i,m,c) (XFS_IFORK_Q(i) ? xfs_acl_iaccess(i,m,c) : -1)
......@@ -109,7 +109,7 @@ extern struct kmem_zone *xfs_acl_zone;
#define _ACL_ZONE_DESTROY(z) ((void)0)
#define _ACL_INHERIT(c,v,d) (0)
#define _ACL_GET_ACCESS(pv,pa) (0)
#define _ACL_GET_DEFAULT(pv,pd) (0)
#define _ACL_GET_DEFAULT(pv,pd) (0)
#define _ACL_ACCESS_EXISTS (NULL)
#define _ACL_DEFAULT_EXISTS (NULL)
#define _ACL_XFS_IACCESS(i,m,c) (-1)
......
This diff is collapsed.
This diff is collapsed.
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_ALLOC_H__
#define __XFS_ALLOC_H__
#define __XFS_ALLOC_H__
struct xfs_buf;
struct xfs_mount;
......@@ -38,7 +38,7 @@ struct xfs_perag;
struct xfs_trans;
/*
* Freespace allocation types. Argument to xfs_alloc_[v]extent.
* Freespace allocation types. Argument to xfs_alloc_[v]extent.
*/
typedef enum xfs_alloctype
{
......@@ -54,7 +54,7 @@ typedef enum xfs_alloctype
/*
* Flags for xfs_alloc_fix_freelist.
*/
#define XFS_ALLOC_FLAG_TRYLOCK 0x00000001 /* use trylock for buffer locking */
#define XFS_ALLOC_FLAG_TRYLOCK 0x00000001 /* use trylock for buffer locking */
/*
* Argument structure for xfs_alloc routines.
......@@ -78,8 +78,8 @@ typedef struct xfs_alloc_arg {
xfs_extlen_t alignment; /* align answer to multiple of this */
xfs_extlen_t minalignslop; /* slop for minlen+alignment calcs */
xfs_extlen_t len; /* output: actual size of extent */
xfs_alloctype_t type; /* allocation type XFS_ALLOCTYPE_... */
xfs_alloctype_t otype; /* original allocation type */
xfs_alloctype_t type; /* allocation type XFS_ALLOCTYPE_... */
xfs_alloctype_t otype; /* original allocation type */
char wasdel; /* set if allocation was prev delayed */
char wasfromfl; /* set if allocation is from freelist */
char isfl; /* set if is freelist blocks - !actg */
......@@ -98,21 +98,21 @@ typedef struct xfs_alloc_arg {
/*
* Types for alloc tracing.
*/
#define XFS_ALLOC_KTRACE_ALLOC 1
#define XFS_ALLOC_KTRACE_FREE 2
#define XFS_ALLOC_KTRACE_MODAGF 3
#define XFS_ALLOC_KTRACE_BUSY 4
#define XFS_ALLOC_KTRACE_UNBUSY 5
#define XFS_ALLOC_KTRACE_BUSYSEARCH 6
#define XFS_ALLOC_KTRACE_ALLOC 1
#define XFS_ALLOC_KTRACE_FREE 2
#define XFS_ALLOC_KTRACE_MODAGF 3
#define XFS_ALLOC_KTRACE_BUSY 4
#define XFS_ALLOC_KTRACE_UNBUSY 5
#define XFS_ALLOC_KTRACE_BUSYSEARCH 6
/*
* Allocation tracing buffer size.
*/
#define XFS_ALLOC_TRACE_SIZE 4096
#define XFS_ALLOC_TRACE_SIZE 4096
#ifdef XFS_ALL_TRACE
#define XFS_ALLOC_TRACE
#define XFS_ALLOC_TRACE
#endif
#if !defined(DEBUG)
......@@ -138,7 +138,7 @@ int /* error */
xfs_alloc_get_freelist(
struct xfs_trans *tp, /* transaction pointer */
struct xfs_buf *agbp, /* buffer containing the agf structure */
xfs_agblock_t *bnop); /* block address retrieved from freelist */
xfs_agblock_t *bnop); /* block address retrieved from freelist */
/*
* Log the given fields from the agf structure.
......@@ -157,7 +157,7 @@ xfs_alloc_pagf_init(
struct xfs_mount *mp, /* file system mount structure */
struct xfs_trans *tp, /* transaction pointer */
xfs_agnumber_t agno, /* allocation group number */
int flags); /* XFS_ALLOC_FLAGS_... */
int flags); /* XFS_ALLOC_FLAGS_... */
/*
* Put the block on the freelist for the allocation group.
......@@ -185,7 +185,7 @@ xfs_alloc_read_agf(
*/
int /* error */
xfs_alloc_vextent(
xfs_alloc_arg_t *args); /* allocation argument structure */
xfs_alloc_arg_t *args); /* allocation argument structure */
/*
* Free an extent.
......
This diff is collapsed.
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_ALLOC_BTREE_H__
#define __XFS_ALLOC_BTREE_H__
#define __XFS_ALLOC_BTREE_H__
/*
* Freespace on-disk structures
......@@ -46,8 +46,8 @@ struct xfs_mount;
* by blockcount and blockno. All blocks look the same to make the code
* simpler; if we have time later, we'll make the optimizations.
*/
#define XFS_ABTB_MAGIC 0x41425442 /* 'ABTB' for bno tree */
#define XFS_ABTC_MAGIC 0x41425443 /* 'ABTC' for cnt tree */
#define XFS_ABTB_MAGIC 0x41425442 /* 'ABTB' for bno tree */
#define XFS_ABTC_MAGIC 0x41425443 /* 'ABTC' for cnt tree */
/*
* Data record/key structure
......@@ -60,13 +60,13 @@ typedef struct xfs_alloc_rec
typedef xfs_agblock_t xfs_alloc_ptr_t; /* btree pointer type */
/* btree block header type */
typedef struct xfs_btree_sblock xfs_alloc_block_t;
typedef struct xfs_btree_sblock xfs_alloc_block_t;
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_ALLOC_BLOCK)
xfs_alloc_block_t *xfs_buf_to_alloc_block(struct xfs_buf *bp);
#define XFS_BUF_TO_ALLOC_BLOCK(bp) xfs_buf_to_alloc_block(bp)
#define XFS_BUF_TO_ALLOC_BLOCK(bp) xfs_buf_to_alloc_block(bp)
#else
#define XFS_BUF_TO_ALLOC_BLOCK(bp) ((xfs_alloc_block_t *)(XFS_BUF_PTR(bp)))
#define XFS_BUF_TO_ALLOC_BLOCK(bp) ((xfs_alloc_block_t *)(XFS_BUF_PTR(bp)))
#endif
/*
......@@ -75,23 +75,23 @@ xfs_alloc_block_t *xfs_buf_to_alloc_block(struct xfs_buf *bp);
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_BLOCK_SIZE)
int xfs_alloc_block_size(int lev, struct xfs_btree_cur *cur);
#define XFS_ALLOC_BLOCK_SIZE(lev,cur) xfs_alloc_block_size(lev,cur)
#define XFS_ALLOC_BLOCK_SIZE(lev,cur) xfs_alloc_block_size(lev,cur)
#else
#define XFS_ALLOC_BLOCK_SIZE(lev,cur) (1 << (cur)->bc_blocklog)
#define XFS_ALLOC_BLOCK_SIZE(lev,cur) (1 << (cur)->bc_blocklog)
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_BLOCK_MAXRECS)
int xfs_alloc_block_maxrecs(int lev, struct xfs_btree_cur *cur);
#define XFS_ALLOC_BLOCK_MAXRECS(lev,cur) xfs_alloc_block_maxrecs(lev,cur)
#define XFS_ALLOC_BLOCK_MAXRECS(lev,cur) xfs_alloc_block_maxrecs(lev,cur)
#else
#define XFS_ALLOC_BLOCK_MAXRECS(lev,cur) \
#define XFS_ALLOC_BLOCK_MAXRECS(lev,cur) \
((cur)->bc_mp->m_alloc_mxr[lev != 0])
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_BLOCK_MINRECS)
int xfs_alloc_block_minrecs(int lev, struct xfs_btree_cur *cur);
#define XFS_ALLOC_BLOCK_MINRECS(lev,cur) xfs_alloc_block_minrecs(lev,cur)
#define XFS_ALLOC_BLOCK_MINRECS(lev,cur) xfs_alloc_block_minrecs(lev,cur)
#else
#define XFS_ALLOC_BLOCK_MINRECS(lev,cur) \
#define XFS_ALLOC_BLOCK_MINRECS(lev,cur) \
((cur)->bc_mp->m_alloc_mnr[lev != 0])
#endif
......@@ -115,15 +115,15 @@ int xfs_alloc_block_minrecs(int lev, struct xfs_btree_cur *cur);
*/
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BNO_BLOCK)
xfs_agblock_t xfs_bno_block(struct xfs_mount *mp);
#define XFS_BNO_BLOCK(mp) xfs_bno_block(mp)
#define XFS_BNO_BLOCK(mp) xfs_bno_block(mp)
#else
#define XFS_BNO_BLOCK(mp) ((xfs_agblock_t)(XFS_AGFL_BLOCK(mp) + 1))
#define XFS_BNO_BLOCK(mp) ((xfs_agblock_t)(XFS_AGFL_BLOCK(mp) + 1))
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CNT_BLOCK)
xfs_agblock_t xfs_cnt_block(struct xfs_mount *mp);
#define XFS_CNT_BLOCK(mp) xfs_cnt_block(mp)
#define XFS_CNT_BLOCK(mp) xfs_cnt_block(mp)
#else
#define XFS_CNT_BLOCK(mp) ((xfs_agblock_t)(XFS_BNO_BLOCK(mp) + 1))
#define XFS_CNT_BLOCK(mp) ((xfs_agblock_t)(XFS_BNO_BLOCK(mp) + 1))
#endif
/*
......@@ -132,9 +132,9 @@ xfs_agblock_t xfs_cnt_block(struct xfs_mount *mp);
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_REC_ADDR)
xfs_alloc_rec_t *xfs_alloc_rec_addr(xfs_alloc_block_t *bb, int i,
struct xfs_btree_cur *cur);
#define XFS_ALLOC_REC_ADDR(bb,i,cur) xfs_alloc_rec_addr(bb,i,cur)
#define XFS_ALLOC_REC_ADDR(bb,i,cur) xfs_alloc_rec_addr(bb,i,cur)
#else
#define XFS_ALLOC_REC_ADDR(bb,i,cur) \
#define XFS_ALLOC_REC_ADDR(bb,i,cur) \
XFS_BTREE_REC_ADDR(XFS_ALLOC_BLOCK_SIZE(0,cur), xfs_alloc, bb, i, \
XFS_ALLOC_BLOCK_MAXRECS(0, cur))
#endif
......@@ -142,9 +142,9 @@ xfs_alloc_rec_t *xfs_alloc_rec_addr(xfs_alloc_block_t *bb, int i,
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_KEY_ADDR)
xfs_alloc_key_t *xfs_alloc_key_addr(xfs_alloc_block_t *bb, int i,
struct xfs_btree_cur *cur);
#define XFS_ALLOC_KEY_ADDR(bb,i,cur) xfs_alloc_key_addr(bb,i,cur)
#define XFS_ALLOC_KEY_ADDR(bb,i,cur) xfs_alloc_key_addr(bb,i,cur)
#else
#define XFS_ALLOC_KEY_ADDR(bb,i,cur) \
#define XFS_ALLOC_KEY_ADDR(bb,i,cur) \
XFS_BTREE_KEY_ADDR(XFS_ALLOC_BLOCK_SIZE(1,cur), xfs_alloc, bb, i, \
XFS_ALLOC_BLOCK_MAXRECS(1, cur))
#endif
......@@ -152,9 +152,9 @@ xfs_alloc_key_t *xfs_alloc_key_addr(xfs_alloc_block_t *bb, int i,
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_PTR_ADDR)
xfs_alloc_ptr_t *xfs_alloc_ptr_addr(xfs_alloc_block_t *bb, int i,
struct xfs_btree_cur *cur);
#define XFS_ALLOC_PTR_ADDR(bb,i,cur) xfs_alloc_ptr_addr(bb,i,cur)
#define XFS_ALLOC_PTR_ADDR(bb,i,cur) xfs_alloc_ptr_addr(bb,i,cur)
#else
#define XFS_ALLOC_PTR_ADDR(bb,i,cur) \
#define XFS_ALLOC_PTR_ADDR(bb,i,cur) \
XFS_BTREE_PTR_ADDR(XFS_ALLOC_BLOCK_SIZE(1,cur), xfs_alloc, bb, i, \
XFS_ALLOC_BLOCK_MAXRECS(1, cur))
#endif
......@@ -171,7 +171,7 @@ int /* error */
xfs_alloc_decrement(
struct xfs_btree_cur *cur, /* btree cursor */
int level, /* level in btree, 0 is leaf */
int *stat); /* success/failure */
int *stat); /* success/failure */
/*
* Delete the record pointed to by cur.
......@@ -181,7 +181,7 @@ xfs_alloc_decrement(
int /* error */
xfs_alloc_delete(
struct xfs_btree_cur *cur, /* btree cursor */
int *stat); /* success/failure */
int *stat); /* success/failure */
/*
* Get the data from the pointed-to record.
......@@ -191,7 +191,7 @@ xfs_alloc_get_rec(
struct xfs_btree_cur *cur, /* btree cursor */
xfs_agblock_t *bno, /* output: starting block of extent */
xfs_extlen_t *len, /* output: length of extent */
int *stat); /* output: success/failure */
int *stat); /* output: success/failure */
/*
* Increment cursor by one record at the level.
......@@ -201,7 +201,7 @@ int /* error */
xfs_alloc_increment(
struct xfs_btree_cur *cur, /* btree cursor */
int level, /* level in btree, 0 is leaf */
int *stat); /* success/failure */
int *stat); /* success/failure */
/*
* Insert the current record at the point referenced by cur.
......@@ -210,7 +210,7 @@ xfs_alloc_increment(
int /* error */
xfs_alloc_insert(
struct xfs_btree_cur *cur, /* btree cursor */
int *stat); /* success/failure */
int *stat); /* success/failure */
/*
* Lookup the record equal to [bno, len] in the btree given by cur.
......@@ -220,7 +220,7 @@ xfs_alloc_lookup_eq(
struct xfs_btree_cur *cur, /* btree cursor */
xfs_agblock_t bno, /* starting block of extent */
xfs_extlen_t len, /* length of extent */
int *stat); /* success/failure */
int *stat); /* success/failure */
/*
* Lookup the first record greater than or equal to [bno, len]
......@@ -231,7 +231,7 @@ xfs_alloc_lookup_ge(
struct xfs_btree_cur *cur, /* btree cursor */
xfs_agblock_t bno, /* starting block of extent */
xfs_extlen_t len, /* length of extent */
int *stat); /* success/failure */
int *stat); /* success/failure */
/*
* Lookup the first record less than or equal to [bno, len]
......@@ -242,7 +242,7 @@ xfs_alloc_lookup_le(
struct xfs_btree_cur *cur, /* btree cursor */
xfs_agblock_t bno, /* starting block of extent */
xfs_extlen_t len, /* length of extent */
int *stat); /* success/failure */
int *stat); /* success/failure */
/*
* Update the record referred to by cur, to the value given by [bno, len].
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -71,7 +71,7 @@ STATIC int xfs_attr_rmtval_set(xfs_da_args_t *args);
STATIC int xfs_attr_rmtval_remove(xfs_da_args_t *args);
#define ATTR_RMTVALUE_MAPSIZE 1 /* # of map entries at once */
#define ATTR_RMTVALUE_TRANSBLKS 8 /* max # of blks in a transaction */
#define ATTR_RMTVALUE_TRANSBLKS 8 /* max # of blks in a transaction */
#if defined(DEBUG)
ktrace_t *xfs_attr_trace_buf;
......@@ -88,9 +88,9 @@ int /* error */
xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp,
int flags, struct cred *cred)
{
xfs_da_args_t args;
int error;
int namelen;
xfs_da_args_t args;
int error;
int namelen;
xfs_inode_t *ip = XFS_BHVTOI(bdp);
if (!name)
......@@ -170,8 +170,8 @@ xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags,
int local, size;
uint nblks;
xfs_mount_t *mp;
int rsvd = (flags & ATTR_ROOT) != 0;
int namelen;
int rsvd = (flags & ATTR_ROOT) != 0;
int namelen;
ASSERT(MAXNAMELEN-1 <= 0xff); /* length is stored in uint8 */
namelen = strlen(name);
......@@ -423,13 +423,13 @@ xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags,
int /* error */
xfs_attr_remove(bhv_desc_t *bdp, char *name, int flags, struct cred *cred)
{
xfs_da_args_t args;
xfs_inode_t *dp;
xfs_fsblock_t firstblock;
xfs_bmap_free_t flist;
int error;
xfs_mount_t *mp;
int namelen;
xfs_da_args_t args;
xfs_inode_t *dp;
xfs_fsblock_t firstblock;
xfs_bmap_free_t flist;
int error;
xfs_mount_t *mp;
int namelen;
ASSERT(MAXNAMELEN-1<=0xff); /* length is stored in uint8 */
namelen = strlen(name);
......@@ -575,7 +575,7 @@ xfs_attr_remove(bhv_desc_t *bdp, char *name, int flags, struct cred *cred)
/*
* Generate a list of extended attribute names and optionally
* also value lengths. Positive return value follows the XFS
* also value lengths. Positive return value follows the XFS
* convention of being an error, zero or negative return code
* is the length of the buffer returned (negated), indicating
* success.
......@@ -617,7 +617,7 @@ xfs_attr_list(bhv_desc_t *bdp, char *buffer, int bufsize, int flags,
context.resynch = 1;
context.flags = flags;
if (!(flags & ATTR_KERNAMELS)) {
context.bufsize = (bufsize & ~(sizeof(int)-1)); /* align */
context.bufsize = (bufsize & ~(sizeof(int)-1)); /* align */
context.firstu = context.bufsize;
context.alist = (attrlist_t *)buffer;
context.alist->al_count = 0;
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_ATTR_H__
#define __XFS_ATTR_H__
#define __XFS_ATTR_H__
/*
* xfs_attr.h
......@@ -46,7 +46,7 @@
*/
#ifdef XFS_ALL_TRACE
#define XFS_ATTR_TRACE
#define XFS_ATTR_TRACE
#endif
#if !defined(DEBUG)
......@@ -68,15 +68,15 @@
/*
* The maximum size (into the kernel or returned from the kernel) of an
* attribute value or the buffer used for an attr_list() call. Larger
* attribute value or the buffer used for an attr_list() call. Larger
* sizes will result in an ERANGE return code.
*/
#define ATTR_MAX_VALUELEN (64*1024) /* max length of a value */
#define ATTR_MAX_VALUELEN (64*1024) /* max length of a value */
/*
* Define how lists of attribute names are returned to the user from
* the attr_list() call. A large, 32bit aligned, buffer is passed in
* along with its size. We put an array of offsets at the top that each
* along with its size. We put an array of offsets at the top that each
* reference an attrlist_ent_t and pack the attrlist_ent_t's at the bottom.
*/
typedef struct attrlist {
......@@ -98,7 +98,7 @@ typedef struct attrlist_ent { /* data from attr_list() */
* Given a pointer to the (char*) buffer containing the attr_list() result,
* and an index, return a pointer to the indicated attribute in the buffer.
*/
#define ATTR_ENTRY(buffer, index) \
#define ATTR_ENTRY(buffer, index) \
((attrlist_ent_t *) \
&((char *)buffer)[ ((attrlist_t *)(buffer))->al_offset[index] ])
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -865,7 +865,7 @@ xfs_attr_leaf_add(xfs_dabuf_t *bp, xfs_da_args_t *args)
/*
* After compaction, the block is guaranteed to have only one
* free region, in freemap[0]. If it is not big enough, give up.
* free region, in freemap[0]. If it is not big enough, give up.
*/
if (INT_GET(hdr->freemap[0].size, ARCH_CONVERT)
< (entsize + sizeof(xfs_attr_leaf_entry_t)))
......@@ -1068,7 +1068,7 @@ xfs_attr_leaf_compact(xfs_trans_t *trans, xfs_dabuf_t *bp)
*
* This code adjusts the args->index/blkno and args->index2/blkno2 fields
* to match what it is doing in splitting the attribute leaf block. Those
* values are used in "atomic rename" operations on attributes. Note that
* values are used in "atomic rename" operations on attributes. Note that
* the "new" and "old" values can end up in different blocks.
*/
STATIC void
......@@ -1285,7 +1285,7 @@ xfs_attr_leaf_figure_balance(xfs_da_state_t *state,
entry = &leaf1->entries[0];
for (count = index = 0; count < max; entry++, index++, count++) {
#define XFS_ATTR_ABS(A) (((A) < 0) ? -(A) : (A))
#define XFS_ATTR_ABS(A) (((A) < 0) ? -(A) : (A))
/*
* The new entry is in the first block, account for it.
*/
......@@ -1708,7 +1708,7 @@ xfs_attr_leaf_unbalance(xfs_da_state_t *state, xfs_da_state_blk_t *drop_blk,
memset(tmpbuffer, 0, state->blocksize);
tmp_leaf = (xfs_attr_leafblock_t *)tmpbuffer;
tmp_hdr = &tmp_leaf->hdr;
tmp_hdr->info = save_hdr->info; /* struct copy */
tmp_hdr->info = save_hdr->info; /* struct copy */
INT_ZERO(tmp_hdr->count, ARCH_CONVERT);
INT_SET(tmp_hdr->firstused, ARCH_CONVERT, state->blocksize);
if (INT_ISZERO(tmp_hdr->firstused, ARCH_CONVERT)) {
......@@ -2004,7 +2004,7 @@ xfs_attr_leaf_moveents(xfs_attr_leafblock_t *leaf_s, int start_s,
#ifdef GROT
/*
* Code to drop INCOMPLETE entries. Difficult to use as we
* may also need to change the insertion index. Code turned
* may also need to change the insertion index. Code turned
* off for 6.2, should be revisited later.
*/
if (entry_s->flags & XFS_ATTR_INCOMPLETE) { /* skip partials? */
......@@ -2291,9 +2291,9 @@ xfs_attr_leaf_list_int(xfs_dabuf_t *bp, xfs_attr_list_context_t *context)
return(retval);
}
#define ATTR_ENTBASESIZE /* minimum bytes used by an attr */ \
#define ATTR_ENTBASESIZE /* minimum bytes used by an attr */ \
(((struct attrlist_ent *) 0)->a_name - (char *) 0)
#define ATTR_ENTSIZE(namelen) /* actual bytes used by an attr */ \
#define ATTR_ENTSIZE(namelen) /* actual bytes used by an attr */ \
((ATTR_ENTBASESIZE + (namelen) + 1 + sizeof(u_int32_t)-1) \
& ~(sizeof(u_int32_t)-1))
......@@ -2957,7 +2957,7 @@ xfs_attr_rolltrans(xfs_trans_t **transp, xfs_inode_t *dp)
* Reserve space in the log for th next transaction.
* This also pushes items in the "AIL", the list of logged items,
* out to disk if they are taking up space at the tail of the log
* that we want to use. This requires that either nothing be locked
* that we want to use. This requires that either nothing be locked
* across this call, or that anything that is locked be logged in
* the prior and the next transactions.
*/
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_ATTR_LEAF_H__
#define __XFS_ATTR_LEAF_H__
#define __XFS_ATTR_LEAF_H__
/*
* Attribute storage layout, internal structure, access macros, etc.
......@@ -38,7 +38,7 @@
* Attribute lists are structured around Btrees where all the data
* elements are in the leaf nodes. Attribute names are hashed into an int,
* then that int is used as the index into the Btree. Since the hashval
* of an attribute name may not be unique, we may have duplicate keys. The
* of an attribute name may not be unique, we may have duplicate keys. The
* internal links in the Btree are logical block offsets into the file.
*/
......@@ -58,7 +58,7 @@ struct xfs_trans;
/*
* This is the structure of the leaf nodes in the Btree.
*
* Struct leaf_entry's are packed from the top. Name/values grow from the
* Struct leaf_entry's are packed from the top. Name/values grow from the
* bottom but are not packed. The freemap contains run-length-encoded entries
* for the free bytes after the leaf_entry's, but only the N largest such,
* smaller runs are dropped. When the freemap doesn't show enough space
......@@ -76,10 +76,10 @@ struct xfs_trans;
* the leaf_entry. The namespaces are independent only because we also look
* at the root/user bit when we are looking for a matching attribute name.
*
* We also store a "incomplete" bit in the leaf_entry. It shows that an
* We also store a "incomplete" bit in the leaf_entry. It shows that an
* attribute is in the middle of being created and should not be shown to
* the user if we crash during the time that the bit is set. We clear the
* bit when we have finished setting up the attribute. We do this because
* bit when we have finished setting up the attribute. We do this because
* we cannot create some large attributes inside a single transaction, and we
* need some indication that we weren't finished if we crash in the middle.
*/
......@@ -127,9 +127,9 @@ typedef struct xfs_attr_leaf_name_remote xfs_attr_leaf_name_remote_t;
* NOTE: the INCOMPLETE bit must not collide with the flags bits specified
* on the system call, they are "or"ed together for various operations.
*/
#define XFS_ATTR_LOCAL_BIT 0 /* attr is stored locally */
#define XFS_ATTR_ROOT_BIT 1 /* limit access to attr to userid 0 */
#define XFS_ATTR_INCOMPLETE_BIT 7 /* attr in middle of create/delete */
#define XFS_ATTR_LOCAL_BIT 0 /* attr is stored locally */
#define XFS_ATTR_ROOT_BIT 1 /* limit access to attr to userid 0 */
#define XFS_ATTR_INCOMPLETE_BIT 7 /* attr in middle of create/delete */
#define XFS_ATTR_LOCAL (1 << XFS_ATTR_LOCAL_BIT)
#define XFS_ATTR_ROOT (1 << XFS_ATTR_ROOT_BIT)
#define XFS_ATTR_INCOMPLETE (1 << XFS_ATTR_INCOMPLETE_BIT)
......@@ -138,7 +138,7 @@ typedef struct xfs_attr_leaf_name_remote xfs_attr_leaf_name_remote_t;
* Alignment for namelist and valuelist entries (since they are mixed
* there can be only one alignment value)
*/
#define XFS_ATTR_LEAF_NAME_ALIGN ((uint)sizeof(xfs_dablk_t))
#define XFS_ATTR_LEAF_NAME_ALIGN ((uint)sizeof(xfs_dablk_t))
/*
* Cast typed pointers for "local" and "remote" name/value structs.
......@@ -211,11 +211,11 @@ int xfs_attr_leaf_entsize_local_max(int bsize);
typedef struct xfs_attr_list_context {
struct xfs_inode *dp; /* inode */
struct attrlist_cursor_kern *cursor;/* position in list */
struct attrlist *alist; /* output buffer */
struct attrlist *alist; /* output buffer */
int count; /* num used entries */
int dupcnt; /* count dup hashvals seen */
int dupcnt; /* count dup hashvals seen */
int bufsize;/* total buffer size */
int firstu; /* first used byte in buffer */
int firstu; /* first used byte in buffer */
int flags; /* from VOP call */
int resynch;/* T/F: resynch with cursor */
} xfs_attr_list_context_t;
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_ATTR_SF_H__
#define __XFS_ATTR_SF_H__
#define __XFS_ATTR_SF_H__
/*
* Attribute storage when stored inside the inode.
......@@ -105,7 +105,7 @@ int xfs_attr_sf_totsize(struct xfs_inode *dp);
#endif
#ifdef XFS_ALL_TRACE
#define XFS_ATTR_TRACE
#define XFS_ATTR_TRACE
#endif
#if !defined(DEBUG)
......@@ -120,15 +120,15 @@ struct xfs_da_intnode;
struct xfs_da_node_entry;
struct xfs_attr_leafblock;
#define XFS_ATTR_TRACE_SIZE 4096 /* size of global trace buffer */
#define XFS_ATTR_TRACE_SIZE 4096 /* size of global trace buffer */
/*
* Trace record types.
*/
#define XFS_ATTR_KTRACE_L_C 1 /* context */
#define XFS_ATTR_KTRACE_L_CN 2 /* context, node */
#define XFS_ATTR_KTRACE_L_CB 3 /* context, btree */
#define XFS_ATTR_KTRACE_L_CL 4 /* context, leaf */
#define XFS_ATTR_KTRACE_L_C 1 /* context */
#define XFS_ATTR_KTRACE_L_CN 2 /* context, node */
#define XFS_ATTR_KTRACE_L_CB 3 /* context, btree */
#define XFS_ATTR_KTRACE_L_CL 4 /* context, leaf */
#if defined(XFS_ATTR_TRACE)
......@@ -148,10 +148,10 @@ void xfs_attr_trace_enter(int type, char *where,
__psunsigned_t a12, __psunsigned_t a13,
__psunsigned_t a14, __psunsigned_t a15);
#else
#define xfs_attr_trace_l_c(w,c)
#define xfs_attr_trace_l_cn(w,c,n)
#define xfs_attr_trace_l_cb(w,c,b)
#define xfs_attr_trace_l_cl(w,c,l)
#define xfs_attr_trace_l_c(w,c)
#define xfs_attr_trace_l_cn(w,c,n)
#define xfs_attr_trace_l_cb(w,c,b)
#define xfs_attr_trace_l_cl(w,c,l)
#endif /* XFS_ATTR_TRACE */
#endif /* __XFS_ATTR_SF_H__ */
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -231,7 +231,7 @@ xfs_count_bits(uint *map, uint size, uint start_bit)
* start_bit. Size is the size of the bitmap in words.
*/
int
xfs_contig_bits(uint *map, uint size, uint start_bit)
xfs_contig_bits(uint *map, uint size, uint start_bit)
{
#if BITS_PER_LONG == 32
return find_next_zero_bit((unsigned long *)map,
......@@ -263,7 +263,7 @@ xfs_contig_bits(uint *map, uint size, uint start_bit)
/*
* This takes the bit number to start looking from and
* returns the next set bit from there. It returns -1
* returns the next set bit from there. It returns -1
* if there are no more bits set or the start bit is
* beyond the end of the bitmap.
*
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_BIT_H__
#define __XFS_BIT_H__
#define __XFS_BIT_H__
/*
* XFS bit manipulation routines.
......@@ -41,27 +41,27 @@
*/
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK32HI)
__uint32_t xfs_mask32hi(int n);
#define XFS_MASK32HI(n) xfs_mask32hi(n)
#define XFS_MASK32HI(n) xfs_mask32hi(n)
#else
#define XFS_MASK32HI(n) ((__uint32_t)-1 << (32 - (n)))
#define XFS_MASK32HI(n) ((__uint32_t)-1 << (32 - (n)))
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK64HI)
__uint64_t xfs_mask64hi(int n);
#define XFS_MASK64HI(n) xfs_mask64hi(n)
#define XFS_MASK64HI(n) xfs_mask64hi(n)
#else
#define XFS_MASK64HI(n) ((__uint64_t)-1 << (64 - (n)))
#define XFS_MASK64HI(n) ((__uint64_t)-1 << (64 - (n)))
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK32LO)
__uint32_t xfs_mask32lo(int n);
#define XFS_MASK32LO(n) xfs_mask32lo(n)
#define XFS_MASK32LO(n) xfs_mask32lo(n)
#else
#define XFS_MASK32LO(n) (((__uint32_t)1 << (n)) - 1)
#define XFS_MASK32LO(n) (((__uint32_t)1 << (n)) - 1)
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK64LO)
__uint64_t xfs_mask64lo(int n);
#define XFS_MASK64LO(n) xfs_mask64lo(n)
#define XFS_MASK64LO(n) xfs_mask64lo(n)
#else
#define XFS_MASK64LO(n) (((__uint64_t)1 << (n)) - 1)
#define XFS_MASK64LO(n) (((__uint64_t)1 << (n)) - 1)
#endif
/* Get high bit set out of 32-bit argument, -1 if none set */
......
This diff is collapsed.
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_BMAP_H__
#define __XFS_BMAP_H__
#define __XFS_BMAP_H__
struct getbmap;
struct xfs_bmbt_irec;
......@@ -52,19 +52,19 @@ typedef struct xfs_bmap_free_item
/*
* Header for free extent list.
*/
typedef struct xfs_bmap_free
typedef struct xfs_bmap_free
{
xfs_bmap_free_item_t *xbf_first; /* list of to-be-free extents */
int xbf_count; /* count of items on list */
int xbf_low; /* kludge: alloc in low mode */
} xfs_bmap_free_t;
#define XFS_BMAP_MAX_NMAP 4
#define XFS_BMAP_MAX_NMAP 4
/*
* Flags for xfs_bmapi
*/
#define XFS_BMAPI_WRITE 0x001 /* write operation: allocate space */
#define XFS_BMAPI_WRITE 0x001 /* write operation: allocate space */
#define XFS_BMAPI_DELAY 0x002 /* delayed write operation */
#define XFS_BMAPI_ENTIRE 0x004 /* return entire extent, not trimmed */
#define XFS_BMAPI_METADATA 0x008 /* mapping metadata not user data */
......@@ -72,37 +72,37 @@ typedef struct xfs_bmap_free
#define XFS_BMAPI_ATTRFORK 0x020 /* use attribute fork not data */
#define XFS_BMAPI_ASYNC 0x040 /* bunmapi xactions can be async */
#define XFS_BMAPI_RSVBLOCKS 0x080 /* OK to alloc. reserved data blocks */
#define XFS_BMAPI_PREALLOC 0x100 /* preallocation op: unwritten space */
#define XFS_BMAPI_IGSTATE 0x200 /* Ignore state - */
#define XFS_BMAPI_PREALLOC 0x100 /* preallocation op: unwritten space */
#define XFS_BMAPI_IGSTATE 0x200 /* Ignore state - */
/* combine contig. space */
#define XFS_BMAPI_CONTIG 0x400 /* must allocate only one extent */
#define XFS_BMAPI_CONTIG 0x400 /* must allocate only one extent */
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAPI_AFLAG)
int xfs_bmapi_aflag(int w);
#define XFS_BMAPI_AFLAG(w) xfs_bmapi_aflag(w)
#define XFS_BMAPI_AFLAG(w) xfs_bmapi_aflag(w)
#else
#define XFS_BMAPI_AFLAG(w) ((w) == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0)
#define XFS_BMAPI_AFLAG(w) ((w) == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0)
#endif
/*
* Special values for xfs_bmbt_irec_t br_startblock field.
*/
#define DELAYSTARTBLOCK ((xfs_fsblock_t)-1LL)
#define HOLESTARTBLOCK ((xfs_fsblock_t)-2LL)
#define DELAYSTARTBLOCK ((xfs_fsblock_t)-1LL)
#define HOLESTARTBLOCK ((xfs_fsblock_t)-2LL)
/*
* Trace operations for bmap extent tracing
*/
#define XFS_BMAP_KTRACE_DELETE 1
#define XFS_BMAP_KTRACE_INSERT 2
#define XFS_BMAP_KTRACE_PRE_UP 3
#define XFS_BMAP_KTRACE_POST_UP 4
#define XFS_BMAP_KTRACE_DELETE 1
#define XFS_BMAP_KTRACE_INSERT 2
#define XFS_BMAP_KTRACE_PRE_UP 3
#define XFS_BMAP_KTRACE_POST_UP 4
#define XFS_BMAP_TRACE_SIZE 4096 /* size of global trace buffer */
#define XFS_BMAP_KTRACE_SIZE 32 /* size of per-inode trace buffer */
#define XFS_BMAP_TRACE_SIZE 4096 /* size of global trace buffer */
#define XFS_BMAP_KTRACE_SIZE 32 /* size of per-inode trace buffer */
#if defined(XFS_ALL_TRACE)
#define XFS_BMAP_TRACE
#define XFS_BMAP_TRACE
#endif
#if !defined(DEBUG)
......@@ -112,9 +112,9 @@ int xfs_bmapi_aflag(int w);
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_INIT)
void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp);
#define XFS_BMAP_INIT(flp,fbp) xfs_bmap_init(flp,fbp)
#define XFS_BMAP_INIT(flp,fbp) xfs_bmap_init(flp,fbp)
#else
#define XFS_BMAP_INIT(flp,fbp) \
#define XFS_BMAP_INIT(flp,fbp) \
((flp)->xbf_first = NULL, (flp)->xbf_count = 0, \
(flp)->xbf_low = 0, *(fbp) = NULLFSBLOCK)
#endif
......@@ -128,17 +128,17 @@ typedef struct xfs_bmalloca {
xfs_fileoff_t off; /* offset in file filling in */
struct xfs_trans *tp; /* transaction pointer */
struct xfs_inode *ip; /* incore inode pointer */
struct xfs_bmbt_irec *prevp; /* extent before the new one */
struct xfs_bmbt_irec *prevp; /* extent before the new one */
struct xfs_bmbt_irec *gotp; /* extent after, or delayed */
xfs_extlen_t alen; /* i/o length asked/allocated */
xfs_extlen_t total; /* total blocks needed for xaction */
xfs_extlen_t minlen; /* mininum allocation size (blocks) */
xfs_extlen_t minlen; /* mininum allocation size (blocks) */
xfs_extlen_t minleft; /* amount must be left after alloc */
char eof; /* set if allocating past last extent */
char wasdel; /* replacing a delayed allocation */
char wasdel; /* replacing a delayed allocation */
char userdata;/* set if is user data */
char low; /* low on space, using seq'l ags */
char aeof; /* allocated space at eof */
char aeof; /* allocated space at eof */
} xfs_bmalloca_t;
#ifdef __KERNEL__
......@@ -179,7 +179,7 @@ xfs_bmap_check_swappable(
/*
* Compute and fill in the value of the maximum depth of a bmap btree
* in this filesystem. Done once, during mount.
* in this filesystem. Done once, during mount.
*/
void
xfs_bmap_compute_maxlevels(
......@@ -271,7 +271,7 @@ xfs_bmap_trace_exlist(
xfs_extnum_t cnt, /* count of entries in list */
int whichfork); /* data or attr fork */
#else
#define xfs_bmap_trace_exlist(f,ip,c,w)
#define xfs_bmap_trace_exlist(f,ip,c,w)
#endif
/*
......@@ -319,7 +319,7 @@ xfs_bmapi_single(
/*
* Unmap (remove) blocks from a file.
* If nexts is nonzero then the number of extents to remove is limited to
* that value. If not all extents in the block range can be removed then
* that value. If not all extents in the block range can be removed then
* *done is set.
*/
int /* error */
......@@ -364,10 +364,10 @@ xfs_bmap_isaeof(
*/
int
xfs_bmap_eof(
struct xfs_inode *ip,
xfs_fileoff_t endoff,
int whichfork,
int *eof);
struct xfs_inode *ip,
xfs_fileoff_t endoff,
int whichfork,
int *eof);
/*
* Count fsblocks of the given fork.
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -59,7 +59,7 @@ STATIC int xfs_bmbt_updkey(xfs_btree_cur_t *, xfs_bmbt_key_t *, int);
STATIC void
xfs_bmbt_trace_enter(
char *func,
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
char *s,
int type,
int line,
......@@ -100,7 +100,7 @@ xfs_bmbt_trace_enter(
STATIC void
xfs_bmbt_trace_argbi(
char *func,
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
xfs_buf_t *b,
int i,
int line)
......@@ -117,7 +117,7 @@ xfs_bmbt_trace_argbi(
STATIC void
xfs_bmbt_trace_argbii(
char *func,
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
xfs_buf_t *b,
int i0,
int i1,
......@@ -155,7 +155,7 @@ xfs_bmbt_trace_argfffi(
STATIC void
xfs_bmbt_trace_argi(
char *func,
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
int i,
int line)
{
......@@ -243,7 +243,7 @@ xfs_bmbt_trace_argik(
STATIC void
xfs_bmbt_trace_cursor(
char *func,
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
char *s,
int line)
{
......@@ -260,21 +260,21 @@ xfs_bmbt_trace_cursor(
(cur->bc_ptrs[2] << 16) | cur->bc_ptrs[3]);
}
#define XFS_BMBT_TRACE_ARGBI(c,b,i) \
#define XFS_BMBT_TRACE_ARGBI(c,b,i) \
xfs_bmbt_trace_argbi(fname, c, b, i, __LINE__)
#define XFS_BMBT_TRACE_ARGBII(c,b,i,j) \
#define XFS_BMBT_TRACE_ARGBII(c,b,i,j) \
xfs_bmbt_trace_argbii(fname, c, b, i, j, __LINE__)
#define XFS_BMBT_TRACE_ARGFFFI(c,o,b,i,j) \
#define XFS_BMBT_TRACE_ARGFFFI(c,o,b,i,j) \
xfs_bmbt_trace_argfffi(fname, c, o, b, i, j, __LINE__)
#define XFS_BMBT_TRACE_ARGI(c,i) \
#define XFS_BMBT_TRACE_ARGI(c,i) \
xfs_bmbt_trace_argi(fname, c, i, __LINE__)
#define XFS_BMBT_TRACE_ARGIFK(c,i,f,k) \
#define XFS_BMBT_TRACE_ARGIFK(c,i,f,k) \
xfs_bmbt_trace_argifk(fname, c, i, f, k, __LINE__)
#define XFS_BMBT_TRACE_ARGIFR(c,i,f,r) \
#define XFS_BMBT_TRACE_ARGIFR(c,i,f,r) \
xfs_bmbt_trace_argifr(fname, c, i, f, r, __LINE__)
#define XFS_BMBT_TRACE_ARGIK(c,i,k) \
#define XFS_BMBT_TRACE_ARGIK(c,i,k) \
xfs_bmbt_trace_argik(fname, c, i, k, __LINE__)
#define XFS_BMBT_TRACE_CURSOR(c,s) \
#define XFS_BMBT_TRACE_CURSOR(c,s) \
xfs_bmbt_trace_cursor(fname, c, s, __LINE__)
static char ARGS[] = "args";
static char ENTRY[] = "entry";
......@@ -282,14 +282,14 @@ static char ERROR[] = "error";
#undef EXIT
static char EXIT[] = "exit";
#else
#define XFS_BMBT_TRACE_ARGBI(c,b,i)
#define XFS_BMBT_TRACE_ARGBII(c,b,i,j)
#define XFS_BMBT_TRACE_ARGFFFI(c,o,b,i,j)
#define XFS_BMBT_TRACE_ARGI(c,i)
#define XFS_BMBT_TRACE_ARGIFK(c,i,f,k)
#define XFS_BMBT_TRACE_ARGIFR(c,i,f,r)
#define XFS_BMBT_TRACE_ARGIK(c,i,k)
#define XFS_BMBT_TRACE_CURSOR(c,s)
#define XFS_BMBT_TRACE_ARGBI(c,b,i)
#define XFS_BMBT_TRACE_ARGBII(c,b,i,j)
#define XFS_BMBT_TRACE_ARGFFFI(c,o,b,i,j)
#define XFS_BMBT_TRACE_ARGI(c,i)
#define XFS_BMBT_TRACE_ARGIFK(c,i,f,k)
#define XFS_BMBT_TRACE_ARGIFR(c,i,f,r)
#define XFS_BMBT_TRACE_ARGIK(c,i,k)
#define XFS_BMBT_TRACE_CURSOR(c,s)
#endif /* XFS_BMBT_TRACE */
......@@ -1002,7 +1002,7 @@ xfs_bmbt_killroot(
*/
STATIC void
xfs_bmbt_log_keys(
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
xfs_buf_t *bp,
int kfirst,
int klast)
......@@ -1041,7 +1041,7 @@ xfs_bmbt_log_keys(
*/
STATIC void
xfs_bmbt_log_ptrs(
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
xfs_buf_t *bp,
int pfirst,
int plast)
......@@ -1818,7 +1818,7 @@ xfs_bmbt_decrement(
*/
int /* error */
xfs_bmbt_delete(
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
int *stat) /* success/failure */
{
int error; /* error return value */
......@@ -2048,7 +2048,7 @@ xfs_bmbt_disk_get_startoff(
xfs_exntst_t
xfs_bmbt_disk_get_state(
xfs_bmbt_rec_t *r)
xfs_bmbt_rec_t *r)
{
int ext_flag;
......@@ -2148,7 +2148,7 @@ xfs_bmbt_increment(
*/
int /* error */
xfs_bmbt_insert(
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
int *stat) /* success/failure */
{
int error; /* error return value */
......@@ -2158,9 +2158,9 @@ xfs_bmbt_insert(
int i;
int level;
xfs_fsblock_t nbno;
xfs_btree_cur_t *ncur;
xfs_btree_cur_t *ncur;
xfs_bmbt_rec_t nrec;
xfs_btree_cur_t *pcur;
xfs_btree_cur_t *pcur;
XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
level = 0;
......@@ -2274,7 +2274,7 @@ xfs_bmbt_log_recs(
int /* error */
xfs_bmbt_lookup_eq(
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
xfs_fileoff_t off,
xfs_fsblock_t bno,
xfs_filblks_t len,
......@@ -2288,7 +2288,7 @@ xfs_bmbt_lookup_eq(
int /* error */
xfs_bmbt_lookup_ge(
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
xfs_fileoff_t off,
xfs_fsblock_t bno,
xfs_filblks_t len,
......@@ -2302,7 +2302,7 @@ xfs_bmbt_lookup_ge(
int /* error */
xfs_bmbt_lookup_le(
xfs_btree_cur_t *cur,
xfs_btree_cur_t *cur,
xfs_fileoff_t off,
xfs_fsblock_t bno,
xfs_filblks_t len,
......@@ -2434,7 +2434,7 @@ xfs_bmbt_newroot(
void
xfs_bmbt_set_all(
xfs_bmbt_rec_t *r,
xfs_bmbt_irec_t *s)
xfs_bmbt_irec_t *s)
{
int extent_flag;
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -71,7 +71,7 @@ xfs_btree_maxrecs(
STATIC int /* number of records fitting in block */
xfs_btree_maxrecs(
xfs_btree_cur_t *cur, /* btree cursor */
xfs_btree_block_t *block) /* generic btree block pointer */
xfs_btree_block_t *block) /* generic btree block pointer */
{
switch (cur->bc_btnum) {
case XFS_BTNUM_BNO:
......@@ -98,7 +98,7 @@ xfs_btree_maxrecs(
void
xfs_btree_check_block(
xfs_btree_cur_t *cur, /* btree cursor */
xfs_btree_block_t *block, /* generic btree block pointer */
xfs_btree_block_t *block, /* generic btree block pointer */
int level, /* level of the btree block */
xfs_buf_t *bp) /* buffer containing block, if any */
{
......@@ -121,8 +121,8 @@ xfs_btree_check_key(
{
switch (btnum) {
case XFS_BTNUM_BNO: {
xfs_alloc_key_t *k1;
xfs_alloc_key_t *k2;
xfs_alloc_key_t *k1;
xfs_alloc_key_t *k2;
k1 = ak1;
k2 = ak2;
......@@ -130,8 +130,8 @@ xfs_btree_check_key(
break;
}
case XFS_BTNUM_CNT: {
xfs_alloc_key_t *k1;
xfs_alloc_key_t *k2;
xfs_alloc_key_t *k1;
xfs_alloc_key_t *k2;
k1 = ak1;
k2 = ak2;
......@@ -150,8 +150,8 @@ xfs_btree_check_key(
break;
}
case XFS_BTNUM_INO: {
xfs_inobt_key_t *k1;
xfs_inobt_key_t *k2;
xfs_inobt_key_t *k1;
xfs_inobt_key_t *k2;
k1 = ak1;
k2 = ak2;
......@@ -171,7 +171,7 @@ xfs_btree_check_key(
int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_lblock(
xfs_btree_cur_t *cur, /* btree cursor */
xfs_btree_lblock_t *block, /* btree long form block pointer */
xfs_btree_lblock_t *block, /* btree long form block pointer */
int level, /* level of the btree block */
xfs_buf_t *bp) /* buffer for block, if any */
{
......@@ -206,7 +206,7 @@ xfs_btree_check_lblock(
*/
int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_lptr(
xfs_btree_cur_t *cur, /* btree cursor */
xfs_btree_cur_t *cur, /* btree cursor */
xfs_dfsbno_t ptr, /* btree block disk address */
int level) /* btree block level */
{
......@@ -232,8 +232,8 @@ xfs_btree_check_rec(
{
switch (btnum) {
case XFS_BTNUM_BNO: {
xfs_alloc_rec_t *r1;
xfs_alloc_rec_t *r2;
xfs_alloc_rec_t *r1;
xfs_alloc_rec_t *r2;
r1 = ar1;
r2 = ar2;
......@@ -242,8 +242,8 @@ xfs_btree_check_rec(
break;
}
case XFS_BTNUM_CNT: {
xfs_alloc_rec_t *r1;
xfs_alloc_rec_t *r2;
xfs_alloc_rec_t *r1;
xfs_alloc_rec_t *r2;
r1 = ar1;
r2 = ar2;
......@@ -264,8 +264,8 @@ xfs_btree_check_rec(
break;
}
case XFS_BTNUM_INO: {
xfs_inobt_rec_t *r1;
xfs_inobt_rec_t *r2;
xfs_inobt_rec_t *r1;
xfs_inobt_rec_t *r2;
r1 = ar1;
r2 = ar2;
......@@ -286,13 +286,13 @@ xfs_btree_check_rec(
int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_sblock(
xfs_btree_cur_t *cur, /* btree cursor */
xfs_btree_sblock_t *block, /* btree short form block pointer */
xfs_btree_sblock_t *block, /* btree short form block pointer */
int level, /* level of the btree block */
xfs_buf_t *bp) /* buffer containing block */
{
xfs_buf_t *agbp; /* buffer for ag. freespace struct */
xfs_agf_t *agf; /* ag. freespace structure */
xfs_agblock_t agflen; /* native ag. freespace length */
xfs_agblock_t agflen; /* native ag. freespace length */
int sblock_ok; /* block passes checks */
agbp = cur->bc_private.a.agbp;
......@@ -326,7 +326,7 @@ xfs_btree_check_sblock(
*/
int /* error (0 or EFSCORRUPTED) */
xfs_btree_check_sptr(
xfs_btree_cur_t *cur, /* btree cursor */
xfs_btree_cur_t *cur, /* btree cursor */
xfs_agblock_t ptr, /* btree block disk address */
int level) /* btree block level */
{
......@@ -347,7 +347,7 @@ xfs_btree_check_sptr(
*/
void
xfs_btree_del_cursor(
xfs_btree_cur_t *cur, /* btree cursor */
xfs_btree_cur_t *cur, /* btree cursor */
int error) /* del because of error */
{
int i; /* btree level */
......@@ -386,14 +386,14 @@ xfs_btree_del_cursor(
*/
int /* error */
xfs_btree_dup_cursor(
xfs_btree_cur_t *cur, /* input cursor */
xfs_btree_cur_t **ncur) /* output cursor */
xfs_btree_cur_t *cur, /* input cursor */
xfs_btree_cur_t **ncur) /* output cursor */
{
xfs_buf_t *bp; /* btree block's buffer pointer */
int error; /* error return value */
int i; /* level number of btree block */
xfs_mount_t *mp; /* mount structure for filesystem */
xfs_btree_cur_t *new; /* new cursor value */
xfs_btree_cur_t *new; /* new cursor value */
xfs_trans_t *tp; /* transaction pointer, can be NULL */
tp = cur->bc_tp;
......@@ -449,7 +449,7 @@ xfs_btree_firstrec(
xfs_btree_cur_t *cur, /* btree cursor */
int level) /* level to change */
{
xfs_btree_block_t *block; /* generic btree block pointer */
xfs_btree_block_t *block; /* generic btree block pointer */
xfs_buf_t *bp; /* buffer containing block */
/*
......@@ -479,7 +479,7 @@ xfs_btree_get_block(
int level, /* level in btree */
xfs_buf_t **bpp) /* buffer containing the block */
{
xfs_btree_block_t *block; /* return value */
xfs_btree_block_t *block; /* return value */
xfs_buf_t *bp; /* return buffer */
xfs_ifork_t *ifp; /* inode fork pointer */
int whichfork; /* data or attr fork */
......@@ -561,7 +561,7 @@ xfs_btree_init_cursor(
{
xfs_agf_t *agf; /* (A) allocation group freespace */
xfs_agi_t *agi; /* (I) allocation group inodespace */
xfs_btree_cur_t *cur; /* return value */
xfs_btree_cur_t *cur; /* return value */
xfs_ifork_t *ifp; /* (I) inode fork pointer */
int nlevels=0; /* number of levels in the btree */
......@@ -643,7 +643,7 @@ xfs_btree_islastblock(
xfs_btree_cur_t *cur, /* btree cursor */
int level) /* level to check */
{
xfs_btree_block_t *block; /* generic btree block pointer */
xfs_btree_block_t *block; /* generic btree block pointer */
xfs_buf_t *bp; /* buffer containing block */
block = xfs_btree_get_block(cur, level, &bp);
......@@ -656,14 +656,14 @@ xfs_btree_islastblock(
/*
* Change the cursor to point to the last record in the current block
* at the given level. Other levels are unaffected.
* at the given level. Other levels are unaffected.
*/
int /* success=1, failure=0 */
xfs_btree_lastrec(
xfs_btree_cur_t *cur, /* btree cursor */
int level) /* level to change */
{
xfs_btree_block_t *block; /* generic btree block pointer */
xfs_btree_block_t *block; /* generic btree block pointer */
xfs_buf_t *bp; /* buffer containing block */
/*
......
This diff is collapsed.
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -40,14 +40,14 @@
#include <xfs.h>
#define ROUNDUPNBWORD(x) (((x) + (NBWORD - 1)) & ~(NBWORD - 1))
#define ROUNDUPNBWORD(x) (((x) + (NBWORD - 1)) & ~(NBWORD - 1))
kmem_zone_t *xfs_buf_item_zone;
#ifdef XFS_TRANS_DEBUG
/*
* This function uses an alternate strategy for tracking the bytes
* that the user requests to be logged. This can then be used
* that the user requests to be logged. This can then be used
* in conjunction with the bli_orig array in the buf log item to
* catch bugs in our callers' code.
*
......@@ -86,7 +86,7 @@ xfs_buf_item_log_debug(
/*
* This function is called when we flush something into a buffer without
* logging it. This happens for things like inodes which are logged
* logging it. This happens for things like inodes which are logged
* separately from the buffer.
*/
void
......@@ -189,7 +189,7 @@ xfs_buf_item_size(
while (last_bit != -1) {
/*
* This takes the bit number to start looking from and
* returns the next set bit from there. It returns -1
* returns the next set bit from there. It returns -1
* if there are no more bits set or the start bit is
* beyond the end of the bitmap.
*/
......@@ -222,7 +222,7 @@ xfs_buf_item_size(
/*
* This is called to fill in the vector of log iovecs for the
* given log buf item. It fills the first entry with a buf log
* given log buf item. It fills the first entry with a buf log
* format structure, and the rest point to contiguous chunks
* within the buffer.
*/
......@@ -233,7 +233,7 @@ xfs_buf_item_format(
{
uint base_size;
uint nvecs;
xfs_log_iovec_t *vecp;
xfs_log_iovec_t *vecp;
xfs_buf_t *bp;
int first_bit;
int last_bit;
......@@ -286,7 +286,7 @@ xfs_buf_item_format(
for (;;) {
/*
* This takes the bit number to start looking from and
* returns the next set bit from there. It returns -1
* returns the next set bit from there. It returns -1
* if there are no more bits set or the start bit is
* beyond the end of the bitmap.
*/
......@@ -348,7 +348,7 @@ xfs_buf_item_format(
/*
* This is called to pin the buffer associated with the buf log
* item in memory so it cannot be written out. Simply call bpin()
* item in memory so it cannot be written out. Simply call bpin()
* on the buffer to do this.
*/
void
......@@ -605,7 +605,7 @@ xfs_buf_item_unlock(
* buf log item in the on disk log resides now that the last log
* write of it completed at the given lsn.
* We always re-log all the dirty data in a buffer, so usually the
* latest copy in the on disk log is the only one that matters. For
* latest copy in the on disk log is the only one that matters. For
* those cases we simply return the given lsn.
*
* The one exception to this is for buffers full of newly allocated
......@@ -653,7 +653,7 @@ xfs_buf_item_abort(
/*
* This is called to asynchronously write the buffer associated with this
* buf log item out to disk. The buffer will already have been locked by
* a successful call to xfs_buf_item_trylock(). If the buffer still has
* a successful call to xfs_buf_item_trylock(). If the buffer still has
* B_DELWRI set, then get it going out to disk with a call to bawrite().
* If not, then just release the buffer.
*/
......@@ -723,7 +723,7 @@ xfs_buf_item_init(
/*
* Check to see if there is already a buf log item for
* this buffer. If there is, it is guaranteed to be
* this buffer. If there is, it is guaranteed to be
* the first. If we do already have one, there is
* nothing to do here so return.
*/
......@@ -740,7 +740,7 @@ xfs_buf_item_init(
/*
* chunks is the number of XFS_BLI_CHUNK size pieces
* the buffer can be divided into. Make sure not to
* truncate any pieces. map_size is the size of the
* truncate any pieces. map_size is the size of the
* bitmap needed to describe the chunks of the buffer.
*/
chunks = (int)((XFS_BUF_COUNT(bp) + (XFS_BLI_CHUNK - 1)) >> XFS_BLI_SHIFT);
......@@ -838,7 +838,7 @@ xfs_buf_item_log(
/*
* First set any bits in the first word of our range.
* If it starts at bit 0 of the word, it will be
* set below rather than here. That is what the variable
* set below rather than here. That is what the variable
* bit tells us. The variable bits_set tracks the number
* of bits that have been set so far. End_bit is the number
* of the last bit to be set in this word plus one.
......@@ -928,7 +928,7 @@ xfs_buf_item_relse(
* to be called when the buffer's I/O completes. If it is not set
* already, set the buffer's b_iodone() routine to be
* xfs_buf_iodone_callbacks() and link the log item into the list of
* items rooted at b_fsprivate. Items are always added as the second
* items rooted at b_fsprivate. Items are always added as the second
* entry in the list if there is a first, because the buf item code
* assumes that the buf log item is first.
*/
......@@ -981,7 +981,7 @@ xfs_buf_do_callbacks(
/*
* This is the iodone() function for buffers which have had callbacks
* attached to them by xfs_buf_attach_iodone(). It should remove each
* attached to them by xfs_buf_attach_iodone(). It should remove each
* log item from the buffer's list and call the callback of each in turn.
* When done, the buffer's fsprivate field is set to NULL and the buffer
* is unlocked with a call to iodone().
......@@ -1201,5 +1201,3 @@ xfs_buf_item_trace(
(void *)((unsigned long)bip->bli_item.li_flags));
}
#endif /* XFS_BLI_TRACE */
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -29,14 +29,14 @@
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#ifndef __XFS_BUF_ITEM_H__
#define __XFS_BUF_ITEM_H__
#ifndef __XFS_BUF_ITEM_H__
#define __XFS_BUF_ITEM_H__
/*
* This is the structure used to lay out a buf log item in the
* log. The data map describes which 128 byte chunks of the buffer
* log. The data map describes which 128 byte chunks of the buffer
* have been logged. This structure works only on buffers that
* reside up to the first TB in the filesystem. These buffers are
* reside up to the first TB in the filesystem. These buffers are
* generated only by pre-6.2 systems and are known as XFS_LI_6_1_BUF.
*/
typedef struct xfs_buf_log_format_v1 {
......@@ -69,33 +69,33 @@ typedef struct xfs_buf_log_format_t {
* This flag indicates that the buffer contains on disk inodes
* and requires special recovery handling.
*/
#define XFS_BLI_INODE_BUF 0x1
#define XFS_BLI_INODE_BUF 0x1
/*
* This flag indicates that the buffer should not be replayed
* during recovery because its blocks are being freed.
*/
#define XFS_BLI_CANCEL 0x2
#define XFS_BLI_CANCEL 0x2
/*
* This flag indicates that the buffer contains on disk
* user or group dquots and may require special recovery handling.
*/
#define XFS_BLI_UDQUOT_BUF 0x4
#define XFS_BLI_UDQUOT_BUF 0x4
/* #define XFS_BLI_PDQUOT_BUF 0x8 */
#define XFS_BLI_GDQUOT_BUF 0x10
#define XFS_BLI_GDQUOT_BUF 0x10
#define XFS_BLI_CHUNK 128
#define XFS_BLI_SHIFT 7
#define BIT_TO_WORD_SHIFT 5
#define NBWORD (NBBY * sizeof(unsigned int))
#define XFS_BLI_CHUNK 128
#define XFS_BLI_SHIFT 7
#define BIT_TO_WORD_SHIFT 5
#define NBWORD (NBBY * sizeof(unsigned int))
/*
* buf log item flags
*/
#define XFS_BLI_HOLD 0x01
#define XFS_BLI_DIRTY 0x02
#define XFS_BLI_STALE 0x04
#define XFS_BLI_LOGGED 0x08
#define XFS_BLI_INODE_ALLOC_BUF 0x10
#define XFS_BLI_HOLD 0x01
#define XFS_BLI_DIRTY 0x02
#define XFS_BLI_STALE 0x04
#define XFS_BLI_LOGGED 0x08
#define XFS_BLI_INODE_ALLOC_BUF 0x10
#ifdef __KERNEL__
......@@ -136,11 +136,11 @@ typedef struct xfs_buf_cancel {
struct xfs_buf_cancel *bc_next;
} xfs_buf_cancel_t;
#define XFS_BLI_TRACE_SIZE 32
#define XFS_BLI_TRACE_SIZE 32
#if defined(XFS_ALL_TRACE)
#define XFS_BLI_TRACE
#define XFS_BLI_TRACE
#endif
#if !defined(DEBUG)
......@@ -150,7 +150,7 @@ typedef struct xfs_buf_cancel {
#if defined(XFS_BLI_TRACE)
void xfs_buf_item_trace(char *, xfs_buf_log_item_t *);
#else
#define xfs_buf_item_trace(id, bip)
#define xfs_buf_item_trace(id, bip)
#endif
void xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *);
......@@ -170,7 +170,7 @@ xfs_buf_item_flush_log_debug(
uint first,
uint last);
#else
#define xfs_buf_item_flush_log_debug(bp, first, last)
#define xfs_buf_item_flush_log_debug(bp, first, last)
#endif
#endif /* __KERNEL__ */
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -96,7 +96,7 @@ posix_cap_xfs_to_xattr(
ASSERT(sizeof(xattr_cap->c_effective) == sizeof(src->cap_effective));
xattr_cap->c_version = cpu_to_le32(POSIX_CAP_XATTR_VERSION);
xattr_cap->c_abiversion = cpu_to_le32(_LINUX_CAPABILITY_VERSION);
xattr_cap->c_abiversion = cpu_to_le32(_LINUX_CAPABILITY_VERSION);
xattr_cap->c_effective = src->cap_effective;
xattr_cap->c_permitted = src->cap_permitted;
xattr_cap->c_inheritable= src->cap_inheritable;
......@@ -114,7 +114,7 @@ xfs_cap_vget(
int len = sizeof(xfs_cap_set_t);
int flags = ATTR_ROOT;
xfs_cap_set_t xfs_cap = { 0 };
posix_cap_xattr *xattr_cap = cap;
posix_cap_xattr *xattr_cap = cap;
VN_HOLD(vp);
if ((error = _MAC_VACCESS(vp, NULL, VREAD)))
......
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -38,9 +38,9 @@
typedef __uint64_t xfs_cap_value_t;
typedef struct xfs_cap_set {
xfs_cap_value_t cap_effective; /* use in capability checks */
xfs_cap_value_t cap_permitted; /* combined with file attrs */
xfs_cap_value_t cap_inheritable;/* pass through exec */
xfs_cap_value_t cap_effective; /* use in capability checks */
xfs_cap_value_t cap_permitted; /* combined with file attrs */
xfs_cap_value_t cap_inheritable;/* pass through exec */
} xfs_cap_set_t;
/* On-disk XFS extended attribute names */
......@@ -81,4 +81,4 @@ extern int xfs_cap_vremove(struct vnode *vp);
#endif /* __KERNEL__ */
#endif /* __XFS_CAP_H__ */
#endif /* __XFS_CAP_H__ */
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......@@ -45,7 +45,7 @@
* system call), and the ABI issues that this implies.
*
* In Linux, we are passed a comma separated set of options;
* ie. a NULL terminated string of characters. Userspace mount
* ie. a NULL terminated string of characters. Userspace mount
* code does not have any knowledge of mount options expected by
* each filesystem type and so each filesystem parses its mount
* options in kernel space.
......@@ -69,10 +69,10 @@ struct xfs_mount_args {
/*
* XFS mount option flags
*/
#define XFSMNT_CHKLOG 0x00000001 /* check log */
#define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount
#define XFSMNT_CHKLOG 0x00000001 /* check log */
#define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount
* compatible */
#define XFSMNT_INO64 0x00000004 /* move inode numbers up
#define XFSMNT_INO64 0x00000004 /* move inode numbers up
* past 2^32 */
#define XFSMNT_UQUOTA 0x00000008 /* user quota accounting */
#define XFSMNT_PQUOTA 0x00000010 /* IRIX prj quota accounting */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -11,7 +11,7 @@
*
* 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
* 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.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment