Date: Thu, 20 Apr 2017 23:45:59 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Doug Rabson <dfr@rabson.org> Cc: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, "jim@ks.uiuc.edu" <jim@ks.uiuc.edu> Subject: Re: NFSv4 Linux client atime for exclusive create Message-ID: <YTXPR01MB0189AFA97A8BFE756E6EFE4DDD1B0@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <CACA0VUjVg6BZc4SarH6UVn1DBrJc7MdfLkmKcbgq0OR1ExwD7Q@mail.gmail.com> References: <YTXPR01MB018992D6CDD2A578B4AC946BDD050@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM> <CACA0VUgkRphRLQh%2BFBcCEb=gB=YdjVFEncor64x1qqov7K4%2Bhw@mail.gmail.com> <YTXPR01MB0189374B9DCCB8D0219FA299DD180@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM> <YTXPR01MB0189EF41F4122B0162A76F0DDD180@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>, <CACA0VUjVg6BZc4SarH6UVn1DBrJc7MdfLkmKcbgq0OR1ExwD7Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--_002_YTXPR01MB0189AFA97A8BFE756E6EFE4DDD1B0YTXPR01MB0189CANP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Doug Rabson wrote: >That was actually going to me my next suggestion, honest. Hopefully that f= ixes the >problem, if not its a bug in the Linux client. Yep, the attached patch fixed the problem. I wrote: >I'll come up with a patch that sets the atime bit in the EXCLUSIVE4 Open >reply and see if that changes the Linux client. The attached patch sets the TIMEACCESS bit in the reply for both NFSv4.0 an= d NFSv4.1 and fixes the problem for both cases for a quick test with the Linux client= . (With this bit set in the reply, Linux sets TIMEACCESSSET in the Setattr.) Doug Rabson wrote: >Is the client using EXCLUSIVE4 or EXCLUSIVE4_1 for the open? If its EXCLUS= IVE4_1, i.e. the >mode which allows attribute setting during the open, the = client should use the value of >the supattr_exclcreat attribute (see sectio= n 5.8.1.14 of rfc5661) to figure out what >attributes can be set. In this c= ase, supattr_exclcreat should not include atime which should=20 The FreeBSD NFSv4.1 server does exclude atime from the supattr_exclcreat b= itset and it checks for it set and returns the correct error. However, like NFSv4.0, the code didn't set the TIMEACCESS attribute bit in = the EXCLUSIVE4_1 reply. (The attached little patch fixes this for both NFSv4.0 = and NFSV4.1.) Thanks everyone for your help. I am thinking that storing the create_verifier in an extended attribute for= file systems that support extended attributes is a good idea, since it will allo= w NFSv4.1 clients to avoid following the Open/Exclusive4_1 with a Setattr RPC. Anyone else have an opinion w.r.t. this? (I'll leave this for a future commit, depending on what others think of the= idea.) I will probably commit the attached patch soon, rick ps: Jim, I don't think there is any point in testing the other patch, altho= ugh I suspect it would fix the problem. You could test this one, if you can easily = do it. pss: My only excuse for never doing this is that it is one sentence in an R= FC of several hundred pages;-) --_002_YTXPR01MB0189AFA97A8BFE756E6EFE4DDD1B0YTXPR01MB0189CANP_ Content-Type: application/octet-stream; name="atime2.patch" Content-Description: atime2.patch Content-Disposition: attachment; filename="atime2.patch"; size=476; creation-date="Thu, 20 Apr 2017 23:41:08 GMT"; modification-date="Thu, 20 Apr 2017 23:41:08 GMT" Content-Transfer-Encoding: base64 LS0tIGZzL25mc3NlcnZlci9uZnNfbmZzZHBvcnQuYy5zYXYJMjAxNy0wNC0yMCAxMDo0Nzo1MS40 NDY5ODMwMDAgLTA0MDAKKysrIGZzL25mc3NlcnZlci9uZnNfbmZzZHBvcnQuYwkyMDE3LTA0LTIw IDExOjAzOjUzLjMzOTIyODAwMCAtMDQwMApAQCAtMTQzNiw3ICsxNDM2LDkgQEAgbmZzdm5vX29w ZW4oc3RydWN0IG5mc3J2X2Rlc2NyaXB0ICpuZCwgcwogCQkJCQkJdnB1dChuZHAtPm5pX3ZwKTsK IAkJCQkJCW5kcC0+bmlfdnAgPSBOVUxMOwogCQkJCQkJbmQtPm5kX3JlcHN0YXQgPSBORlNFUlJf Tk9UU1VQUDsKLQkJCQkJfQorCQkJCQl9IGVsc2UKKwkJCQkJCU5GU1NFVEJJVF9BVFRSQklUKGF0 dHJiaXRwLAorCQkJCQkJICAgIE5GU0FUVFJCSVRfVElNRUFDQ0VTUyk7CiAJCQkJfSBlbHNlIHsK IAkJCQkJbmZzcnZfZml4YXR0cihuZCwgbmRwLT5uaV92cCwgbnZhcCwKIAkJCQkJICAgIGFjbHAs IHAsIGF0dHJiaXRwLCBleHApOwo= --_002_YTXPR01MB0189AFA97A8BFE756E6EFE4DDD1B0YTXPR01MB0189CANP_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTXPR01MB0189AFA97A8BFE756E6EFE4DDD1B0>