Hi Marcel, > The code for NFSv4 is doing this: > > VOP_PATHCONF(vp, _PC_FILESIZEBITS, &pc_val, cr); > pce->maxfilesize = ((1LL << pc_val) - 1); > > > The NFSv3 code is doing this: > > > VOP_PATHCONF(vp, _PC_FILESIZEBITS, &l, cr, NULL); > resp->resok.maxfilesize = (1LL << (l-1)) - 1; > > > Do you see the difference? For NFSv3 case we return only (approx.) half value > of > max file size. > Yes, I saw that a while back, and am trying to understand if that is a new bug or intentionally done by the person who wrote this originally. Investigating the above difference is what I meant by "taking a closer look". > > Another problem I see above with NFSv4 implementation is number of parameters > in VOP_PATHCONF() macro/call. There are only 4 instead of 5 as in NFSv3 > implementation and in > VOP_PATHCONF() definition too: > http://grok.czech.sun.com:8080/source/xref/onnv-clone/usr/src/uts/common/sys/vnode.h#1066 > > How it would even compile without a warning? >
Not sure if I understand. I am seeing 5 parameters to the VOP_PATHCONF issued in rfs4_fattr4_maxfilesize as well as rfs4_get_pc_encode. Maybe you are looking at different source code base? I am working off the ON codebase. -Piyush