diff options
author | Marcel Telka <marcel@telka.sk> | 2016-12-24 12:30:11 +0100 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2017-01-02 15:58:24 -0800 |
commit | 957f6e722ed34de1328d9a8ce2c1932fd21f8c85 (patch) | |
tree | ac8d86343188294b7d8082cc89bea9f7a0672201 /usr | |
parent | e2fb2b65b4c67a1ead9ea88052bb3fdb5ee65d59 (diff) | |
download | illumos-joyent-957f6e722ed34de1328d9a8ce2c1932fd21f8c85.tar.gz |
7689 Comment typos and formatting fixes in NFSv4 client sources
Reviewed by: Adam Števko <adam.stevko@gmail.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs4_client_state.c | 32 | ||||
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs4_vnops.c | 22 | ||||
-rw-r--r-- | usr/src/uts/common/nfs/nfs4_clnt.h | 4 |
3 files changed, 25 insertions, 33 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs4_client_state.c b/usr/src/uts/common/fs/nfs/nfs4_client_state.c index 969729b3f8..d8e79a9f4a 100644 --- a/usr/src/uts/common/fs/nfs/nfs4_client_state.c +++ b/usr/src/uts/common/fs/nfs/nfs4_client_state.c @@ -552,7 +552,7 @@ nfs4_get_open_stateid(rnode4_t *rp, cred_t *cr, mntinfo4_t *mi, stateid4 *sid) */ stateid4 nfs4_get_w_stateid(cred_t *cr, rnode4_t *rp, pid_t pid, mntinfo4_t *mi, - nfs_opnum4 op, nfs4_stateid_types_t *sid_tp) + nfs_opnum4 op, nfs4_stateid_types_t *sid_tp) { stateid4 sid; @@ -596,7 +596,7 @@ nfs4_get_w_stateid(cred_t *cr, rnode4_t *rp, pid_t pid, mntinfo4_t *mi, */ stateid4 nfs4_get_stateid(cred_t *cr, rnode4_t *rp, pid_t pid, mntinfo4_t *mi, - nfs_opnum4 op, nfs4_stateid_types_t *sid_tp, bool_t async_read) + nfs_opnum4 op, nfs4_stateid_types_t *sid_tp, bool_t async_read) { stateid4 sid; @@ -780,7 +780,7 @@ create_open_stream(nfs4_open_owner_t *oop, rnode4_t *rp) */ nfs4_open_stream_t * find_or_create_open_stream(nfs4_open_owner_t *oop, rnode4_t *rp, - int *created_osp) + int *created_osp) { nfs4_open_stream_t *osp; @@ -1000,11 +1000,11 @@ int bypass_otw[2]; /* * Checks to see if the OPEN OTW is necessary that is, if it's already * been opened with the same access and deny bits we are now asking for. - * Note, this assumes that *vpp is a rnode. + * Note, this assumes that *vp is a rnode. */ int nfs4_is_otw_open_necessary(nfs4_open_owner_t *oop, int flag, vnode_t *vp, - int just_been_created, int *errorp, int acc, nfs4_recov_state_t *rsp) + int just_been_created, int *errorp, int acc, nfs4_recov_state_t *rsp) { rnode4_t *rp; nfs4_open_stream_t *osp; @@ -1181,7 +1181,7 @@ get_dtype(rnode4_t *rp) void nfs4_setup_lock_args(nfs4_lock_owner_t *lop, nfs4_open_owner_t *oop, - nfs4_open_stream_t *osp, clientid4 clientid, locker4 *locker) + nfs4_open_stream_t *osp, clientid4 clientid, locker4 *locker) { ASSERT(lop->lo_flags & NFS4_LOCK_SEQID_INUSE); if (lop->lo_just_created == NFS4_JUST_CREATED) { @@ -1311,8 +1311,8 @@ nfs4_end_lock_seqid_sync(nfs4_lock_owner_t *lop) */ nfsstat4 nfs4_find_or_create_lock_owner(pid_t pid, rnode4_t *rp, cred_t *cr, - nfs4_open_owner_t **oopp, nfs4_open_stream_t **ospp, - nfs4_lock_owner_t **lopp) + nfs4_open_owner_t **oopp, nfs4_open_stream_t **ospp, + nfs4_lock_owner_t **lopp) { nfs4_lock_owner_t *lop, *next_lop; mntinfo4_t *mi; @@ -1445,7 +1445,7 @@ failed: */ static nfs4_open_owner_t * find_freed_open_owner(cred_t *cr, nfs4_oo_hash_bucket_t *bucketp, - mntinfo4_t *mi) + mntinfo4_t *mi) { nfs4_open_owner_t *foop; @@ -1538,7 +1538,7 @@ nfs4_get_open_seqid(nfs4_open_owner_t *oop) */ void nfs4_set_open_seqid(seqid4 seqid, nfs4_open_owner_t *oop, - nfs4_tag_type_t tag_type) + nfs4_tag_type_t tag_type) { ASSERT(oop->oo_seqid_inuse); oop->oo_seqid = seqid; @@ -1608,7 +1608,7 @@ nfs4_get_otw_cred(cred_t *cr, mntinfo4_t *mi, nfs4_open_owner_t *provided_oop) */ cred_t * nfs4_get_otw_cred_by_osp(rnode4_t *rp, cred_t *cr, - nfs4_open_stream_t **osp, bool_t *first_time, bool_t *last_time) + nfs4_open_stream_t **osp, bool_t *first_time, bool_t *last_time) { nfs4_open_stream_t *next_osp = NULL; cred_t *ret_cr; @@ -1758,8 +1758,8 @@ nfs4_create_bseqid_entry(nfs4_open_owner_t *oop, nfs4_lock_owner_t *lop, void nfs4open_dg_save_lost_rqst(int error, nfs4_lost_rqst_t *lost_rqstp, - nfs4_open_owner_t *oop, nfs4_open_stream_t *osp, cred_t *cr, - vnode_t *vp, int access_close, int deny_close) + nfs4_open_owner_t *oop, nfs4_open_stream_t *osp, cred_t *cr, + vnode_t *vp, int access_close, int deny_close) { lost_rqstp->lr_putfirst = FALSE; @@ -1796,8 +1796,8 @@ nfs4open_dg_save_lost_rqst(int error, nfs4_lost_rqst_t *lost_rqstp, */ void nfs4_open_downgrade(int access_close, int deny_close, nfs4_open_owner_t *oop, - nfs4_open_stream_t *osp, vnode_t *vp, cred_t *cr, nfs4_lost_rqst_t *lrp, - nfs4_error_t *ep, cred_t **recov_credpp, seqid4 *recov_seqidp) + nfs4_open_stream_t *osp, vnode_t *vp, cred_t *cr, nfs4_lost_rqst_t *lrp, + nfs4_error_t *ep, cred_t **recov_credpp, seqid4 *recov_seqidp) { mntinfo4_t *mi; int downgrade_acc, downgrade_deny; @@ -2012,7 +2012,7 @@ no_args_out: */ void nfs4_resend_open_otw(vnode_t **vpp, nfs4_lost_rqst_t *resend_rqstp, - nfs4_error_t *ep) + nfs4_error_t *ep) { COMPOUND4args_clnt args; COMPOUND4res_clnt res; diff --git a/usr/src/uts/common/fs/nfs/nfs4_vnops.c b/usr/src/uts/common/fs/nfs/nfs4_vnops.c index 0d87903f41..4924385037 100644 --- a/usr/src/uts/common/fs/nfs/nfs4_vnops.c +++ b/usr/src/uts/common/fs/nfs/nfs4_vnops.c @@ -116,7 +116,7 @@ typedef enum nfs4_acl_op { NFS4_ACL_SET } nfs4_acl_op_t; -static struct lm_sysid *nfs4_find_sysid(mntinfo4_t *mi); +static struct lm_sysid *nfs4_find_sysid(mntinfo4_t *); static void nfs4_update_dircaches(change_info4 *, vnode_t *, vnode_t *, char *, dirattr_info_t *); @@ -10507,7 +10507,6 @@ nfs4_map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp, return (EINTR); } - if (vp->v_flag & VNOCACHE) { error = EAGAIN; goto done; @@ -10945,8 +10944,9 @@ nfs4_frlock(vnode_t *vp, int cmd, struct flock64 *bfp, int flag, } if (lwp != NULL) lwp->lwp_nostop--; - } else - cv_wait(&rp->r_cv, &rp->r_statelock); + } else { + cv_wait(&rp->r_cv, &rp->r_statelock); + } } mutex_exit(&rp->r_statelock); if (rc != 0) @@ -13004,7 +13004,7 @@ nfs4frlock_pre_setup(clock_t *tick_delayp, nfs4_recov_state_t *recov_statep, /* * Initialize and allocate the data structures necessary for * the nfs4frlock call. - * Allocates argsp's op array, frees up the saved_rqstpp if there is one. + * Allocates argsp's op array. */ static void nfs4frlock_call_init(COMPOUND4args_clnt *argsp, COMPOUND4args_clnt **argspp, @@ -13353,12 +13353,7 @@ nfs4frlock_setup_locku_args(nfs4_lock_call_type_t ctype, nfs_argop4 *argop, locku_args = &argop->nfs_argop4_u.oplocku; *locku_argsp = locku_args; - /* - * XXX what should locku_args->locktype be? - * setting to ALWAYS be READ_LT so at least - * it is a valid locktype. - */ - + /* locktype should be set to any legal value */ locku_args->locktype = READ_LT; pid = ctype == NFS4_LCK_CTYPE_NORM ? curproc->p_pidp->pid_id : @@ -13496,8 +13491,6 @@ out: /* * After we get the reply from the server, record the proper information * for possible resend lock requests. - * - * Allocates memory for the saved_rqstp if we have a lost lock to save. */ static void nfs4frlock_save_lost_rqst(nfs4_lock_call_type_t ctype, int error, @@ -14275,7 +14268,6 @@ recov_retry: switch (cmd) { case F_GETLK: - case F_O_GETLK: nfs4frlock_setup_lockt_args(ctype, &argop[1], &lockt_args, argsp, flk, rp); break; @@ -15890,7 +15882,7 @@ nfs4_reinstitute_local_lock_state(vnode_t *vp, flock64_t *lost_flp, cred_t *cr, * Now we have the list of intersections with the lost lock. These are * the locks that were/are active before the server replied to the * last/lost lock. Issue these locks to the server here. Playing these - * locks to the server will re-establish aur current local locking state + * locks to the server will re-establish our current local locking state * with the v4 server. * If we get an error, send SIGLOST to the application for that lock. */ diff --git a/usr/src/uts/common/nfs/nfs4_clnt.h b/usr/src/uts/common/nfs/nfs4_clnt.h index 25064e76ac..8f8cb7d78e 100644 --- a/usr/src/uts/common/nfs/nfs4_clnt.h +++ b/usr/src/uts/common/nfs/nfs4_clnt.h @@ -1597,7 +1597,7 @@ extern clock_t nfs_write_error_interval; * Found through rnodes. * * The os_open_ref_count keeps track the number of open file descriptor - * refernces on this data structure. It will be bumped for any successful + * references on this data structure. It will be bumped for any successful * OTW OPEN call and any OPEN call that determines the OTW call is not * necessary and the open stream hasn't just been created (see * nfs4_is_otw_open_necessary). @@ -1625,7 +1625,7 @@ extern clock_t nfs_write_error_interval; * 'os_pending_close' is set when an over-the-wire CLOSE is deferred to the * lost state queue. * - * 'open_stateid' is set the last open stateid returned by the server unless + * 'open_stateid' is set to the last open stateid returned by the server unless * 'os_delegation' is 1, in which case 'open_stateid' refers to the * delegation stateid returned by the server. This is used in cases where the * client tries to OPEN a file but already has a suitable delegation, so we |