J?rgen Keil wrote: >Ahh, the "cc_flags" member in the caller_context_t was added on >December 5th with the putback for "PSARC 2007/632 Caller context >flags"? > >Isn't the new ct.cc_flags member uninitialized in nfs4_srv.c, in function >do_rfs4_op_setattr()? And in rfs4_op_read(), rfs4_op_write(), >rfs4_createfile(), >rfs4_do_open(), ... ? > >http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/nfs/nfs4_srv.c#4891 > > 4891 /* Check stateid only if size has been set */ > 4892 if (sarg.vap->va_mask & AT_SIZE) { > 4893 trunc = (sarg.vap->va_size == 0); > 4894 status = rfs4_check_stateid(FWRITE, cs->vp, stateid, > 4895 trunc, &cs->deleg, sarg.vap->va_mask & AT_SIZE, > &ct); > 4896 if (status != NFS4_OK) > 4897 goto done; > 4898 } else { > 4899 ct.cc_sysid = 0; > 4900 ct.cc_pid = 0; > 4901 ct.cc_caller_id = nfs4_srv_caller_id; > <<<<<<<<<<< ct.cc_flags ???? > 4902 } > > >Maybe in those cases where I couldn't reliably reproduce the 3 min >"hang" for the touch command, the uninitialized ct.cc_flags on the >server had the low bit set, so that recall_all_delegations() >didn't wait and returned NFS4ERR_DELAY, the monitor >returned that as EAGAIN, ... > > After my previous reply, I tried running your scenario and it had the 3 minute hang. Then I looked at the code and saw exactly what you quoted above. I added cc_flags = CC_DONTBLOCK at the line you point out and inside of rfs4_check_stateid(). I then ran the test again and it worked fine, no hang.
Thanks again for finding this, we will probably add a test case to our suite which does something similar. jim > >This message posted from opensolaris.org >_______________________________________________ >nfs-discuss mailing list >nfs-discuss at opensolaris.org > >