Commit 8285fb58 authored by Nathan Scott's avatar Nathan Scott

[XFS] Resolve a namespace collision on remaining vtypes for FreeBSD

porters.

SGI-PV: 953338
SGI-Modid: xfs-linux-melb:xfs-kern:26108a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 67fcaa73
...@@ -1157,7 +1157,7 @@ xfs_ioc_xattr( ...@@ -1157,7 +1157,7 @@ xfs_ioc_xattr(
void __user *arg) void __user *arg)
{ {
struct fsxattr fa; struct fsxattr fa;
struct vattr *vattr; struct bhv_vattr *vattr;
int error = 0; int error = 0;
int attr_flags; int attr_flags;
unsigned int flags; unsigned int flags;
......
...@@ -200,7 +200,7 @@ xfs_ichgtime_fast( ...@@ -200,7 +200,7 @@ xfs_ichgtime_fast(
STATIC void STATIC void
xfs_validate_fields( xfs_validate_fields(
struct inode *ip, struct inode *ip,
struct vattr *vattr) bhv_vattr_t *vattr)
{ {
vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS; vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS;
if (!bhv_vop_getattr(vn_from_inode(ip), vattr, ATTR_LAZY, NULL)) { if (!bhv_vop_getattr(vn_from_inode(ip), vattr, ATTR_LAZY, NULL)) {
...@@ -290,7 +290,7 @@ xfs_vn_mknod( ...@@ -290,7 +290,7 @@ xfs_vn_mknod(
dev_t rdev) dev_t rdev)
{ {
struct inode *ip; struct inode *ip;
vattr_t vattr = { 0 }; bhv_vattr_t vattr = { 0 };
bhv_vnode_t *vp = NULL, *dvp = vn_from_inode(dir); bhv_vnode_t *vp = NULL, *dvp = vn_from_inode(dir);
xfs_acl_t *default_acl = NULL; xfs_acl_t *default_acl = NULL;
attrexists_t test_default_acl = _ACL_DEFAULT_EXISTS; attrexists_t test_default_acl = _ACL_DEFAULT_EXISTS;
...@@ -417,7 +417,7 @@ xfs_vn_link( ...@@ -417,7 +417,7 @@ xfs_vn_link(
struct inode *ip; /* inode of guy being linked to */ struct inode *ip; /* inode of guy being linked to */
bhv_vnode_t *tdvp; /* target directory for new name/link */ bhv_vnode_t *tdvp; /* target directory for new name/link */
bhv_vnode_t *vp; /* vp of name being linked */ bhv_vnode_t *vp; /* vp of name being linked */
vattr_t vattr; bhv_vattr_t vattr;
int error; int error;
ip = old_dentry->d_inode; /* inode being linked to */ ip = old_dentry->d_inode; /* inode being linked to */
...@@ -444,7 +444,7 @@ xfs_vn_unlink( ...@@ -444,7 +444,7 @@ xfs_vn_unlink(
{ {
struct inode *inode; struct inode *inode;
bhv_vnode_t *dvp; /* directory containing name to remove */ bhv_vnode_t *dvp; /* directory containing name to remove */
vattr_t vattr; bhv_vattr_t vattr;
int error; int error;
inode = dentry->d_inode; inode = dentry->d_inode;
...@@ -465,7 +465,7 @@ xfs_vn_symlink( ...@@ -465,7 +465,7 @@ xfs_vn_symlink(
const char *symname) const char *symname)
{ {
struct inode *ip; struct inode *ip;
vattr_t va = { 0 }; bhv_vattr_t va = { 0 };
bhv_vnode_t *dvp; /* directory containing name of symlink */ bhv_vnode_t *dvp; /* directory containing name of symlink */
bhv_vnode_t *cvp; /* used to lookup symlink to put in dentry */ bhv_vnode_t *cvp; /* used to lookup symlink to put in dentry */
int error; int error;
...@@ -499,7 +499,7 @@ xfs_vn_rmdir( ...@@ -499,7 +499,7 @@ xfs_vn_rmdir(
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
bhv_vnode_t *dvp = vn_from_inode(dir); bhv_vnode_t *dvp = vn_from_inode(dir);
vattr_t vattr; bhv_vattr_t vattr;
int error; int error;
error = bhv_vop_rmdir(dvp, dentry, NULL); error = bhv_vop_rmdir(dvp, dentry, NULL);
...@@ -520,7 +520,7 @@ xfs_vn_rename( ...@@ -520,7 +520,7 @@ xfs_vn_rename(
struct inode *new_inode = ndentry->d_inode; struct inode *new_inode = ndentry->d_inode;
bhv_vnode_t *fvp; /* from directory */ bhv_vnode_t *fvp; /* from directory */
bhv_vnode_t *tvp; /* target directory */ bhv_vnode_t *tvp; /* target directory */
vattr_t vattr; bhv_vattr_t vattr;
int error; int error;
fvp = vn_from_inode(odir); fvp = vn_from_inode(odir);
...@@ -643,7 +643,7 @@ xfs_vn_setattr( ...@@ -643,7 +643,7 @@ xfs_vn_setattr(
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
unsigned int ia_valid = attr->ia_valid; unsigned int ia_valid = attr->ia_valid;
bhv_vnode_t *vp = vn_from_inode(inode); bhv_vnode_t *vp = vn_from_inode(inode);
vattr_t vattr = { 0 }; bhv_vattr_t vattr = { 0 };
int flags = 0; int flags = 0;
int error; int error;
......
...@@ -258,7 +258,7 @@ xfs_read( ...@@ -258,7 +258,7 @@ xfs_read(
if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) &&
!(ioflags & IO_INVIS)) { !(ioflags & IO_INVIS)) {
vrwlock_t locktype = VRWLOCK_READ; bhv_vrwlock_t locktype = VRWLOCK_READ;
int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags);
ret = -XFS_SEND_DATA(mp, DM_EVENT_READ, ret = -XFS_SEND_DATA(mp, DM_EVENT_READ,
...@@ -313,7 +313,7 @@ xfs_sendfile( ...@@ -313,7 +313,7 @@ xfs_sendfile(
if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) &&
(!(ioflags & IO_INVIS))) { (!(ioflags & IO_INVIS))) {
vrwlock_t locktype = VRWLOCK_READ; bhv_vrwlock_t locktype = VRWLOCK_READ;
int error; int error;
error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp),
...@@ -357,7 +357,7 @@ xfs_splice_read( ...@@ -357,7 +357,7 @@ xfs_splice_read(
if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) &&
(!(ioflags & IO_INVIS))) { (!(ioflags & IO_INVIS))) {
vrwlock_t locktype = VRWLOCK_READ; bhv_vrwlock_t locktype = VRWLOCK_READ;
int error; int error;
error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp),
...@@ -401,7 +401,7 @@ xfs_splice_write( ...@@ -401,7 +401,7 @@ xfs_splice_write(
if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_WRITE) && if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_WRITE) &&
(!(ioflags & IO_INVIS))) { (!(ioflags & IO_INVIS))) {
vrwlock_t locktype = VRWLOCK_WRITE; bhv_vrwlock_t locktype = VRWLOCK_WRITE;
int error; int error;
error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, BHV_TO_VNODE(bdp), error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, BHV_TO_VNODE(bdp),
...@@ -630,7 +630,7 @@ xfs_write( ...@@ -630,7 +630,7 @@ xfs_write(
unsigned long seg; unsigned long seg;
int iolock; int iolock;
int eventsent = 0; int eventsent = 0;
vrwlock_t locktype; bhv_vrwlock_t locktype;
size_t ocount = 0, count; size_t ocount = 0, count;
loff_t pos; loff_t pos;
int need_i_mutex = 1, need_flush = 0; int need_i_mutex = 1, need_flush = 0;
......
...@@ -117,7 +117,7 @@ vfs_root( ...@@ -117,7 +117,7 @@ vfs_root(
int int
vfs_statvfs( vfs_statvfs(
struct bhv_desc *bdp, struct bhv_desc *bdp,
xfs_statfs_t *sp, bhv_statvfs_t *statp,
struct bhv_vnode *vp) struct bhv_vnode *vp)
{ {
struct bhv_desc *next = bdp; struct bhv_desc *next = bdp;
...@@ -125,7 +125,7 @@ vfs_statvfs( ...@@ -125,7 +125,7 @@ vfs_statvfs(
ASSERT(next); ASSERT(next);
while (! (bhvtovfsops(next))->vfs_statvfs) while (! (bhvtovfsops(next))->vfs_statvfs)
next = BHV_NEXT(next); next = BHV_NEXT(next);
return ((*bhvtovfsops(next)->vfs_statvfs)(next, sp, vp)); return ((*bhvtovfsops(next)->vfs_statvfs)(next, statp, vp));
} }
int int
......
...@@ -23,14 +23,14 @@ ...@@ -23,14 +23,14 @@
struct bhv_vfs; struct bhv_vfs;
struct bhv_vnode; struct bhv_vnode;
struct fid; struct fid;
struct cred; struct cred;
struct statfs;
struct seq_file; struct seq_file;
struct super_block; struct super_block;
struct xfs_mount_args; struct xfs_mount_args;
typedef struct kstatfs xfs_statfs_t; typedef struct kstatfs bhv_statvfs_t;
typedef struct bhv_vfs_sync_work { typedef struct bhv_vfs_sync_work {
struct list_head w_list; struct list_head w_list;
...@@ -109,7 +109,7 @@ typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); ...@@ -109,7 +109,7 @@ typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *);
typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *,
struct xfs_mount_args *); struct xfs_mount_args *);
typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **); typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **);
typedef int (*vfs_statvfs_t)(bhv_desc_t *, xfs_statfs_t *, typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *,
struct bhv_vnode *); struct bhv_vnode *);
typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *);
typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *); typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *);
...@@ -181,7 +181,7 @@ extern int vfs_showargs(bhv_desc_t *, struct seq_file *); ...@@ -181,7 +181,7 @@ extern int vfs_showargs(bhv_desc_t *, struct seq_file *);
extern int vfs_unmount(bhv_desc_t *, int, struct cred *); extern int vfs_unmount(bhv_desc_t *, int, struct cred *);
extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *);
extern int vfs_root(bhv_desc_t *, struct bhv_vnode **); extern int vfs_root(bhv_desc_t *, struct bhv_vnode **);
extern int vfs_statvfs(bhv_desc_t *, xfs_statfs_t *, struct bhv_vnode *); extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct bhv_vnode *);
extern int vfs_sync(bhv_desc_t *, int, struct cred *); extern int vfs_sync(bhv_desc_t *, int, struct cred *);
extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *); extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *);
extern int vfs_dmapiops(bhv_desc_t *, caddr_t); extern int vfs_dmapiops(bhv_desc_t *, caddr_t);
......
...@@ -111,7 +111,7 @@ vn_initialize( ...@@ -111,7 +111,7 @@ vn_initialize(
void void
vn_revalidate_core( vn_revalidate_core(
bhv_vnode_t *vp, bhv_vnode_t *vp,
vattr_t *vap) bhv_vattr_t *vap)
{ {
struct inode *inode = vn_to_inode(vp); struct inode *inode = vn_to_inode(vp);
...@@ -147,7 +147,7 @@ vn_revalidate_core( ...@@ -147,7 +147,7 @@ vn_revalidate_core(
int int
__vn_revalidate( __vn_revalidate(
bhv_vnode_t *vp, bhv_vnode_t *vp,
struct vattr *vattr) bhv_vattr_t *vattr)
{ {
int error; int error;
...@@ -165,7 +165,7 @@ int ...@@ -165,7 +165,7 @@ int
vn_revalidate( vn_revalidate(
bhv_vnode_t *vp) bhv_vnode_t *vp)
{ {
vattr_t vattr; bhv_vattr_t vattr;
return __vn_revalidate(vp, &vattr); return __vn_revalidate(vp, &vattr);
} }
......
...@@ -20,29 +20,29 @@ ...@@ -20,29 +20,29 @@
struct uio; struct uio;
struct file; struct file;
struct vattr; struct bhv_vfs;
struct bhv_vattr;
struct xfs_iomap; struct xfs_iomap;
struct attrlist_cursor_kern; struct attrlist_cursor_kern;
typedef xfs_ino_t vnumber_t; typedef struct dentry bhv_vname_t;
typedef struct dentry vname_t; typedef __u64 bhv_vnumber_t;
typedef bhv_head_t vn_bhv_head_t;
typedef enum vflags { typedef enum bhv_vflags {
VMODIFIED = 0x08, /* XFS inode state possibly differs */ VMODIFIED = 0x08, /* XFS inode state possibly differs */
/* to the Linux inode state. */ /* to the Linux inode state. */
VTRUNCATED = 0x40, /* truncated down so flush-on-close */ VTRUNCATED = 0x40, /* truncated down so flush-on-close */
} vflags_t; } bhv_vflags_t;
/* /*
* MP locking protocols: * MP locking protocols:
* v_flag, v_vfsp VN_LOCK/VN_UNLOCK * v_flag, v_vfsp VN_LOCK/VN_UNLOCK
*/ */
typedef struct bhv_vnode { typedef struct bhv_vnode {
vflags_t v_flag; /* vnode flags (see above) */ bhv_vflags_t v_flag; /* vnode flags (see above) */
struct bhv_vfs *v_vfsp; /* ptr to containing VFS */ bhv_vfs_t *v_vfsp; /* ptr to containing VFS */
vnumber_t v_number; /* in-core vnode number */ bhv_vnumber_t v_number; /* in-core vnode number */
vn_bhv_head_t v_bh; /* behavior head */ bhv_head_t v_bh; /* behavior head */
spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */
atomic_t v_iocount; /* outstanding I/O count */ atomic_t v_iocount; /* outstanding I/O count */
#ifdef XFS_VNODE_TRACE #ifdef XFS_VNODE_TRACE
...@@ -103,14 +103,14 @@ static inline struct inode *vn_to_inode(struct bhv_vnode *vnode) ...@@ -103,14 +103,14 @@ static inline struct inode *vn_to_inode(struct bhv_vnode *vnode)
/* /*
* Values for the vop_rwlock/rwunlock flags parameter. * Values for the vop_rwlock/rwunlock flags parameter.
*/ */
typedef enum vrwlock { typedef enum bhv_vrwlock {
VRWLOCK_NONE, VRWLOCK_NONE,
VRWLOCK_READ, VRWLOCK_READ,
VRWLOCK_WRITE, VRWLOCK_WRITE,
VRWLOCK_WRITE_DIRECT, VRWLOCK_WRITE_DIRECT,
VRWLOCK_TRY_READ, VRWLOCK_TRY_READ,
VRWLOCK_TRY_WRITE VRWLOCK_TRY_WRITE
} vrwlock_t; } bhv_vrwlock_t;
/* /*
* Return values for bhv_vop_inactive. A return value of * Return values for bhv_vop_inactive. A return value of
...@@ -123,13 +123,13 @@ typedef enum vrwlock { ...@@ -123,13 +123,13 @@ typedef enum vrwlock {
/* /*
* Values for the cmd code given to vop_vnode_change. * Values for the cmd code given to vop_vnode_change.
*/ */
typedef enum vchange { typedef enum bhv_vchange {
VCHANGE_FLAGS_FRLOCKS = 0, VCHANGE_FLAGS_FRLOCKS = 0,
VCHANGE_FLAGS_ENF_LOCKING = 1, VCHANGE_FLAGS_ENF_LOCKING = 1,
VCHANGE_FLAGS_TRUNCATED = 2, VCHANGE_FLAGS_TRUNCATED = 2,
VCHANGE_FLAGS_PAGE_DIRTY = 3, VCHANGE_FLAGS_PAGE_DIRTY = 3,
VCHANGE_FLAGS_IOEXCL_COUNT = 4 VCHANGE_FLAGS_IOEXCL_COUNT = 4
} vchange_t; } bhv_vchange_t;
typedef enum { L_FALSE, L_TRUE } lastclose_t; typedef enum { L_FALSE, L_TRUE } lastclose_t;
...@@ -152,26 +152,26 @@ typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct pipe_inode_info *, ...@@ -152,26 +152,26 @@ typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct pipe_inode_info *,
struct cred *); struct cred *);
typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *, typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *,
int, unsigned int, void __user *); int, unsigned int, void __user *);
typedef int (*vop_getattr_t)(bhv_desc_t *, struct vattr *, int, typedef int (*vop_getattr_t)(bhv_desc_t *, struct bhv_vattr *, int,
struct cred *); struct cred *);
typedef int (*vop_setattr_t)(bhv_desc_t *, struct vattr *, int, typedef int (*vop_setattr_t)(bhv_desc_t *, struct bhv_vattr *, int,
struct cred *); struct cred *);
typedef int (*vop_access_t)(bhv_desc_t *, int, struct cred *); typedef int (*vop_access_t)(bhv_desc_t *, int, struct cred *);
typedef int (*vop_lookup_t)(bhv_desc_t *, vname_t *, bhv_vnode_t **, typedef int (*vop_lookup_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t **,
int, bhv_vnode_t *, struct cred *); int, bhv_vnode_t *, struct cred *);
typedef int (*vop_create_t)(bhv_desc_t *, vname_t *, struct vattr *, typedef int (*vop_create_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *,
bhv_vnode_t **, struct cred *); bhv_vnode_t **, struct cred *);
typedef int (*vop_remove_t)(bhv_desc_t *, vname_t *, struct cred *); typedef int (*vop_remove_t)(bhv_desc_t *, bhv_vname_t *, struct cred *);
typedef int (*vop_link_t)(bhv_desc_t *, bhv_vnode_t *, vname_t *, typedef int (*vop_link_t)(bhv_desc_t *, bhv_vnode_t *, bhv_vname_t *,
struct cred *); struct cred *);
typedef int (*vop_rename_t)(bhv_desc_t *, vname_t *, bhv_vnode_t *, typedef int (*vop_rename_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t *,
vname_t *, struct cred *); bhv_vname_t *, struct cred *);
typedef int (*vop_mkdir_t)(bhv_desc_t *, vname_t *, struct vattr *, typedef int (*vop_mkdir_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *,
bhv_vnode_t **, struct cred *); bhv_vnode_t **, struct cred *);
typedef int (*vop_rmdir_t)(bhv_desc_t *, vname_t *, struct cred *); typedef int (*vop_rmdir_t)(bhv_desc_t *, bhv_vname_t *, struct cred *);
typedef int (*vop_readdir_t)(bhv_desc_t *, struct uio *, struct cred *, typedef int (*vop_readdir_t)(bhv_desc_t *, struct uio *, struct cred *,
int *); int *);
typedef int (*vop_symlink_t)(bhv_desc_t *, vname_t *, struct vattr *, typedef int (*vop_symlink_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr*,
char *, bhv_vnode_t **, struct cred *); char *, bhv_vnode_t **, struct cred *);
typedef int (*vop_readlink_t)(bhv_desc_t *, struct uio *, int, typedef int (*vop_readlink_t)(bhv_desc_t *, struct uio *, int,
struct cred *); struct cred *);
...@@ -180,8 +180,8 @@ typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *, ...@@ -180,8 +180,8 @@ typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *,
typedef int (*vop_inactive_t)(bhv_desc_t *, struct cred *); typedef int (*vop_inactive_t)(bhv_desc_t *, struct cred *);
typedef int (*vop_fid2_t)(bhv_desc_t *, struct fid *); typedef int (*vop_fid2_t)(bhv_desc_t *, struct fid *);
typedef int (*vop_release_t)(bhv_desc_t *); typedef int (*vop_release_t)(bhv_desc_t *);
typedef int (*vop_rwlock_t)(bhv_desc_t *, vrwlock_t); typedef int (*vop_rwlock_t)(bhv_desc_t *, bhv_vrwlock_t);
typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t); typedef void (*vop_rwunlock_t)(bhv_desc_t *, bhv_vrwlock_t);
typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int,
struct xfs_iomap *, int *); struct xfs_iomap *, int *);
typedef int (*vop_reclaim_t)(bhv_desc_t *); typedef int (*vop_reclaim_t)(bhv_desc_t *);
...@@ -194,7 +194,7 @@ typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *, ...@@ -194,7 +194,7 @@ typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *,
typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int,
struct attrlist_cursor_kern *, struct cred *); struct attrlist_cursor_kern *, struct cred *);
typedef void (*vop_link_removed_t)(bhv_desc_t *, bhv_vnode_t *, int); typedef void (*vop_link_removed_t)(bhv_desc_t *, bhv_vnode_t *, int);
typedef void (*vop_vnode_change_t)(bhv_desc_t *, vchange_t, __psint_t); typedef void (*vop_vnode_change_t)(bhv_desc_t *, bhv_vchange_t, __psint_t);
typedef void (*vop_ptossvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); typedef void (*vop_ptossvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
typedef void (*vop_pflushinvalvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); typedef void (*vop_pflushinvalvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
typedef int (*vop_pflushvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, typedef int (*vop_pflushvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t,
...@@ -346,7 +346,7 @@ typedef struct bhv_vnodeops { ...@@ -346,7 +346,7 @@ typedef struct bhv_vnodeops {
* Vnode attributes. va_mask indicates those attributes the caller * Vnode attributes. va_mask indicates those attributes the caller
* wants to set or extract. * wants to set or extract.
*/ */
typedef struct vattr { typedef struct bhv_vattr {
int va_mask; /* bit-mask of attributes present */ int va_mask; /* bit-mask of attributes present */
mode_t va_mode; /* file access mode and type */ mode_t va_mode; /* file access mode and type */
xfs_nlink_t va_nlink; /* number of references to file */ xfs_nlink_t va_nlink; /* number of references to file */
...@@ -366,7 +366,7 @@ typedef struct vattr { ...@@ -366,7 +366,7 @@ typedef struct vattr {
u_long va_nextents; /* number of extents in file */ u_long va_nextents; /* number of extents in file */
u_long va_anextents; /* number of attr extents in file */ u_long va_anextents; /* number of attr extents in file */
prid_t va_projid; /* project id */ prid_t va_projid; /* project id */
} vattr_t; } bhv_vattr_t;
/* /*
* setattr or getattr attributes * setattr or getattr attributes
...@@ -442,8 +442,8 @@ typedef struct vattr { ...@@ -442,8 +442,8 @@ typedef struct vattr {
extern void vn_init(void); extern void vn_init(void);
extern bhv_vnode_t *vn_initialize(struct inode *); extern bhv_vnode_t *vn_initialize(struct inode *);
extern int vn_revalidate(struct bhv_vnode *); extern int vn_revalidate(struct bhv_vnode *);
extern int __vn_revalidate(struct bhv_vnode *, vattr_t *); extern int __vn_revalidate(struct bhv_vnode *, bhv_vattr_t *);
extern void vn_revalidate_core(struct bhv_vnode *, vattr_t *); extern void vn_revalidate_core(struct bhv_vnode *, bhv_vattr_t *);
extern void vn_iowait(struct bhv_vnode *vp); extern void vn_iowait(struct bhv_vnode *vp);
extern void vn_iowake(struct bhv_vnode *vp); extern void vn_iowake(struct bhv_vnode *vp);
......
...@@ -191,7 +191,7 @@ xfs_qm_mount( ...@@ -191,7 +191,7 @@ xfs_qm_mount(
STATIC int STATIC int
xfs_qm_statvfs( xfs_qm_statvfs(
struct bhv_desc *bhv, struct bhv_desc *bhv,
xfs_statfs_t *statp, bhv_statvfs_t *statp,
struct bhv_vnode *vnode) struct bhv_vnode *vnode)
{ {
xfs_mount_t *mp; xfs_mount_t *mp;
......
...@@ -241,7 +241,7 @@ xfs_acl_vget( ...@@ -241,7 +241,7 @@ xfs_acl_vget(
goto out; goto out;
} }
if (kind == _ACL_TYPE_ACCESS) { if (kind == _ACL_TYPE_ACCESS) {
vattr_t va; bhv_vattr_t va;
va.va_mask = XFS_AT_MODE; va.va_mask = XFS_AT_MODE;
error = bhv_vop_getattr(vp, &va, 0, sys_cred); error = bhv_vop_getattr(vp, &va, 0, sys_cred);
...@@ -373,7 +373,7 @@ xfs_acl_allow_set( ...@@ -373,7 +373,7 @@ xfs_acl_allow_set(
bhv_vnode_t *vp, bhv_vnode_t *vp,
int kind) int kind)
{ {
vattr_t va; bhv_vattr_t va;
int error; int error;
if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND)) if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND))
...@@ -666,7 +666,7 @@ xfs_acl_vtoacl( ...@@ -666,7 +666,7 @@ xfs_acl_vtoacl(
xfs_acl_t *access_acl, xfs_acl_t *access_acl,
xfs_acl_t *default_acl) xfs_acl_t *default_acl)
{ {
vattr_t va; bhv_vattr_t va;
int error = 0; int error = 0;
if (access_acl) { if (access_acl) {
...@@ -702,7 +702,7 @@ xfs_acl_vtoacl( ...@@ -702,7 +702,7 @@ xfs_acl_vtoacl(
int int
xfs_acl_inherit( xfs_acl_inherit(
bhv_vnode_t *vp, bhv_vnode_t *vp,
vattr_t *vap, bhv_vattr_t *vap,
xfs_acl_t *pdaclp) xfs_acl_t *pdaclp)
{ {
xfs_acl_t *cacl; xfs_acl_t *cacl;
...@@ -761,7 +761,7 @@ xfs_acl_setmode( ...@@ -761,7 +761,7 @@ xfs_acl_setmode(
xfs_acl_t *acl, xfs_acl_t *acl,
int *basicperms) int *basicperms)
{ {
vattr_t va; bhv_vattr_t va;
xfs_acl_entry_t *ap; xfs_acl_entry_t *ap;
xfs_acl_entry_t *gap = NULL; xfs_acl_entry_t *gap = NULL;
int i, error, nomask = 1; int i, error, nomask = 1;
......
...@@ -58,7 +58,7 @@ extern struct kmem_zone *xfs_acl_zone; ...@@ -58,7 +58,7 @@ extern struct kmem_zone *xfs_acl_zone;
(zone) = kmem_zone_init(sizeof(xfs_acl_t), (name)) (zone) = kmem_zone_init(sizeof(xfs_acl_t), (name))
#define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone) #define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone)
extern int xfs_acl_inherit(struct bhv_vnode *, struct vattr *, xfs_acl_t *); extern int xfs_acl_inherit(struct bhv_vnode *, struct bhv_vattr *, xfs_acl_t *);
extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *); extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *);
extern int xfs_acl_vtoacl(struct bhv_vnode *, xfs_acl_t *, xfs_acl_t *); extern int xfs_acl_vtoacl(struct bhv_vnode *, xfs_acl_t *, xfs_acl_t *);
extern int xfs_acl_vhasacl_access(struct bhv_vnode *); extern int xfs_acl_vhasacl_access(struct bhv_vnode *);
......
...@@ -81,7 +81,7 @@ extern struct bhv_vnodeops xfs_vnodeops; ...@@ -81,7 +81,7 @@ extern struct bhv_vnodeops xfs_vnodeops;
*/ */
typedef int (*xfs_send_data_t)(int, struct bhv_vnode *, typedef int (*xfs_send_data_t)(int, struct bhv_vnode *,
xfs_off_t, size_t, int, vrwlock_t *); xfs_off_t, size_t, int, bhv_vrwlock_t *);
typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
typedef int (*xfs_send_destroy_t)(struct bhv_vnode *, dm_right_t); typedef int (*xfs_send_destroy_t)(struct bhv_vnode *, dm_right_t);
typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *,
......
...@@ -87,8 +87,8 @@ STATIC int ...@@ -87,8 +87,8 @@ STATIC int
xfs_lock_for_rename( xfs_lock_for_rename(
xfs_inode_t *dp1, /* old (source) directory inode */ xfs_inode_t *dp1, /* old (source) directory inode */
xfs_inode_t *dp2, /* new (target) directory inode */ xfs_inode_t *dp2, /* new (target) directory inode */
vname_t *vname1,/* old entry name */ bhv_vname_t *vname1,/* old entry name */
vname_t *vname2,/* new entry name */ bhv_vname_t *vname2,/* new entry name */
xfs_inode_t **ipp1, /* inode of old entry */ xfs_inode_t **ipp1, /* inode of old entry */
xfs_inode_t **ipp2, /* inode of new entry, if it xfs_inode_t **ipp2, /* inode of new entry, if it
already exists, NULL otherwise. */ already exists, NULL otherwise. */
...@@ -225,9 +225,9 @@ xfs_lock_for_rename( ...@@ -225,9 +225,9 @@ xfs_lock_for_rename(
int int
xfs_rename( xfs_rename(
bhv_desc_t *src_dir_bdp, bhv_desc_t *src_dir_bdp,
vname_t *src_vname, bhv_vname_t *src_vname,
bhv_vnode_t *target_dir_vp, bhv_vnode_t *target_dir_vp,
vname_t *target_vname, bhv_vname_t *target_vname,
cred_t *credp) cred_t *credp)
{ {
xfs_trans_t *tp; xfs_trans_t *tp;
......
...@@ -87,9 +87,10 @@ extern void xfs_ioerror_alert(char *func, struct xfs_mount *mp, ...@@ -87,9 +87,10 @@ extern void xfs_ioerror_alert(char *func, struct xfs_mount *mp,
/* /*
* Prototypes for functions in xfs_vnodeops.c. * Prototypes for functions in xfs_vnodeops.c.
*/ */
extern int xfs_rwlock(bhv_desc_t *bdp, vrwlock_t write_lock); extern int xfs_rwlock(bhv_desc_t *bdp, bhv_vrwlock_t write_lock);
extern void xfs_rwunlock(bhv_desc_t *bdp, vrwlock_t write_lock); extern void xfs_rwunlock(bhv_desc_t *bdp, bhv_vrwlock_t write_lock);
extern int xfs_setattr(bhv_desc_t *bdp, vattr_t *vap, int flags, cred_t *credp); extern int xfs_setattr(bhv_desc_t *, bhv_vattr_t *vap, int flags,
cred_t *credp);
extern int xfs_change_file_space(bhv_desc_t *bdp, int cmd, xfs_flock64_t *bf, extern int xfs_change_file_space(bhv_desc_t *bdp, int cmd, xfs_flock64_t *bf,
xfs_off_t offset, cred_t *credp, int flags); xfs_off_t offset, cred_t *credp, int flags);
extern int xfs_set_dmattrs(bhv_desc_t *bdp, u_int evmask, u_int16_t state, extern int xfs_set_dmattrs(bhv_desc_t *bdp, u_int evmask, u_int16_t state,
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
*/ */
int int
xfs_get_dir_entry( xfs_get_dir_entry(
vname_t *dentry, bhv_vname_t *dentry,
xfs_inode_t **ipp) xfs_inode_t **ipp)
{ {
bhv_vnode_t *vp; bhv_vnode_t *vp;
...@@ -69,7 +69,7 @@ int ...@@ -69,7 +69,7 @@ int
xfs_dir_lookup_int( xfs_dir_lookup_int(
bhv_desc_t *dir_bdp, bhv_desc_t *dir_bdp,
uint lock_mode, uint lock_mode,
vname_t *dentry, bhv_vname_t *dentry,
xfs_ino_t *inum, xfs_ino_t *inum,
xfs_inode_t **ipp) xfs_inode_t **ipp)
{ {
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
#define ITRACE(ip) vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \ #define ITRACE(ip) vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \
(inst_t *)__return_address) (inst_t *)__return_address)
extern int xfs_rename (bhv_desc_t *, vname_t *, bhv_vnode_t *, extern int xfs_rename (bhv_desc_t *, bhv_vname_t *, bhv_vnode_t *,
vname_t *, cred_t *); bhv_vname_t *, cred_t *);
extern int xfs_get_dir_entry (vname_t *, xfs_inode_t **); extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **);
extern int xfs_dir_lookup_int (bhv_desc_t *, uint, vname_t *, xfs_ino_t *, extern int xfs_dir_lookup_int (bhv_desc_t *, uint, bhv_vname_t *, xfs_ino_t *,
xfs_inode_t **); xfs_inode_t **);
extern int xfs_truncate_file (xfs_mount_t *, xfs_inode_t *); extern int xfs_truncate_file (xfs_mount_t *, xfs_inode_t *);
extern int xfs_dir_ialloc (xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t, extern int xfs_dir_ialloc (xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t,
......
...@@ -800,7 +800,7 @@ xfs_root( ...@@ -800,7 +800,7 @@ xfs_root(
STATIC int STATIC int
xfs_statvfs( xfs_statvfs(
bhv_desc_t *bdp, bhv_desc_t *bdp,
xfs_statfs_t *statp, bhv_statvfs_t *statp,
bhv_vnode_t *vp) bhv_vnode_t *vp)
{ {
__uint64_t fakeinos; __uint64_t fakeinos;
......
...@@ -117,7 +117,7 @@ xfs_close( ...@@ -117,7 +117,7 @@ xfs_close(
STATIC int STATIC int
xfs_getattr( xfs_getattr(
bhv_desc_t *bdp, bhv_desc_t *bdp,
vattr_t *vap, bhv_vattr_t *vap,
int flags, int flags,
cred_t *credp) cred_t *credp)
{ {
...@@ -250,7 +250,7 @@ xfs_getattr( ...@@ -250,7 +250,7 @@ xfs_getattr(
int int
xfs_setattr( xfs_setattr(
bhv_desc_t *bdp, bhv_desc_t *bdp,
vattr_t *vap, bhv_vattr_t *vap,
int flags, int flags,
cred_t *credp) cred_t *credp)
{ {
...@@ -1815,7 +1815,7 @@ xfs_inactive( ...@@ -1815,7 +1815,7 @@ xfs_inactive(
STATIC int STATIC int
xfs_lookup( xfs_lookup(
bhv_desc_t *dir_bdp, bhv_desc_t *dir_bdp,
vname_t *dentry, bhv_vname_t *dentry,
bhv_vnode_t **vpp, bhv_vnode_t **vpp,
int flags, int flags,
bhv_vnode_t *rdir, bhv_vnode_t *rdir,
...@@ -1852,8 +1852,8 @@ xfs_lookup( ...@@ -1852,8 +1852,8 @@ xfs_lookup(
STATIC int STATIC int
xfs_create( xfs_create(
bhv_desc_t *dir_bdp, bhv_desc_t *dir_bdp,
vname_t *dentry, bhv_vname_t *dentry,
vattr_t *vap, bhv_vattr_t *vap,
bhv_vnode_t **vpp, bhv_vnode_t **vpp,
cred_t *credp) cred_t *credp)
{ {
...@@ -2127,7 +2127,7 @@ int xfs_rm_attempts; ...@@ -2127,7 +2127,7 @@ int xfs_rm_attempts;
STATIC int STATIC int
xfs_lock_dir_and_entry( xfs_lock_dir_and_entry(
xfs_inode_t *dp, xfs_inode_t *dp,
vname_t *dentry, bhv_vname_t *dentry,
xfs_inode_t *ip) /* inode of entry 'name' */ xfs_inode_t *ip) /* inode of entry 'name' */
{ {
int attempts; int attempts;
...@@ -2341,7 +2341,7 @@ int remove_which_error_return = 0; ...@@ -2341,7 +2341,7 @@ int remove_which_error_return = 0;
STATIC int STATIC int
xfs_remove( xfs_remove(
bhv_desc_t *dir_bdp, bhv_desc_t *dir_bdp,
vname_t *dentry, bhv_vname_t *dentry,
cred_t *credp) cred_t *credp)
{ {
bhv_vnode_t *dir_vp; bhv_vnode_t *dir_vp;
...@@ -2585,7 +2585,7 @@ STATIC int ...@@ -2585,7 +2585,7 @@ STATIC int
xfs_link( xfs_link(
bhv_desc_t *target_dir_bdp, bhv_desc_t *target_dir_bdp,
bhv_vnode_t *src_vp, bhv_vnode_t *src_vp,
vname_t *dentry, bhv_vname_t *dentry,
cred_t *credp) cred_t *credp)
{ {
xfs_inode_t *tdp, *sip; xfs_inode_t *tdp, *sip;
...@@ -2754,8 +2754,8 @@ xfs_link( ...@@ -2754,8 +2754,8 @@ xfs_link(
STATIC int STATIC int
xfs_mkdir( xfs_mkdir(
bhv_desc_t *dir_bdp, bhv_desc_t *dir_bdp,
vname_t *dentry, bhv_vname_t *dentry,
vattr_t *vap, bhv_vattr_t *vap,
bhv_vnode_t **vpp, bhv_vnode_t **vpp,
cred_t *credp) cred_t *credp)
{ {
...@@ -2989,7 +2989,7 @@ xfs_mkdir( ...@@ -2989,7 +2989,7 @@ xfs_mkdir(
STATIC int STATIC int
xfs_rmdir( xfs_rmdir(
bhv_desc_t *dir_bdp, bhv_desc_t *dir_bdp,
vname_t *dentry, bhv_vname_t *dentry,
cred_t *credp) cred_t *credp)
{ {
char *name = VNAME(dentry); char *name = VNAME(dentry);
...@@ -3268,8 +3268,8 @@ xfs_readdir( ...@@ -3268,8 +3268,8 @@ xfs_readdir(
STATIC int STATIC int
xfs_symlink( xfs_symlink(
bhv_desc_t *dir_bdp, bhv_desc_t *dir_bdp,
vname_t *dentry, bhv_vname_t *dentry,
vattr_t *vap, bhv_vattr_t *vap,
char *target_path, char *target_path,
bhv_vnode_t **vpp, bhv_vnode_t **vpp,
cred_t *credp) cred_t *credp)
...@@ -3626,7 +3626,7 @@ xfs_fid2( ...@@ -3626,7 +3626,7 @@ xfs_fid2(
int int
xfs_rwlock( xfs_rwlock(
bhv_desc_t *bdp, bhv_desc_t *bdp,
vrwlock_t locktype) bhv_vrwlock_t locktype)
{ {
xfs_inode_t *ip; xfs_inode_t *ip;
bhv_vnode_t *vp; bhv_vnode_t *vp;
...@@ -3657,7 +3657,7 @@ xfs_rwlock( ...@@ -3657,7 +3657,7 @@ xfs_rwlock(
void void
xfs_rwunlock( xfs_rwunlock(
bhv_desc_t *bdp, bhv_desc_t *bdp,
vrwlock_t locktype) bhv_vrwlock_t locktype)
{ {
xfs_inode_t *ip; xfs_inode_t *ip;
bhv_vnode_t *vp; bhv_vnode_t *vp;
...@@ -4502,7 +4502,7 @@ xfs_change_file_space( ...@@ -4502,7 +4502,7 @@ xfs_change_file_space(
xfs_off_t startoffset; xfs_off_t startoffset;
xfs_off_t llen; xfs_off_t llen;
xfs_trans_t *tp; xfs_trans_t *tp;
vattr_t va; bhv_vattr_t va;
bhv_vnode_t *vp; bhv_vnode_t *vp;
vp = BHV_TO_VNODE(bdp); vp = BHV_TO_VNODE(bdp);
......
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