From db15fab105799befa4c26f86942a1a0826034456 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 27 Mar 2002 23:37:07 +0000 Subject: [PATCH] sync with recent (minor) kernel changes. --- include/xfs_inode.h | 16 ++++++++-------- libxfs/util.c | 9 ++++----- libxfs/xfs_inode.c | 1 - 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include/xfs_inode.h b/include/xfs_inode.h index 96a470e32..79f541980 100644 --- a/include/xfs_inode.h +++ b/include/xfs_inode.h @@ -146,13 +146,13 @@ typedef struct xfs_iocore { void *io_obj; /* pointer to container * inode or dcxvn structure */ struct xfs_mount *io_mount; /* fs mount struct ptr */ - mrlock_t *io_lock; /* inode lock */ +#ifdef DEBUG + mrlock_t *io_lock; /* inode IO lock */ mrlock_t *io_iolock; /* inode IO lock */ - sema_t *io_flock; /* inode flush lock */ +#endif /* I/O state */ xfs_fsize_t io_new_size; /* sz when write completes */ - int io_queued_bufs; /* count of xfsd queued bufs*/ /* Miscellaneous state. */ unsigned int io_flags; /* IO related flags */ @@ -275,7 +275,6 @@ typedef struct xfs_inode { /* Inode location stuff */ xfs_ino_t i_ino; /* inode number (agno/agino)*/ xfs_daddr_t i_blkno; /* blkno of inode buffer */ - dev_t i_dev; /* dev for this inode */ ushort i_len; /* len of inode buffer */ ushort i_boffset; /* off of inode in buffer */ @@ -289,9 +288,8 @@ typedef struct xfs_inode { mrlock_t i_lock; /* inode lock */ mrlock_t i_iolock; /* inode IO lock */ sema_t i_flock; /* inode flush lock */ - unsigned int i_pincount; /* inode pin count */ - sv_t i_pinsema; /* inode pin sema */ - lock_t i_ipinlock; /* inode pinning mutex */ + atomic_t i_pincount; /* inode pin count */ + wait_queue_head_t i_ipin_wait; /* inode pinning wait queue */ struct xfs_inode **i_refcache; /* ptr to entry in ref cache */ struct xfs_inode *i_release; /* inode to unref */ @@ -550,7 +548,6 @@ void xfs_iext_realloc(xfs_inode_t *, int, int); void xfs_iroot_realloc(xfs_inode_t *, int, int); void xfs_ipin(xfs_inode_t *); void xfs_iunpin(xfs_inode_t *); -unsigned int xfs_ipincount(xfs_inode_t *); int xfs_iextents_copy(xfs_inode_t *, xfs_bmbt_rec_32_t *, int); int xfs_iflush(xfs_inode_t *, uint); int xfs_iflush_all(struct xfs_mount *, int); @@ -562,6 +559,9 @@ xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); xfs_inode_t *xfs_get_inode(dev_t, xfs_ino_t); void xfs_lock_inodes(xfs_inode_t **, int, int, uint); +#define xfs_ipincount(ip) ((unsigned int) atomic_read(&ip->i_pincount)) + + #ifdef DEBUG void xfs_isize_check(struct xfs_mount *, xfs_inode_t *, xfs_fsize_t); diff --git a/libxfs/util.c b/libxfs/util.c index 92ca72ef2..63b5f677a 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -232,15 +232,14 @@ libxfs_ialloc( } void -libxfs_iprint(xfs_inode_t *ip) +libxfs_iprint(xfs_inode_t *ip) { xfs_dinode_core_t *dip; - xfs_bmbt_rec_t *ep; - xfs_extnum_t i; - xfs_extnum_t nextents; + xfs_bmbt_rec_t *ep; + xfs_extnum_t i; + xfs_extnum_t nextents; printf("Inode %lx\n", (unsigned long)ip); - printf(" i_dev %llx\n", (unsigned long long)ip->i_dev); printf(" i_ino %llx\n", (unsigned long long)ip->i_ino); if (ip->i_df.if_flags & XFS_IFEXTENTS) diff --git a/libxfs/xfs_inode.c b/libxfs/xfs_inode.c index d0675dba6..cd3aa9fb7 100644 --- a/libxfs/xfs_inode.c +++ b/libxfs/xfs_inode.c @@ -619,7 +619,6 @@ xfs_iread( ip = kmem_zone_zalloc(xfs_inode_zone, KM_SLEEP); ip->i_ino = ino; - ip->i_dev = mp->m_dev; ip->i_mount = mp; /* -- 2.47.2