Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70844
b: refs/heads/master
c: 0a74cd1
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Tim Shimmin committed Oct 16, 2007
1 parent 8fcb091 commit dded1a1
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 74 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2aeaa258c0527026228c43148ec6dffdc56bea1c
refs/heads/master: 0a74cd1964501fdb577176f14ed3d02b8e148127
7 changes: 3 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ xfs_synchronize_atime(

vp = XFS_ITOV_NULL(ip);
if (vp) {
struct inode *inode = &vp->v_inode;
ip->i_d.di_atime.t_sec = (__int32_t)inode->i_atime.tv_sec;
ip->i_d.di_atime.t_nsec = (__int32_t)inode->i_atime.tv_nsec;
ip->i_d.di_atime.t_sec = (__int32_t)vp->i_atime.tv_sec;
ip->i_d.di_atime.t_nsec = (__int32_t)vp->i_atime.tv_nsec;
}
}

Expand Down Expand Up @@ -327,7 +326,7 @@ xfs_vn_mknod(
if (!error) {
error = _ACL_INHERIT(vp, &vattr, default_acl);
if (!error)
xfs_iflags_set(XFS_I(&vp->v_inode), XFS_IMODIFIED);
xfs_iflags_set(XFS_I(vp), XFS_IMODIFIED);
else
xfs_cleanup_inode(dir, vp, dentry, mode);
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/xfs/linux-2.6/xfs_lrw.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#define __XFS_LRW_H__

struct bhv_desc;
struct bhv_vnode;
struct xfs_mount;
struct xfs_iocore;
struct xfs_inode;
Expand Down Expand Up @@ -75,7 +74,7 @@ extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *);
extern int xfs_bdstrat_cb(struct xfs_buf *);
extern int xfs_dev_is_read_only(struct xfs_mount *, char *);

extern int xfs_zero_eof(struct bhv_vnode *, struct xfs_iocore *, xfs_off_t,
extern int xfs_zero_eof(struct inode *, struct xfs_iocore *, xfs_off_t,
xfs_fsize_t);

#endif /* __XFS_LRW_H__ */
2 changes: 1 addition & 1 deletion trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ xfs_fs_fill_super(
void *data,
int silent)
{
struct bhv_vnode *rootvp;
struct inode *rootvp;
struct bhv_vfs *vfsp = vfs_allocate(sb);
struct xfs_mount_args *args = xfs_args_allocate(sb, silent);
struct kstatfs statvfs;
Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ vfs_mntupdate(
int
vfs_root(
struct bhv_desc *bdp,
struct bhv_vnode **vpp)
bhv_vnode_t **vpp)
{
struct bhv_desc *next = bdp;

Expand All @@ -117,7 +117,7 @@ int
vfs_statvfs(
struct bhv_desc *bdp,
bhv_statvfs_t *statp,
struct bhv_vnode *vp)
bhv_vnode_t *vp)
{
struct bhv_desc *next = bdp;

Expand All @@ -144,7 +144,7 @@ vfs_sync(
int
vfs_vget(
struct bhv_desc *bdp,
struct bhv_vnode **vpp,
bhv_vnode_t **vpp,
struct fid *fidp)
{
struct bhv_desc *next = bdp;
Expand Down Expand Up @@ -186,7 +186,7 @@ vfs_quotactl(
void
vfs_init_vnode(
struct bhv_desc *bdp,
struct bhv_vnode *vp,
bhv_vnode_t *vp,
struct xfs_inode *ip,
int unlock)
{
Expand Down
18 changes: 9 additions & 9 deletions trunk/fs/xfs/linux-2.6/xfs_vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "xfs_fs.h"

struct bhv_vfs;
struct bhv_vnode;
struct inode;

struct fid;
struct cred;
Expand Down Expand Up @@ -124,15 +124,15 @@ typedef int (*vfs_showargs_t)(bhv_desc_t *, struct seq_file *);
typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *);
typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *,
struct xfs_mount_args *);
typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **);
typedef int (*vfs_root_t)(bhv_desc_t *, struct inode **);
typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *,
struct bhv_vnode *);
struct inode *);
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 inode **, struct fid *);
typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t);
typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t);
typedef void (*vfs_init_vnode_t)(bhv_desc_t *,
struct bhv_vnode *, struct xfs_inode *, int);
struct inode *, struct xfs_inode *, int);
typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int);
typedef void (*vfs_freeze_t)(bhv_desc_t *);

