Lines Matching refs:cnode

93 /* Used here and in cnode teardown -- for symlinks */
97 static int hfs_move_fork (struct filefork *srcfork, struct cnode *src,
98 struct filefork *dstfork, struct cnode *dst);
143 * Is the given cnode either the .journal or .journal_info_block file on
152 hfs_is_journal_file(struct hfsmount *hfsmp, struct cnode *cp)
216 struct cnode *cp;
242 * hfs_ref_data_vp(): returns the data fork vnode for a given cnode.
251 hfs_ref_data_vp(struct cnode *cp, struct vnode **data_vp, int skiplock)
258 /* maybe we should take the hfs cnode lock here, and if so, use the skiplock parameter to tell us not to */
272 /* no data fork vnode in the cnode, so ask hfs for one. */
298 * hfs_lazy_init_decmpfs_cnode(): returns the decmpfs_cnode for a cnode,
302 hfs_lazy_init_decmpfs_cnode(struct cnode *cp)
308 /* error allocating a decmpfs cnode */
329 hfs_file_is_compressed(struct cnode *cp, int skiplock)
340 /* error allocating a decmpfs cnode, treat the file as uncompressed */
428 hfs_hides_rsrc(vfs_context_t ctx, struct cnode *cp, int skiplock)
438 hfs_hides_xattr(vfs_context_t ctx, struct cnode *cp, const char *name, int skiplock)
459 struct cnode *cp = VTOC(vp);
465 if ( hfs_file_is_compressed(cp, 1) ) { /* 1 == don't take the cnode lock */
468 error = hfs_ref_data_vp(cp, &data_vp, 1); /* 1 == don't take the cnode lock */
482 if (hfs_file_is_compressed(cp, 1) ) { /* 1 == don't take the cnode lock */
582 register struct cnode *cp;
613 // release cnode lock; must acquire truncate lock BEFORE cnode lock
621 // bail out if we can't re-acquire cnode lock
685 struct cnode *cp;
692 /* we need to inspect the decmpfs state of the file before we take the hfs cnode lock */
723 * the cnode lock to access them.
747 * If time attributes are requested and we have cnode times
749 * the cnode before updating the times. Otherwise we can
850 struct cnode *rcp;
885 * without unlocking the cnode first.
978 * because the cnode will only reflect the link that was looked up most recently.
1036 * different than what's currently in the cnode. This is because the cnode
1060 * for the cnode here, so we can't just update the descriptor. Instead,
1096 * the cnode lock, since vnode_put can trigger an inactive call, which
1097 * will go back into HFS and try to acquire a cnode lock.
1116 struct cnode *cp = NULL;
1197 /* Take truncate lock before taking cnode lock. */
1200 /* Perform the ubc_setsize before taking the cnode lock. */
1277 * but we don't want to actually do the update until we've released the cnode lock down below
1355 /* Purge origin cache for cnode, since caller now has correct link ID for it
1366 * we've changed the UF_COMPRESSED flag, so reset the decmpfs state for this cnode
1367 * but don't do it while holding the hfs cnode lock
1392 * cnode must be locked before calling.
1397 register struct cnode *cp = VTOC(vp);
1422 struct cnode *cp = VTOC(vp);
1465 * Perform chown operation on cnode cp;
1477 register struct cnode *cp = VTOC(vp);
1596 * exchanging some of the information in the cnode. It is used
1612 struct cnode *from_cp;
1613 struct cnode *to_cp;
1676 * Take the truncate lock/cnode lock, then verify there are no mmap references.
1678 * Allow the rest of the codeflow to re-acquire the cnode locks in order.
1804 /* Save whether or not each cnode is a hardlink or has EAs */
1808 /* Drop the special bits from each cnode */
1842 * The cnode flags need to stay with the cnode and not get transferred
1887 * Only OR in the "from" flags into our cnode flags below.
1934 int compressed = hfs_file_is_compressed(VTOC(vp), 1); /* 1 == don't take the cnode lock */
1990 struct cnode *from_cp;
1991 struct cnode *to_cp;
2192 static int hfs_move_fork (struct filefork *srcfork, struct cnode *src_cp,
2193 struct filefork *dstfork, struct cnode *dst_cp) {
2231 * Copy the cnode attribute data.
2254 * cnode must be locked
2259 struct cnode *cp = VTOC(vp);
2307 /* Don't hold cnode lock when calling into cluster layer. */
2351 /* Don't hold cnode lock when calling into cluster layer. */
2559 struct cnode *cp = VTOC(vp);
2594 struct cnode *dcp = VTOC(dvp);
2595 struct cnode *cp = VTOC(vp);
2636 struct cnode *cp;
2637 struct cnode *dcp;
2660 * remove cnode from the catalog. Both inactive and reclaim codepaths are capable
2841 struct cnode *dcp = VTOC(dvp);
2842 struct cnode *cp;
2942 * If the cnode was instead marked C_NOEXISTS, then there wouldn't be any
2950 * Drop the truncate lock before unlocking the cnode
2996 * in the cnode and whether or not the resource fork pointer exists or
3004 * Requires cnode and truncate locks to be held.
3011 struct cnode *cp;
3012 struct cnode *dcp;
3045 * Probe the cnode to see if we have a valid resource fork
3120 * no vnode, then we hold the cnode lock which would
3123 * require that a cnode/vnode pair exist.
3184 * until after the cnode lock is dropped. The
3185 * cnode lock cannot be dropped/reacquired here
3362 * 2) cnode's c_rsrcfork ptr must be NULL.
3439 * was a resource fork pointer in the cnode does not mean that it had any blocks.
3476 * to proceed and update the volume header and mark the cnode C_NOEXISTS.
3506 * All done with this cnode's descriptor...
3508 * Note: all future catalog calls for this cnode must be by
3540 replace_desc(struct cnode *cp, struct cat_desc *cdp)
3566 * Rename a cnode.
3583 * data and rsrc forks share the same cnode, we'd eventually try to lock the
3584 * source file's cnode in order to sync its rsrc fork to disk, but it's already
3614 struct cnode *fcp;
3615 struct cnode *fdcp;
3616 struct cnode *tdcp;
3617 struct cnode *tcp;
3618 struct cnode *error_cnode;
3643 * cnode with locks held.
3661 * two names should not resolve to the same cnode unless they were case variants.
3711 * error handling path, we can't be holding the cnode locks.
3750 * cnode lock on the underlying cnode for this rsrc vnode.
3952 * inside a journal transaction and without holding a cnode lock.
4012 * we must release the cnode lock of that element during the interim to
4021 * their lookup call and are waiting to acquire the cnode lock in order
4022 * to proceed, that cnode lock will not fail due to the cnode being marked
4170 /* Update cnode's catalog descriptor */
4175 /* Now indicate this cnode needs to have date-added written to the finderinfo */
4235 * cnode -- it's still 'fcp'.
4314 struct cnode *cp = NULL;
4377 * End the transaction so we don't re-take the cnode lock
4417 * We don't need to drop the cnode lock here
4503 struct cnode *cp;
4531 int compressed = hfs_file_is_compressed(VTOC(vp), 0); /* 0 == take the cnode lock */
4668 /* Get a directory hint (cnode must be locked exclusive) */
4771 struct cnode *cp;
4914 * Update a cnode's on-disk metadata.
4919 * The cnode must be locked exclusive
4924 struct cnode *cp = VTOC(vp);
4992 /* copy the datafork into a temporary copy so we don't pollute the cnode's */
4998 * from the total block count before writing the cnode entry to disk.
5069 struct cnode *cp = NULL;
5070 struct cnode *dcp = NULL;
5097 /* set the cnode pointer only after successfully acquiring lock */
5179 * cause the cnode creation routine in hfs_getnewvnode to mark the cnode
5364 * NOTE: Maintaining the cnode lock on the parent directory is important,
5375 * The cnode is locked on successful return.
5390 * function) to see if creating this cnode/vnode would cause us to go over quota.
5413 * Make sure we release cnode lock on dcp.
5434 * hfs_vgetrsrc acquires a resource fork vnode corresponding to the cnode that is
5435 * found in 'vp'. The rsrc fork vnode is returned with the cnode locked and iocount
5445 * and then re-acquire the cnode lock. We may need to do this, for example, in order to
5449 * discover that the cnode has gone into an open-unlinked state ( C_DELETED or C_NOEXISTS)
5450 * is set in the cnode flags. This is only necessary if can_drop_lock is true, otherwise
5451 * there's really no reason to double-check for errors on the cnode.
5460 struct cnode *cp = VTOC(vp);
5470 * Need to check the status of the cnode to validate it hasn't gone
5484 * It is not safe to hold the cnode lock when calling vnode_getwithvid()
5487 * fork vnode and is attempting to acquire the common cnode lock.
5489 * But it's also not safe to drop the cnode lock when we're holding
5490 * multiple cnode locks, like during a hfs_removefile() operation
5491 * since we could lock out of order when re-acquiring the cnode lock.
5505 * When we relinquished our cnode lock, the cnode could have raced
5516 * that the cnode has gone open-unlinked. In this case, the caller requested that we
5519 * the cnode lock.
5554 * Make sure cnode lock is exclusive, if not upgrade it.
5557 * and that its safe to have the cnode lock dropped and reacquired.
5573 * hfs_vgetsrc may be invoked for a cnode that has already been marked
5577 * cat_lookup because this cnode has no name in its descriptor. However,
5611 * trust the descriptor in the provided cnode for lookups at this point.
5618 * the descriptor in the cnode if other links still point to the inode.
5634 * of the cnode (possibly barring calls to exchangedata).
5737 * Update the times on the cnode then do device close.
5748 struct cnode *cp;
5803 * Update the times on the cnode then do device close.
5814 struct cnode *cp;