Print this page
*** NO COMMENTS ***

*** 69,84 **** * These are the interface routines for the server side of the * Network File System. See the NFS version 3 protocol specification * for a description of this interface. */ - #ifdef DEBUG - int rfs3_do_pre_op_attr = 1; - int rfs3_do_post_op_attr = 1; - int rfs3_do_post_op_fh3 = 1; - #endif - static writeverf3 write3verf; static int sattr3_to_vattr(sattr3 *, struct vattr *); static int vattr_to_fattr3(struct vattr *, fattr3 *); static int vattr_to_wcc_attr(struct vattr *, wcc_attr *); --- 69,78 ----
*** 225,240 **** * right access checking. So, we'll fail the request. */ if (error) goto out; - #ifdef DEBUG - if (rfs3_do_pre_op_attr) - bvap = &bva; - #else bvap = &bva; - #endif if (rdonly(exi, req) || vn_is_readonly(vp)) { resp->status = NFS3ERR_ROFS; goto out1; } --- 219,229 ----
*** 320,339 **** if (error == EAGAIN && (ct.cc_flags & CC_WOULDBLOCK)) { resp->status = NFS3ERR_JUKEBOX; goto out1; } - #ifdef DEBUG - if (rfs3_do_post_op_attr) { ava.va_mask = AT_ALL; avap = rfs4_delegated_getattr(vp, &ava, 0, cr) ? NULL : &ava; - } else - avap = NULL; - #else - ava.va_mask = AT_ALL; - avap = rfs4_delegated_getattr(vp, &ava, 0, cr) ? NULL : &ava; - #endif /* * Force modified metadata out to stable storage. */ (void) VOP_FSYNC(vp, FNODSYNC, cr, &ct); --- 309,320 ----
*** 419,437 **** error = ESTALE; goto out; } } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { dva.va_mask = AT_ALL; dvap = VOP_GETATTR(dvp, &dva, 0, cr, NULL) ? NULL : &dva; - } - #else - dva.va_mask = AT_ALL; - dvap = VOP_GETATTR(dvp, &dva, 0, cr, NULL) ? NULL : &dva; - #endif if (args->what.name == nfs3nametoolong) { resp->status = NFS3ERR_NAMETOOLONG; goto out1; } --- 400,411 ----
*** 522,541 **** error = 1; } } } - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - dva.va_mask = AT_ALL; - dvap = VOP_GETATTR(dvp, &dva, 0, cr, NULL) ? NULL : &dva; - } else - dvap = NULL; - #else dva.va_mask = AT_ALL; dvap = VOP_GETATTR(dvp, &dva, 0, cr, NULL) ? NULL : &dva; - #endif if (error) goto out; if (sec.sec_flags & SEC_QUERY) { --- 496,507 ----
*** 558,577 **** * will be released by the caller, common_dispatch. */ if (publicfh_flag) exi_rele(exi); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va; - #endif VN_RELE(vp); resp->status = NFS3_OK; vattr_to_post_op_attr(vap, &resp->resok.obj_attributes); --- 524,535 ----
*** 660,675 **** va.va_mask = AT_MODE; error = VOP_GETATTR(vp, &va, 0, cr, NULL); if (error) goto out; - #ifdef DEBUG - if (rfs3_do_post_op_attr) - vap = &va; - #else vap = &va; - #endif resp->resok.access = 0; if (is_system_labeled()) { bslabel_t *clabel = req->rq_label; --- 618,628 ----
*** 740,759 **** (!is_system_labeled() || admin_low_client || dominant_label)) resp->resok.access |= ACCESS3_EXECUTE; } - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va; - #endif resp->status = NFS3_OK; vattr_to_post_op_attr(vap, &resp->resok.obj_attributes); DTRACE_NFSV3_4(op__access__done, struct svc_req *, req, --- 693,704 ----
*** 814,829 **** va.va_mask = AT_ALL; error = VOP_GETATTR(vp, &va, 0, cr, NULL); if (error) goto out; - #ifdef DEBUG - if (rfs3_do_post_op_attr) - vap = &va; - #else vap = &va; - #endif /* We lied about the object type for a referral */ if (vn_is_nfs_reparse(vp, cr)) is_referral = 1; --- 759,769 ----
*** 887,906 **** if (!error) *(data + MAXPATHLEN - uio.uio_resid) = '\0'; } - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; ! #endif /* Lie about object type again just to be consistent */ if (is_referral && vap != NULL) vap->va_type = VLNK; #if 0 /* notyet */ --- 827,839 ---- if (!error) *(data + MAXPATHLEN - uio.uio_resid) = '\0'; } va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; ! /* Lie about object type again just to be consistent */ if (is_referral && vap != NULL) vap->va_type = VLNK; #if 0 /* notyet */
*** 1075,1090 **** * right access checking. So, we'll fail the request. */ if (error) goto out; - #ifdef DEBUG - if (rfs3_do_post_op_attr) - vap = &va; - #else vap = &va; - #endif if (vp->v_type != VREG) { resp->status = NFS3ERR_INVAL; goto out1; } --- 1008,1018 ----
*** 1230,1253 **** } va.va_mask = AT_ALL; error = VOP_GETATTR(vp, &va, 0, cr, &ct); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { if (error) vap = NULL; else vap = &va; - } else - vap = NULL; - #else - if (error) - vap = NULL; - else - vap = &va; - #endif VOP_RWUNLOCK(vp, V_WRITELOCK_FALSE, &ct); if (in_crit) nbl_end_crit(vp); --- 1158,1171 ----
*** 1417,1430 **** */ if (error) goto err; bvap = &bva; - #ifdef DEBUG - if (!rfs3_do_pre_op_attr) - bvap = NULL; - #endif avap = bvap; if (args->count != args->data.data_len) { resp->status = NFS3ERR_INVAL; goto err1; --- 1335,1344 ----
*** 1532,1546 **** } ava.va_mask = AT_ALL; avap = VOP_GETATTR(vp, &ava, 0, cr, &ct) ? NULL : &ava; - #ifdef DEBUG - if (!rfs3_do_post_op_attr) - avap = NULL; - #endif - if (error) goto err; /* * If we were unable to get the V_WRITELOCK_TRUE, then we --- 1446,1455 ----
*** 1625,1644 **** if (dvp == NULL) { error = ESTALE; goto out; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - dbva.va_mask = AT_ALL; - dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - } else - dbvap = NULL; - #else dbva.va_mask = AT_ALL; dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - #endif davap = dbvap; if (args->where.name == nfs3nametoolong) { resp->status = NFS3ERR_NAMETOOLONG; goto out1; --- 1534,1545 ----
*** 1797,1816 **** * passed as part of the arguments. */ error = VOP_CREATE(dvp, name, &va, excl, VWRITE, &vp, cr, 0, NULL, NULL); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - dava.va_mask = AT_ALL; - davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - } else - davap = NULL; - #else dava.va_mask = AT_ALL; davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - #endif if (error) { /* * If we got something other than file already exists * then just return this error. Otherwise, we got --- 1698,1709 ----
*** 1910,1937 **** } if (name != args->where.name) kmem_free(name, MAXPATHLEN + 1); - #ifdef DEBUG - if (!rfs3_do_post_op_attr) - vap = NULL; - #endif - - #ifdef DEBUG - if (!rfs3_do_post_op_fh3) - resp->resok.obj.handle_follows = FALSE; - else { - #endif error = makefh3(&resp->resok.obj.handle, vp, exi); if (error) resp->resok.obj.handle_follows = FALSE; else resp->resok.obj.handle_follows = TRUE; - #ifdef DEBUG - } - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(vp, FNODSYNC, cr, NULL); --- 1803,1817 ----
*** 2011,2030 **** if (dvp == NULL) { error = ESTALE; goto out; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - dbva.va_mask = AT_ALL; - dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - } else - dbvap = NULL; - #else dbva.va_mask = AT_ALL; dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - #endif davap = dbvap; if (args->where.name == nfs3nametoolong) { resp->status = NFS3ERR_NAMETOOLONG; goto out1; --- 1891,1902 ----
*** 2080,2132 **** error = VOP_MKDIR(dvp, name, &va, &vp, cr, NULL, 0, NULL); if (name != args->where.name) kmem_free(name, MAXPATHLEN + 1); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - dava.va_mask = AT_ALL; - davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - } else - davap = NULL; - #else dava.va_mask = AT_ALL; davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(dvp, 0, cr, NULL); if (error) goto out; - #ifdef DEBUG - if (!rfs3_do_post_op_fh3) - resp->resok.obj.handle_follows = FALSE; - else { - #endif error = makefh3(&resp->resok.obj.handle, vp, exi); if (error) resp->resok.obj.handle_follows = FALSE; else resp->resok.obj.handle_follows = TRUE; - #ifdef DEBUG - } - #endif - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(vp, 0, cr, NULL); --- 1952,1980 ----
*** 2192,2211 **** if (dvp == NULL) { error = ESTALE; goto err; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - dbva.va_mask = AT_ALL; - dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - } else - dbvap = NULL; - #else dbva.va_mask = AT_ALL; dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - #endif davap = dbvap; if (args->where.name == nfs3nametoolong) { resp->status = NFS3ERR_NAMETOOLONG; goto err1; --- 2040,2051 ----
*** 2273,2292 **** va.va_mask |= AT_TYPE; va.va_type = VLNK; error = VOP_SYMLINK(dvp, name, &va, symdata, cr, NULL, 0); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { dava.va_mask = AT_ALL; davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - } else - davap = NULL; - #else - dava.va_mask = AT_ALL; - davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - #endif if (error) goto err; error = VOP_LOOKUP(dvp, name, &vp, NULL, 0, NULL, cr, --- 2113,2124 ----
*** 2304,2337 **** vattr_to_post_op_attr(NULL, &resp->resok.obj_attributes); vattr_to_wcc_data(dbvap, davap, &resp->resok.dir_wcc); goto out; } - #ifdef DEBUG - if (!rfs3_do_post_op_fh3) - resp->resok.obj.handle_follows = FALSE; - else { - #endif error = makefh3(&resp->resok.obj.handle, vp, exi); if (error) resp->resok.obj.handle_follows = FALSE; else resp->resok.obj.handle_follows = TRUE; - #ifdef DEBUG - } - #endif - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(vp, 0, cr, NULL); --- 2136,2153 ----
*** 2400,2419 **** if (dvp == NULL) { error = ESTALE; goto out; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - dbva.va_mask = AT_ALL; - dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - } else - dbvap = NULL; - #else dbva.va_mask = AT_ALL; dbvap = VOP_GETATTR(dvp, &dbva, 0, cr, NULL) ? NULL : &dbva; - #endif davap = dbvap; if (args->where.name == nfs3nametoolong) { resp->status = NFS3ERR_NAMETOOLONG; goto out1; --- 2216,2227 ----
*** 2511,2530 **** &vp, cr, 0, NULL, NULL); if (name != args->where.name) kmem_free(name, MAXPATHLEN + 1); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - dava.va_mask = AT_ALL; - davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - } else - davap = NULL; - #else dava.va_mask = AT_ALL; davap = VOP_GETATTR(dvp, &dava, 0, cr, NULL) ? NULL : &dava; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(dvp, 0, cr, NULL); --- 2319,2330 ----
*** 2532,2565 **** if (error) goto out; resp->status = NFS3_OK; - #ifdef DEBUG - if (!rfs3_do_post_op_fh3) - resp->resok.obj.handle_follows = FALSE; - else { - #endif error = makefh3(&resp->resok.obj.handle, vp, exi); if (error) resp->resok.obj.handle_follows = FALSE; else resp->resok.obj.handle_follows = TRUE; - #ifdef DEBUG - } - #endif - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif /* * Force modified metadata out to stable storage. * * if a underlying vp exists, pass it to VOP_FSYNC --- 2332,2349 ----
*** 2624,2643 **** if (vp == NULL) { error = ESTALE; goto err; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - bva.va_mask = AT_ALL; - bvap = VOP_GETATTR(vp, &bva, 0, cr, NULL) ? NULL : &bva; - } else - bvap = NULL; - #else bva.va_mask = AT_ALL; bvap = VOP_GETATTR(vp, &bva, 0, cr, NULL) ? NULL : &bva; - #endif avap = bvap; if (vp->v_type != VDIR) { resp->status = NFS3ERR_NOTDIR; goto err1; --- 2408,2419 ----
*** 2709,2728 **** nbl_end_crit(targvp); } VN_RELE(targvp); targvp = NULL; - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - ava.va_mask = AT_ALL; - avap = VOP_GETATTR(vp, &ava, 0, cr, NULL) ? NULL : &ava; - } else - avap = NULL; - #else ava.va_mask = AT_ALL; avap = VOP_GETATTR(vp, &ava, 0, cr, NULL) ? NULL : &ava; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(vp, 0, cr, NULL); --- 2485,2496 ----
*** 2784,2803 **** if (vp == NULL) { error = ESTALE; goto err; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { bva.va_mask = AT_ALL; bvap = VOP_GETATTR(vp, &bva, 0, cr, NULL) ? NULL : &bva; - } else - bvap = NULL; - #else - bva.va_mask = AT_ALL; - bvap = VOP_GETATTR(vp, &bva, 0, cr, NULL) ? NULL : &bva; - #endif avap = bvap; if (vp->v_type != VDIR) { resp->status = NFS3ERR_NOTDIR; goto err1; --- 2552,2563 ----
*** 2846,2865 **** error = VOP_RMDIR(vp, name, rootdir, cr, NULL, 0); if (name != args->object.name) kmem_free(name, MAXPATHLEN + 1); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { ava.va_mask = AT_ALL; avap = VOP_GETATTR(vp, &ava, 0, cr, NULL) ? NULL : &ava; - } else - avap = NULL; - #else - ava.va_mask = AT_ALL; - avap = VOP_GETATTR(vp, &ava, 0, cr, NULL) ? NULL : &ava; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(vp, 0, cr, NULL); --- 2606,2617 ----
*** 2956,2975 **** goto err1; } } } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - fbva.va_mask = AT_ALL; - fbvap = VOP_GETATTR(fvp, &fbva, 0, cr, NULL) ? NULL : &fbva; - } else - fbvap = NULL; - #else fbva.va_mask = AT_ALL; fbvap = VOP_GETATTR(fvp, &fbva, 0, cr, NULL) ? NULL : &fbva; - #endif favap = fbvap; fh3 = &args->to.dir; to_exi = checkexport(&fh3->fh3_fsid, FH3TOXFIDP(fh3)); if (to_exi == NULL) { --- 2708,2719 ----
*** 2987,3006 **** if (tvp == NULL) { error = ESTALE; goto err; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { tbva.va_mask = AT_ALL; tbvap = VOP_GETATTR(tvp, &tbva, 0, cr, NULL) ? NULL : &tbva; - } else - tbvap = NULL; - #else - tbva.va_mask = AT_ALL; - tbvap = VOP_GETATTR(tvp, &tbva, 0, cr, NULL) ? NULL : &tbva; - #endif tavap = tbvap; if (fvp->v_type != VDIR || tvp->v_type != VDIR) { resp->status = NFS3ERR_NOTDIR; goto err1; --- 2731,2742 ----
*** 3098,3123 **** vn_renamepath(tvp, srcvp, args->to.name, strlen(args->to.name)); VN_RELE(srcvp); srcvp = NULL; - #ifdef DEBUG - if (rfs3_do_post_op_attr) { fava.va_mask = AT_ALL; favap = VOP_GETATTR(fvp, &fava, 0, cr, NULL) ? NULL : &fava; tava.va_mask = AT_ALL; tavap = VOP_GETATTR(tvp, &tava, 0, cr, NULL) ? NULL : &tava; - } else { - favap = NULL; - tavap = NULL; - } - #else - fava.va_mask = AT_ALL; - favap = VOP_GETATTR(fvp, &fava, 0, cr, NULL) ? NULL : &fava; - tava.va_mask = AT_ALL; - tavap = VOP_GETATTR(tvp, &tava, 0, cr, NULL) ? NULL : &tava; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(fvp, 0, cr, NULL); --- 2834,2847 ----
*** 3195,3214 **** if (vp == NULL) { error = ESTALE; goto out; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif fh3 = &args->link.dir; to_exi = checkexport(&fh3->fh3_fsid, FH3TOXFIDP(fh3)); if (to_exi == NULL) { resp->status = NFS3ERR_ACCES; --- 2919,2930 ----
*** 3241,3260 **** if (dvp == NULL) { error = ESTALE; goto out; } - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - bva.va_mask = AT_ALL; - bvap = VOP_GETATTR(dvp, &bva, 0, cr, NULL) ? NULL : &bva; - } else - bvap = NULL; - #else bva.va_mask = AT_ALL; bvap = VOP_GETATTR(dvp, &bva, 0, cr, NULL) ? NULL : &bva; - #endif if (dvp->v_type != VDIR) { resp->status = NFS3ERR_NOTDIR; goto out1; } --- 2957,2968 ----
*** 3296,3321 **** goto out1; } error = VOP_LINK(dvp, vp, name, cr, NULL, 0); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; ava.va_mask = AT_ALL; avap = VOP_GETATTR(dvp, &ava, 0, cr, NULL) ? NULL : &ava; - } else { - vap = NULL; - avap = NULL; - } - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - ava.va_mask = AT_ALL; - avap = VOP_GETATTR(dvp, &ava, 0, cr, NULL) ? NULL : &ava; - #endif /* * Force modified data and metadata out to stable storage. */ (void) VOP_FSYNC(vp, FNODSYNC, cr, NULL); --- 3004,3017 ----
*** 3440,3459 **** } } (void) VOP_RWLOCK(vp, V_WRITELOCK_FALSE, NULL); - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif if (vp->v_type != VDIR) { resp->status = NFS3ERR_NOTDIR; goto out1; } --- 3136,3147 ----
*** 3489,3508 **** uio.uio_loffset = (offset_t)args->cookie; uio.uio_resid = count; error = VOP_READDIR(vp, &uio, cr, &iseof, NULL, 0); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif if (error) { kmem_free(data, count); goto out; } --- 3177,3188 ----
*** 3728,3747 **** } } (void) VOP_RWLOCK(vp, V_WRITELOCK_FALSE, NULL); - #ifdef DEBUG - if (rfs3_do_pre_op_attr) { - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif if (vp->v_type != VDIR) { error = ENOTDIR; goto out; } --- 3408,3419 ----
*** 3896,3918 **** if (space_left >= DIRENT64_RECLEN(MAXNAMELEN)) goto getmoredents; /* else, fall through */ } - good: - - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif VOP_RWUNLOCK(vp, V_WRITELOCK_FALSE, NULL); infop = kmem_alloc(nents * sizeof (struct entryplus3_info), KM_SLEEP); resp->resok.infop = infop; --- 3568,3580 ----
*** 3936,3975 **** infop[i].fh.handle_follows = FALSE; dp = nextdp(dp); continue; } - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - nva.va_mask = AT_ALL; - nvap = rfs4_delegated_getattr(nvp, &nva, 0, cr) ? - NULL : &nva; - } else - nvap = NULL; - #else nva.va_mask = AT_ALL; nvap = rfs4_delegated_getattr(nvp, &nva, 0, cr) ? NULL : &nva; ! #endif /* Lie about the object type for a referral */ if (vn_is_nfs_reparse(nvp, cr)) nvap->va_type = VLNK; vattr_to_post_op_attr(nvap, &infop[i].attr); - #ifdef DEBUG - if (!rfs3_do_post_op_fh3) - infop[i].fh.handle_follows = FALSE; - else { - #endif error = makefh3(&infop[i].fh.handle, nvp, exi); if (!error) infop[i].fh.handle_follows = TRUE; else infop[i].fh.handle_follows = FALSE; - #ifdef DEBUG - } - #endif VN_RELE(nvp); dp = nextdp(dp); } --- 3598,3621 ---- infop[i].fh.handle_follows = FALSE; dp = nextdp(dp); continue; } nva.va_mask = AT_ALL; nvap = rfs4_delegated_getattr(nvp, &nva, 0, cr) ? NULL : &nva; ! /* Lie about the object type for a referral */ if (vn_is_nfs_reparse(nvp, cr)) nvap->va_type = VLNK; vattr_to_post_op_attr(nvap, &infop[i].attr); error = makefh3(&infop[i].fh.handle, nvp, exi); if (!error) infop[i].fh.handle_follows = TRUE; else infop[i].fh.handle_follows = FALSE; VN_RELE(nvp); dp = nextdp(dp); }
*** 4104,4123 **** } } error = VFS_STATVFS(vp->v_vfsp, &sb); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif if (error) goto out; resp->status = NFS3_OK; --- 3750,3761 ----
*** 4209,4228 **** goto out; } } } - #ifdef DEBUG - if (rfs3_do_post_op_attr) { - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif resp->status = NFS3_OK; vattr_to_post_op_attr(vap, &resp->resok.obj_attributes); xfer_size = rfs3_tsize(req); resp->resok.rtmax = xfer_size; --- 3847,3858 ----
*** 4321,4340 **** goto out1; } } } - #ifdef DEBUG - if (rfs3_do_post_op_attr) { va.va_mask = AT_ALL; vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - } else - vap = NULL; - #else - va.va_mask = AT_ALL; - vap = VOP_GETATTR(vp, &va, 0, cr, NULL) ? NULL : &va; - #endif error = VOP_PATHCONF(vp, _PC_LINK_MAX, &val, cr, NULL); if (error) goto out; resp->resok.info.link_max = (uint32)val; --- 3951,3962 ----
*** 4422,4439 **** * right access checking. So, we'll fail the request. */ if (error) goto out; - #ifdef DEBUG - if (rfs3_do_pre_op_attr) - bvap = &bva; - else - bvap = NULL; - #else bvap = &bva; - #endif if (rdonly(exi, req)) { resp->status = NFS3ERR_ROFS; goto out1; } --- 4044,4054 ----
*** 4463,4482 **** (error = VOP_ACCESS(vp, VWRITE, 0, cr, NULL))) goto out; error = VOP_FSYNC(vp, FSYNC, cr, NULL); - #ifdef DEBUG - if (rfs3_do_post_op_attr) { ava.va_mask = AT_ALL; avap = VOP_GETATTR(vp, &ava, 0, cr, NULL) ? NULL : &ava; - } else - avap = NULL; - #else - ava.va_mask = AT_ALL; - avap = VOP_GETATTR(vp, &ava, 0, cr, NULL) ? NULL : &ava; - #endif if (error) goto out; resp->status = NFS3_OK; --- 4078,4089 ----