Expand Down Expand Up @@ -196,13 +196,13 @@ extern int vfs_parseargs(bhv_desc_t *, char *, struct xfs_mount_args *, int);
extern int vfs_showargs(bhv_desc_t *, struct seq_file *);
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_root(bhv_desc_t *, struct bhv_vnode **);
extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct bhv_vnode *);
extern int vfs_root(bhv_desc_t *, struct inode **);
extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *);
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 inode **, struct fid *);
extern int vfs_dmapiops(bhv_desc_t *, caddr_t);
extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t);
extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, struct xfs_inode *, int);
extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int);
extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int);
extern void vfs_freeze(bhv_desc_t *);

Expand Down
48 changes: 22 additions & 26 deletions trunk/fs/xfs/linux-2.6/xfs_vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,24 @@ struct attrlist_cursor_kern;

typedef struct dentry bhv_vname_t;
typedef __u64 bhv_vnumber_t;
typedef struct inode bhv_vnode_t;

typedef struct bhv_vnode {
struct inode v_inode; /* Linux inode */
/* inode MUST be last */
} bhv_vnode_t;

#define VN_ISLNK(vp) S_ISLNK((vp)->v_inode.i_mode)
#define VN_ISREG(vp) S_ISREG((vp)->v_inode.i_mode)
#define VN_ISDIR(vp) S_ISDIR((vp)->v_inode.i_mode)
#define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode)
#define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode)
#define VN_ISLNK(vp) S_ISLNK((vp)->i_mode)
#define VN_ISREG(vp) S_ISREG((vp)->i_mode)
#define VN_ISDIR(vp) S_ISDIR((vp)->i_mode)
#define VN_ISCHR(vp) S_ISCHR((vp)->i_mode)
#define VN_ISBLK(vp) S_ISBLK((vp)->i_mode)

/*
* Vnode to Linux inode mapping.
*/
static inline struct bhv_vnode *vn_from_inode(struct inode *inode)
static inline bhv_vnode_t *vn_from_inode(struct inode *inode)
{
return container_of(inode, bhv_vnode_t, v_inode);
return inode;
}
static inline struct inode *vn_to_inode(struct bhv_vnode *vnode)
static inline struct inode *vn_to_inode(bhv_vnode_t *vnode)
{
return &vnode->v_inode;
return vnode;
}

/*
Expand Down Expand Up @@ -193,9 +189,9 @@ typedef struct bhv_vattr {

extern void vn_init(void);
extern bhv_vnode_t *vn_initialize(struct inode *);
extern int vn_revalidate(struct bhv_vnode *);
extern int __vn_revalidate(struct bhv_vnode *, bhv_vattr_t *);
extern void vn_revalidate_core(struct bhv_vnode *, bhv_vattr_t *);
extern int vn_revalidate(bhv_vnode_t *);
extern int __vn_revalidate(bhv_vnode_t *, bhv_vattr_t *);
extern void vn_revalidate_core(bhv_vnode_t *, bhv_vattr_t *);

/*
* Yeah, these don't take vnode anymore at all, all this should be
Expand All @@ -205,15 +201,15 @@ extern void vn_iowait(struct xfs_inode *ip);
extern void vn_iowake(struct xfs_inode *ip);
extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);

static inline int vn_count(struct bhv_vnode *vp)
static inline int vn_count(bhv_vnode_t *vp)
{
return atomic_read(&vn_to_inode(vp)->i_count);
}

/*
* Vnode reference counting functions (and macros for compatibility).
*/
extern bhv_vnode_t *vn_hold(struct bhv_vnode *);
extern bhv_vnode_t *vn_hold(bhv_vnode_t *);

