Lines Matching defs:cnode

55  * Reading or writing any of these fields requires holding cnode lock.
58 struct cnode *ff_cp; /* cnode associated with this fork */
128 * The cnode is used to represent each active (or recently active)
133 struct cnode {
134 lck_rw_t c_rwlock; /* cnode's lock */
135 void * c_lockowner; /* cnode's lock owner (exclusive case only) */
138 LIST_ENTRY(cnode) c_hash; /* cnode's hash chain */
139 u_int32_t c_flag; /* cnode's runtime flags */
140 u_int32_t c_hflag; /* cnode's flags for maintaining hash - protected by global hash lock */
143 struct dquot *c_dquot[MAXQUOTAS]; /* cnode's quota info */
146 struct cat_desc c_desc; /* cnode's descriptor */
147 struct cat_attr c_attr; /* cnode's attributes */
156 struct filefork *c_datafork; /* cnode's data fork */
157 struct filefork *c_rsrcfork; /* cnode's rsrc fork */
169 typedef struct cnode cnode_t;
171 /* Aliases for common cnode fields */
205 /* Runtime cnode flags (kept in c_flag) */
217 #define C_HASXATTRS 0x00200 /* cnode has extended attributes */
222 * purely advisory at the HFS level, and is not maintained after the cnode goes out of core.
231 #define C_RENAMED 0x10000 /* cnode was deleted as part of rename; C_DELETED should also be set */
232 #define C_NEEDS_DATEADDED 0x20000 /* cnode needs date-added written to the finderinfo bit */
233 #define C_BACKINGSTORE 0x40000 /* cnode is a backing store for an existing or currently-mounting filesystem */
234 #define C_SWAPINPROGRESS 0x80000 /* cnode's data is about to be swapped. Issue synchronous cluster io */
247 * Convert between cnode pointers and vnode pointers
249 #define VTOC(vp) ((struct cnode *)vnode_fsnode((vp)))
275 * This is a helper function used for determining whether or not a cnode has become open
276 * unlinked in between the time we acquired its vnode and the time we acquire the cnode lock
278 * use this macro every time we acquire a cnode lock, as the content of the Cnode may have
283 int hfs_checkdeleted(struct cnode *cp);
299 int hfs_file_is_compressed(struct cnode *cp, int skiplock);
301 int hfs_hides_rsrc(vfs_context_t ctx, struct cnode *cp, int skiplock);
302 int hfs_hides_xattr(vfs_context_t ctx, struct cnode *cp, const char *name, int skiplock);
323 #define GNV_SKIPLOCK 0x02 /* Skip taking the cnode lock (when getting resource fork). */
328 #define GNV_CHASH_RENAMED 0x01 /* The cnode was renamed in-flight */
329 #define GNV_CAT_DELETED 0x02 /* The cnode was deleted from the catalog */
330 #define GNV_NEW_CNODE 0x04 /* We are vending out a newly initialized cnode */
333 /* Touch cnode times based on c_touch_xxx flags */
334 extern void hfs_touchtimes(struct hfsmount *, struct cnode *);
336 extern u_int32_t hfs_get_dateadded (struct cnode *cp);
342 * HFS cnode hash functions.
347 extern int hfs_chashremove(struct hfsmount *hfsmp, struct cnode *cp);
348 extern void hfs_chash_abort(struct hfsmount *hfsmp, struct cnode *cp);
349 extern void hfs_chash_rehash(struct hfsmount *hfsmp, struct cnode *cp1, struct cnode *cp2);
350 extern void hfs_chashwakeup(struct hfsmount *hfsmp, struct cnode *cp, int flags);
351 extern void hfs_chash_mark_in_transit(struct hfsmount *hfsmp, struct cnode *cp);
355 extern struct cnode * hfs_chash_getcnode(struct hfsmount *hfsmp, ino_t inum, struct vnode **vpp,
365 * HFS cnode lock functions.
369 * 1. cnode truncate lock (if needed)
370 * 2. cnode lock (in parent-child order if related, otherwise by address order)
381 * I. HFS cnode hash lock (must not acquire any new locks while holding this lock, always taken last)
386 int hfs_lock(struct cnode *, enum hfslocktype);
387 int hfs_lockpair(struct cnode *, struct cnode *, enum hfslocktype);
388 int hfs_lockfour(struct cnode *, struct cnode *, struct cnode *, struct cnode *,
389 enum hfslocktype, struct cnode **);
391 void hfs_unlock(struct cnode *);
392 void hfs_unlockpair(struct cnode *, struct cnode *);
393 void hfs_unlockfour(struct cnode *, struct cnode *, struct cnode *, struct cnode *);
395 void hfs_lock_truncate(struct cnode *, enum hfslocktype);
396 void hfs_unlock_truncate(struct cnode *, int been_recursed);
398 int hfs_try_trunclock(struct cnode *, enum hfslocktype);