diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-28 21:44:37 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-15 21:37:29 -0400 |
commit | b3aea4edc2903fdee34920630b8b2433f6452f02 (patch) | |
tree | 9d9e93c4dac6dc5a30522e0c2ae051e3aad46b1b /fs/xfs/linux-2.6/xfs_vnode.h | |
parent | 2f6f7b3d9b5600e1f6e7622c62ab30f36bd0f57f (diff) |
[XFS] kill the v_flag member in struct bhv_vnode
All flags previously handled at the vnode level are not in the xfs_inode
where we already have a flags mechanisms and free bits for flags
previously in the vnode.
SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29495a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 0f9ba6585c86..c8af208a73dc 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -27,20 +27,8 @@ struct attrlist_cursor_kern; | |||
27 | typedef struct dentry bhv_vname_t; | 27 | typedef struct dentry bhv_vname_t; |
28 | typedef __u64 bhv_vnumber_t; | 28 | typedef __u64 bhv_vnumber_t; |
29 | 29 | ||
30 | typedef enum bhv_vflags { | ||
31 | VMODIFIED = 0x08, /* XFS inode state possibly differs */ | ||
32 | /* to the Linux inode state. */ | ||
33 | VTRUNCATED = 0x40, /* truncated down so flush-on-close */ | ||
34 | } bhv_vflags_t; | ||
35 | |||
36 | /* | ||
37 | * MP locking protocols: | ||
38 | * v_flag, VN_LOCK/VN_UNLOCK | ||
39 | */ | ||
40 | typedef struct bhv_vnode { | 30 | typedef struct bhv_vnode { |
41 | bhv_vflags_t v_flag; /* vnode flags (see above) */ | ||
42 | bhv_vnumber_t v_number; /* in-core vnode number */ | 31 | bhv_vnumber_t v_number; /* in-core vnode number */ |
43 | spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ | ||
44 | atomic_t v_iocount; /* outstanding I/O count */ | 32 | atomic_t v_iocount; /* outstanding I/O count */ |
45 | #ifdef XFS_VNODE_TRACE | 33 | #ifdef XFS_VNODE_TRACE |
46 | struct ktrace *v_trace; /* trace header structure */ | 34 | struct ktrace *v_trace; /* trace header structure */ |
@@ -255,35 +243,6 @@ static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp) | |||
255 | #define VNAME_TO_VNODE(dentry) (vn_from_inode((dentry)->d_inode)) | 243 | #define VNAME_TO_VNODE(dentry) (vn_from_inode((dentry)->d_inode)) |
256 | 244 | ||
257 | /* | 245 | /* |
258 | * Vnode spinlock manipulation. | ||
259 | */ | ||
260 | #define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock) | ||
261 | #define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s) | ||
262 | |||
263 | STATIC_INLINE void vn_flagset(struct bhv_vnode *vp, uint flag) | ||
264 | { | ||
265 | spin_lock(&vp->v_lock); | ||
266 | vp->v_flag |= flag; | ||
267 | spin_unlock(&vp->v_lock); | ||
268 | } | ||
269 | |||
270 | STATIC_INLINE uint vn_flagclr(struct bhv_vnode *vp, uint flag) | ||
271 | { | ||
272 | uint cleared; | ||
273 | |||
274 | spin_lock(&vp->v_lock); | ||
275 | cleared = (vp->v_flag & flag); | ||
276 | vp->v_flag &= ~flag; | ||
277 | spin_unlock(&vp->v_lock); | ||
278 | return cleared; | ||
279 | } | ||
280 | |||
281 | #define VMODIFY(vp) vn_flagset(vp, VMODIFIED) | ||
282 | #define VUNMODIFY(vp) vn_flagclr(vp, VMODIFIED) | ||
283 | #define VTRUNCATE(vp) vn_flagset(vp, VTRUNCATED) | ||
284 | #define VUNTRUNCATE(vp) vn_flagclr(vp, VTRUNCATED) | ||
285 | |||
286 | /* | ||
287 | * Dealing with bad inodes | 246 | * Dealing with bad inodes |
288 | */ | 247 | */ |
289 | static inline void vn_mark_bad(struct bhv_vnode *vp) | 248 | static inline void vn_mark_bad(struct bhv_vnode *vp) |
@@ -322,7 +281,6 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) | |||
322 | #define VN_CACHED(vp) (vn_to_inode(vp)->i_mapping->nrpages) | 281 | #define VN_CACHED(vp) (vn_to_inode(vp)->i_mapping->nrpages) |
323 | #define VN_DIRTY(vp) mapping_tagged(vn_to_inode(vp)->i_mapping, \ | 282 | #define VN_DIRTY(vp) mapping_tagged(vn_to_inode(vp)->i_mapping, \ |
324 | PAGECACHE_TAG_DIRTY) | 283 | PAGECACHE_TAG_DIRTY) |
325 | #define VN_TRUNC(vp) ((vp)->v_flag & VTRUNCATED) | ||
326 | 284 | ||
327 | /* | 285 | /* |
328 | * Flags to vop_setattr/getattr. | 286 | * Flags to vop_setattr/getattr. |