#if defined(XFS_VNODE_TRACE)
#define VN_HOLD(vp) \
Expand All @@ -227,7 +223,7 @@ extern bhv_vnode_t *vn_hold(struct bhv_vnode *);
#define VN_RELE(vp) (iput(vn_to_inode(vp)))
#endif

static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp)
static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp)
{
struct inode *inode = igrab(vn_to_inode(vp));
return inode ? vn_from_inode(inode) : NULL;
Expand All @@ -243,12 +239,12 @@ static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp)
/*
* Dealing with bad inodes
*/
static inline void vn_mark_bad(struct bhv_vnode *vp)
static inline void vn_mark_bad(bhv_vnode_t *vp)
{
make_bad_inode(vn_to_inode(vp));
}

static inline int VN_BAD(struct bhv_vnode *vp)
static inline int VN_BAD(bhv_vnode_t *vp)
{
return is_bad_inode(vn_to_inode(vp));
}
Expand All @@ -258,18 +254,18 @@ static inline int VN_BAD(struct bhv_vnode *vp)
*/
static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime)
{
bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec;
bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec;
bs_atime->tv_sec = vp->i_atime.tv_sec;
bs_atime->tv_nsec = vp->i_atime.tv_nsec;
}

static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts)
{
*ts = vp->v_inode.i_atime;
*ts = vp->i_atime;
}

