This is a discussion on Re: more re: nfs openbsd setattr bug within the lucky.openbsd.tech forums, part of the OpenBSD category; --> On Tue, 28 Mar 2006, rick@snowhite.cis.uoguelph.ca wrote: > I've run the little test script and it seemed to be ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Tue, 28 Mar 2006, rick@snowhite.cis.uoguelph.ca wrote: > I've run the little test script and it seemed to be fixed after I had > patched my server to set VA_UTIMES_NULL when setting to server time(s). > > So, I think that your diagnosis was correct, but your patch didn't quite > fix it. Although I haven't tested it, here is the equivalent patch to > what I did, for OpenBSD3.8. Maybe you can try this? > > Good luck with it, rick I installed a 2.6.16 linux system. The problematic call with my diff was only setting mtime TOSERVER, so the count never reached 2. I can confirm your diff fixes things for me. I'm woried about one thing though: what if the client does atime TOSERVER mtime TOCLIENT? That should not be allowed. So here's a revised diff that catches that. Han, could you try this one? -Otto Index: nfsm_subs.h ================================================== ================= RCS file: /cvs/src/sys/nfs/nfsm_subs.h,v retrieving revision 1.15 diff -u -p -r1.15 nfsm_subs.h --- nfsm_subs.h 24 Jun 2004 19:35:26 -0000 1.15 +++ nfsm_subs.h 28 Mar 2006 20:11:09 -0000 @@ -471,16 +471,19 @@ fxdr_nfsv3time(tl, &(a)->va_atime); \ break; \ case NFSV3SATTRTIME_TOSERVER: \ + (a)->va_vaflags |= VA_UTIMES_NULL; \ getnanotime(&(a)->va_atime); \ break; \ }; \ nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \ switch (fxdr_unsigned(int, *tl)) { \ case NFSV3SATTRTIME_TOCLIENT: \ + (a)->va_vaflags &= ~VA_UTIMES_NULL; \ nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); \ fxdr_nfsv3time(tl, &(a)->va_mtime); \ break; \ case NFSV3SATTRTIME_TOSERVER: \ + (a)->va_vaflags |= VA_UTIMES_NULL; \ getnanotime(&(a)->va_mtime); \ break; \ }; } |