Lines Matching defs:open

1639  * We're about to use/manipulate NFS mount's open/lock state.
1672 * We're done using/manipulating the NFS mount's open/lock
1752 * Mark an NFS node's open state as busy.
1782 * Clear an NFS node's open state busy flag and wake up
1801 * Search a mount's open owner list for the owner for this credential.
1848 * destroy an open owner that's no longer needed
1860 * acquire a reference count on an open owner
1871 * drop a reference count on an open owner and destroy it if
1883 /* XXX we may potentially want to clean up idle/unused open owner structures */
1894 * Mark an open owner as busy because we are about to
1895 * start an operation that uses and updates open owner state.
1925 * Clear the busy flag on an open owner and wake up anyone waiting
1944 * Given an open/lock owner and an error code, increment the
1959 /* do not increment the open seqid on these errors */
1969 * Search a node's open file list for any conflicts with this request.
1970 * Also find this open owner's open file structure.
2013 /* This request conflicts with an existing open on this client. */
2020 * If this open owner doesn't have an open
2061 * Destroy an open file structure.
2075 * Mark an open file as busy because we are about to
2076 * start an operation that uses and updates open file state.
2106 * Clear the busy flag on an open file and wake up anyone waiting
2125 * Add the open state for the given access/deny modes to this open file.
2187 * Find which particular open combo will be closed and report what
2188 * the new modes will be and whether the open was delegated.
2240 /* Find the corresponding open access/deny mode counter. */
2272 * Remove the open state for the given access/deny modes to this open file.
2283 /* Decrement the corresponding open access/deny mode counter. */
2288 NP(nofp->nof_np, "nfs: open(R) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2293 NP(nofp->nof_np, "nfs: open(R) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2300 NP(nofp->nof_np, "nfs: open(W) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2305 NP(nofp->nof_np, "nfs: open(W) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2312 NP(nofp->nof_np, "nfs: open(RW) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2317 NP(nofp->nof_np, "nfs: open(RW) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2326 NP(nofp->nof_np, "nfs: open(R,DW) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2331 NP(nofp->nof_np, "nfs: open(R,DW) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2338 NP(nofp->nof_np, "nfs: open(W,DW) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2343 NP(nofp->nof_np, "nfs: open(W,DW) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2350 NP(nofp->nof_np, "nfs: open(RW,DW) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2355 NP(nofp->nof_np, "nfs: open(RW,DW) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2364 NP(nofp->nof_np, "nfs: open(R,DRW) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2369 NP(nofp->nof_np, "nfs: open(R,DRW) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2376 NP(nofp->nof_np, "nfs: open(W,DRW) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2381 NP(nofp->nof_np, "nfs: open(W,DRW) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2388 NP(nofp->nof_np, "nfs: open(RW,DRW) delegated count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2393 NP(nofp->nof_np, "nfs: open(RW,DRW) count underrun, %d", kauth_cred_getuid(nofp->nof_owner->noo_cred));
2409 * Get the current (delegation, lock, open, default) stateid for this node.
2412 * Or use the open file's stateid.
2413 * If no open file, use a default stateid of all ones.
2437 /* we (should) have the file open, use open stateid */
2482 * Try to open it for read access too,
2549 * If we have a delegation, we may be able to handle the open locally.
2550 * Otherwise, we will always send the open RPC even if this open's mode is
2552 * be able to do a downgrade to any of the open modes.
2575 * unless it's a read delegation and the open is asking for
2625 * Try to open it for read access too,
2682 * Since it's not possible to mmap() without having the file open for reading,
2709 NP(np, "nfs_vnop_mmap: no open file for owner, error %d, %d", error, kauth_cred_getuid(noop->noo_cred));
2727 * The open reference for mmap must mirror an existing open because
2729 * So grab another open count matching the accessMode passed in.
2730 * If we already had an mmap open, prefer read/write without deny mode.
2731 * This means we may have to drop the current mmap open first.
2740 /* we don't have the file open, so open it for read access */
2754 /* determine deny mode for open */
2796 if (error) /* mmap mode without proper open mode */
2802 * then we'll stick with the existing mmap open mode.
2808 /* update mmap open mode */
2893 /* flush buffers/ubc before we drop the open (in case it's our last open) */
2898 /* walk all open files and close all mmap opens */
3485 * So we skip all the open owner, open file, lock owner work
3733 /* make sure the lock owner knows its open owner */
3744 * with an open it knows about.
4329 /* find the open owner */
4332 NP(np, "nfs_vnop_advlock: no open owner %d", kauth_cred_getuid(vfs_context_ucred(ctx)));
4336 /* find the open file */
4352 NP(np, "nfs_vnop_advlock: no open file %d, %d", error, kauth_cred_getuid(noop->noo_cred));
4376 * Check if an open owner holds any locks on a file.
4393 * Reopen simple (no deny, no locks) open state that was lost.
4430 * the sillyrename directory/name to do the open.
4517 * Send a normal OPEN RPC to open/create a file.
4697 nfsm_chain_add_compound_header(error, &nmreq, create ? "create" : "open", numops);
4826 printf("nfs: open/create didn't return filehandle? %s\n", cnp->cn_nameptr);
4831 // XXX for the open case, what if fh doesn't match the vnode we think we're opening?
4960 * Send an OPEN RPC to claim a delegated open for a file
5001 * the sillyrename directory/name to do the open.
5066 // open owner: clientid + uid
5106 // printf("nfs: open delegated claim didn't return a delegation %s\n", filename ? filename : "???");
5114 printf("nfs: open delegated claim returned a different delegation type! have %s got %s %s\n",
5175 printf("nfs: open reclaim didn't return filehandle? %s\n", filename ? filename : "???");
5208 // printf("nfs: open claim delegated (%d, %d) succeeded for %s\n", share_access, share_deny, filename ? filename : "???");
5219 * Send an OPEN RPC to reclaim an open file.
5272 // open owner: clientid + uid
5321 // NP(np, "nfs: open reclaim didn't return delegation?");
5386 NP(np, "nfs: open reclaim didn't return filehandle?");
5393 // the open reclaim using the file handle (and not a dir/name pair).
5404 // NP(np, "nfs: open reclaim (%d, %d) succeeded", share_access, share_deny);
5554 * Claim the delegated open combinations this open file holds.
5741 /* revoke all open file state */
5748 * Release all open state for the given node.
5789 /* mark open state as lost */
5836 * Claim the delegated open combinations that each of this node's open files hold.
5846 /* walk the open file list looking for opens with delegated state to claim */
6013 * without first calling VNOP_OPEN, so we make sure the file is open here.
6063 /* we don't have the file open, so open it for read access */
6103 * Files are created using the NFSv4 OPEN RPC. So we must open the
6146 /* grab a provisional, nodeless open file */
6172 * We'll create/open it RW, and set NFS_OPEN_FILE_CREATE.
6177 /* Do the open/create */
6184 * created/opened the file and then the second time we were denied the open
6188 * retrying the open.
6227 /* After we have a node, add our open file struct to the node */
6238 * Hmm... an open file struct already exists.
6239 * Mark the existing one busy and merge our open into it.
6241 * Note: there's no chance of an open confict because the
6242 * open has already been granted.
6253 /* mark the node as holding a create-initiated open */
6884 * - optionally open the named attribute (with the given accessMode) in the same RPC
6885 * - combine attribute directory retrieval with the lookup/open RPC
6890 * needed for any particular request (openattr, lookup vs. open, read).
6893 * the lookup/open, we lock both the node and the attribute directory node.
6915 int open, status, numops, hadattrdir, negnamecache;
6969 open = (accessMode != NFS_OPEN_SHARE_ACCESS_NONE);
6970 if (open) {
6972 * We're trying to open the file.
6973 * We'll create/open it with the given access mode,
7049 /* we're done if error or we don't need to open */
7050 if (error || !open)
7052 /* no error and we need to open... */
7056 if (open) {
7066 /* grab an open file - possibly provisional/nodeless if cache_lookup() failed */
7090 * We already have the node. So we just need to open
7095 /* open succeeded, so our open file is no longer temporary */
7117 if (open) {
7118 /* need to mark the open owner busy during the RPC */
7125 * We'd like to get updated post-open/lookup attributes for the
7157 if (open) {
7225 vfs_context_thread(ctx), vfs_context_ucred(ctx), &si, open ? R_NOINTR: 0, NULL, &req);
7273 if (open) {
7350 if (open) {
7368 if (open && adnp && !adlockerror) {
7396 if (!error && open) {
7398 /* After we have a node, add our open file struct to the node */
7407 * Hmm... an open file struct already exists.
7408 * Mark the existing one busy and merge our open into it.
7410 * Note: there's no chance of an open confict because the
7411 * open has already been granted.
7425 /* mark the node as holding a create-initiated open */
7434 if (open && ((delegation == NFS_OPEN_DELEGATE_READ) || (delegation == NFS_OPEN_DELEGATE_WRITE))) {
7476 if (open) {
7811 * create/open the xattr
7816 * that by setting the size to 0 on create/open.
7832 /* grab the open state from the get/create/open */