static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
{
*tt = vp->v_inode.i_atime.tv_sec;
*tt = vp->i_atime.tv_sec;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/quota/xfs_qm_bhv.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ STATIC int
xfs_qm_statvfs(
struct bhv_desc *bhv,
bhv_statvfs_t *statp,
struct bhv_vnode *vnode)
bhv_vnode_t *vnode)
{
xfs_mount_t *mp;
xfs_inode_t *ip;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/xfs_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ xfs_acl_allow_set(
bhv_vattr_t va;
int error;

if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND))
if (vp->i_flags & (S_IMMUTABLE|S_APPEND))
return EPERM;
if (kind == _ACL_TYPE_DEFAULT && !VN_ISDIR(vp))
return ENOTDIR;
if (vp->v_inode.i_sb->s_flags & MS_RDONLY)
if (vp->i_sb->s_flags & MS_RDONLY)
return EROFS;
va.va_mask = XFS_AT_UID;
error = xfs_getattr(ip, &va, 0);
Expand Down
15 changes: 7 additions & 8 deletions trunk/fs/xfs/xfs_acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,21 @@ typedef struct xfs_acl {
#ifdef CONFIG_XFS_POSIX_ACL

struct vattr;
struct bhv_vnode;
struct xfs_inode;

extern struct kmem_zone *xfs_acl_zone;
#define xfs_acl_zone_init(zone, name) \
(zone) = kmem_zone_init(sizeof(xfs_acl_t), (name))
#define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone)

extern int xfs_acl_inherit(struct bhv_vnode *, struct bhv_vattr *, xfs_acl_t *);
extern int xfs_acl_inherit(bhv_vnode_t *, struct bhv_vattr *, xfs_acl_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_vhasacl_access(struct bhv_vnode *);
extern int xfs_acl_vhasacl_default(struct bhv_vnode *);
extern int xfs_acl_vset(struct bhv_vnode *, void *, size_t, int);
extern int xfs_acl_vget(struct bhv_vnode *, void *, size_t, int);
extern int xfs_acl_vremove(struct bhv_vnode *, int);
extern int xfs_acl_vtoacl(bhv_vnode_t *, xfs_acl_t *, xfs_acl_t *);
extern int xfs_acl_vhasacl_access(bhv_vnode_t *);
extern int xfs_acl_vhasacl_default(bhv_vnode_t *);
extern int xfs_acl_vset(bhv_vnode_t *, void *, size_t, int);
extern int xfs_acl_vget(bhv_vnode_t *, void *, size_t, int);
extern int xfs_acl_vremove(bhv_vnode_t *, int);

#define _ACL_TYPE_ACCESS 1
#define _ACL_TYPE_DEFAULT 2
Expand Down
13 changes: 6 additions & 7 deletions trunk/fs/xfs/xfs_attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@
*========================================================================*/

struct cred;
struct bhv_vnode;
struct xfs_attr_list_context;

typedef int (*attrset_t)(struct bhv_vnode *, char *, void *, size_t, int);
typedef int (*attrget_t)(struct bhv_vnode *, char *, void *, size_t, int);
typedef int (*attrremove_t)(struct bhv_vnode *, char *, int);
typedef int (*attrexists_t)(struct bhv_vnode *);
typedef int (*attrcapable_t)(struct bhv_vnode *, struct cred *);
typedef int (*attrset_t)(bhv_vnode_t *, char *, void *, size_t, int);
typedef int (*attrget_t)(bhv_vnode_t *, char *, void *, size_t, int);
typedef int (*attrremove_t)(bhv_vnode_t *, char *, int);
typedef int (*attrexists_t)(bhv_vnode_t *);
typedef int (*attrcapable_t)(bhv_vnode_t *, struct cred *);

typedef struct attrnames {
char * attr_name;
Expand All @@ -64,7 +63,7 @@ extern struct attrnames attr_trusted;
extern struct attrnames *attr_namespaces[ATTR_NAMECOUNT];

extern attrnames_t *attr_lookup_namespace(char *, attrnames_t **, int);
extern int attr_generic_list(struct bhv_vnode *, void *, size_t, int, ssize_t *);
extern int attr_generic_list(bhv_vnode_t *, void *, size_t, int, ssize_t *);

#define ATTR_DONTFOLLOW 0x0001 /* -- unused, from IRIX -- */
#define ATTR_ROOT 0x0002 /* use attrs in root (trusted) namespace */
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/xfs/xfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ typedef struct xfs_ifork {

#ifdef __KERNEL__
struct bhv_desc;
struct bhv_vnode;
struct cred;
struct ktrace;
struct xfs_buf;
Expand Down Expand Up @@ -257,7 +256,7 @@ typedef struct xfs_inode {
struct xfs_inode *i_mprev; /* ptr to prev inode */
struct xfs_mount *i_mount; /* fs mount struct ptr */
struct list_head i_reclaim; /* reclaim list */
struct bhv_vnode *i_vnode; /* vnode backpointer */
bhv_vnode_t *i_vnode; /* vnode backpointer */
struct xfs_dquot *i_udquot; /* user dquot */
struct xfs_dquot *i_gdquot; /* group dquot */

Expand Down Expand Up @@ -509,7 +508,7 @@ void xfs_ihash_init(struct xfs_mount *);
void xfs_ihash_free(struct xfs_mount *);
xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t,
struct xfs_trans *);
void xfs_inode_lock_init(xfs_inode_t *, struct bhv_vnode *);
void xfs_inode_lock_init(xfs_inode_t *, bhv_vnode_t *);
int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
uint, uint, xfs_inode_t **, xfs_daddr_t);
void xfs_iput(xfs_inode_t *, uint);
Expand Down
11 changes: 5 additions & 6 deletions trunk/fs/xfs/xfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ typedef struct xfs_trans_reservations {
struct cred;
struct log;
struct bhv_vfs;
struct bhv_vnode;
struct xfs_mount_args;
struct xfs_inode;
struct xfs_iocore;
Expand All @@ -78,15 +77,15 @@ extern struct bhv_vfsops xfs_vfsops;
* Prototypes and functions for the Data Migration subsystem.
*/

typedef int (*xfs_send_data_t)(int, struct bhv_vnode *,
typedef int (*xfs_send_data_t)(int, bhv_vnode_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_destroy_t)(struct bhv_vnode *, dm_right_t);
typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t);
typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *,
struct bhv_vnode *,
dm_right_t, struct bhv_vnode *, dm_right_t,
bhv_vnode_t *,
dm_right_t, bhv_vnode_t *, dm_right_t,
char *, char *, mode_t, int, int);
typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, struct bhv_vnode *,
typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *,
dm_right_t, mode_t, int, int);

typedef struct xfs_dmops {
Expand Down

0 comments on commit dded1a1

Please sign in to comment.