All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute
@ 2016-04-01 20:19 Olga Kornievskaia
  2017-01-17 14:33 ` Olga Kornievskaia
  0 siblings, 1 reply; 6+ messages in thread
From: Olga Kornievskaia @ 2016-04-01 20:19 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

Commit 7c2dad99d60c86ec686b3bfdcb787c450a7ea89f
"Don't let the ctime override attribute barriers" introduced a problem
of invalidating the cache when receiving in-order WRITE replies. Because
ctime is no longer checked then attributes are not updated appropriately
and then leads to mismatch of received "before" with what's stored.

Given that sending the wcc attributes is not mandatory (and linux
server doesn't), we can ignore the received "before" ctime. It fixes
the current problem and also help when we receive out-of-order WRITEs.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs3xdr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index 267126d..feca07f 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -732,14 +732,12 @@ static int decode_wcc_attr(struct xdr_stream *xdr, struct nfs_fattr *fattr)
 		goto out_overflow;
 
 	fattr->valid |= NFS_ATTR_FATTR_PRESIZE
-		| NFS_ATTR_FATTR_PRECHANGE
 		| NFS_ATTR_FATTR_PREMTIME
 		| NFS_ATTR_FATTR_PRECTIME;
 
 	p = xdr_decode_size3(p, &fattr->pre_size);
 	p = xdr_decode_nfstime3(p, &fattr->pre_mtime);
 	xdr_decode_nfstime3(p, &fattr->pre_ctime);
-	fattr->pre_change_attr = nfs_timespec_to_change_attr(&fattr->pre_ctime);
 
 	return 0;
 out_overflow:
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute
  2016-04-01 20:19 [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute Olga Kornievskaia
@ 2017-01-17 14:33 ` Olga Kornievskaia
  2017-01-17 16:14   ` Trond Myklebust
  0 siblings, 1 reply; 6+ messages in thread
From: Olga Kornievskaia @ 2017-01-17 14:33 UTC (permalink / raw)
  To: Olga Kornievskaia; +Cc: Trond Myklebust, linux-nfs

Hi Trond,

I'd like bring up this issue again as I was asked again that linux
nfsv3 client experiences poor performance when it receives
out-of-order write rpcs. If a general change to ignore "before" ctime
is not acceptable, what about something that is configurable via a
sysctl perhaps?

On Fri, Apr 1, 2016 at 4:19 PM, Olga Kornievskaia <kolga@netapp.com> wrote:
> Commit 7c2dad99d60c86ec686b3bfdcb787c450a7ea89f
> "Don't let the ctime override attribute barriers" introduced a problem
> of invalidating the cache when receiving in-order WRITE replies. Because
> ctime is no longer checked then attributes are not updated appropriately
> and then leads to mismatch of received "before" with what's stored.
>
> Given that sending the wcc attributes is not mandatory (and linux
> server doesn't), we can ignore the received "before" ctime. It fixes
> the current problem and also help when we receive out-of-order WRITEs.
>
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
>  fs/nfs/nfs3xdr.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
> index 267126d..feca07f 100644
> --- a/fs/nfs/nfs3xdr.c
> +++ b/fs/nfs/nfs3xdr.c
> @@ -732,14 +732,12 @@ static int decode_wcc_attr(struct xdr_stream *xdr, struct nfs_fattr *fattr)
>                 goto out_overflow;
>
>         fattr->valid |= NFS_ATTR_FATTR_PRESIZE
> -               | NFS_ATTR_FATTR_PRECHANGE
>                 | NFS_ATTR_FATTR_PREMTIME
>                 | NFS_ATTR_FATTR_PRECTIME;
>
>         p = xdr_decode_size3(p, &fattr->pre_size);
>         p = xdr_decode_nfstime3(p, &fattr->pre_mtime);
>         xdr_decode_nfstime3(p, &fattr->pre_ctime);
> -       fattr->pre_change_attr = nfs_timespec_to_change_attr(&fattr->pre_ctime);
>
>         return 0;
>  out_overflow:
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute
  2017-01-17 14:33 ` Olga Kornievskaia
@ 2017-01-17 16:14   ` Trond Myklebust
  2017-01-17 16:20     ` Olga Kornievskaia
  0 siblings, 1 reply; 6+ messages in thread
From: Trond Myklebust @ 2017-01-17 16:14 UTC (permalink / raw)
  To: Olga Kornievskaia; +Cc: Olga Kornievskaia, Linux NFS Mailing List

Is there a problem with 4.10-rc?

> On Jan 17, 2017, at 09:33, Olga Kornievskaia <aglo@umich.edu> wrote:
>=20
> Hi Trond,
>=20
> I'd like bring up this issue again as I was asked again that linux
> nfsv3 client experiences poor performance when it receives
> out-of-order write rpcs. If a general change to ignore "before" ctime
> is not acceptable, what about something that is configurable via a
> sysctl perhaps?
>=20
> On Fri, Apr 1, 2016 at 4:19 PM, Olga Kornievskaia <kolga@netapp.com> wrot=
e:
>> Commit 7c2dad99d60c86ec686b3bfdcb787c450a7ea89f
>> "Don't let the ctime override attribute barriers" introduced a problem
>> of invalidating the cache when receiving in-order WRITE replies. Because
>> ctime is no longer checked then attributes are not updated appropriately
>> and then leads to mismatch of received "before" with what's stored.
>>=20
>> Given that sending the wcc attributes is not mandatory (and linux
>> server doesn't), we can ignore the received "before" ctime. It fixes
>> the current problem and also help when we receive out-of-order WRITEs.
>>=20
>> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
>> ---
>> fs/nfs/nfs3xdr.c | 2 --
>> 1 file changed, 2 deletions(-)
>>=20
>> diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
>> index 267126d..feca07f 100644
>> --- a/fs/nfs/nfs3xdr.c
>> +++ b/fs/nfs/nfs3xdr.c
>> @@ -732,14 +732,12 @@ static int decode_wcc_attr(struct xdr_stream *xdr,=
 struct nfs_fattr *fattr)
>>                goto out_overflow;
>>=20
>>        fattr->valid |=3D NFS_ATTR_FATTR_PRESIZE
>> -               | NFS_ATTR_FATTR_PRECHANGE
>>                | NFS_ATTR_FATTR_PREMTIME
>>                | NFS_ATTR_FATTR_PRECTIME;
>>=20
>>        p =3D xdr_decode_size3(p, &fattr->pre_size);
>>        p =3D xdr_decode_nfstime3(p, &fattr->pre_mtime);
>>        xdr_decode_nfstime3(p, &fattr->pre_ctime);
>> -       fattr->pre_change_attr =3D nfs_timespec_to_change_attr(&fattr->p=
re_ctime);
>>=20
>>        return 0;
>> out_overflow:
>> --
>> 1.8.3.1
>>=20
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>=20


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute
  2017-01-17 16:14   ` Trond Myklebust
@ 2017-01-17 16:20     ` Olga Kornievskaia
  2017-01-17 16:23       ` Trond Myklebust
  0 siblings, 1 reply; 6+ messages in thread
From: Olga Kornievskaia @ 2017-01-17 16:20 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Olga Kornievskaia, Linux NFS Mailing List

Hi Trond,

Honestly, I haven=92t retried the 4.10-rc. I haven=92t recalled any =
patches that dealt with out of order RPCs and attributes and therefore =
assumed it was still an issue. I will recheck the 4.10-rc if you think =
the issue should have been addressed.


> On Jan 17, 2017, at 11:14 AM, Trond Myklebust =
<trondmy@primarydata.com> wrote:
>=20
> Is there a problem with 4.10-rc?
>=20
>> On Jan 17, 2017, at 09:33, Olga Kornievskaia <aglo@umich.edu> wrote:
>>=20
>> Hi Trond,
>>=20
>> I'd like bring up this issue again as I was asked again that linux
>> nfsv3 client experiences poor performance when it receives
>> out-of-order write rpcs. If a general change to ignore "before" ctime
>> is not acceptable, what about something that is configurable via a
>> sysctl perhaps?
>>=20
>> On Fri, Apr 1, 2016 at 4:19 PM, Olga Kornievskaia <kolga@netapp.com> =
wrote:
>>> Commit 7c2dad99d60c86ec686b3bfdcb787c450a7ea89f
>>> "Don't let the ctime override attribute barriers" introduced a =
problem
>>> of invalidating the cache when receiving in-order WRITE replies. =
Because
>>> ctime is no longer checked then attributes are not updated =
appropriately
>>> and then leads to mismatch of received "before" with what's stored.
>>>=20
>>> Given that sending the wcc attributes is not mandatory (and linux
>>> server doesn't), we can ignore the received "before" ctime. It fixes
>>> the current problem and also help when we receive out-of-order =
WRITEs.
>>>=20
>>> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
>>> ---
>>> fs/nfs/nfs3xdr.c | 2 --
>>> 1 file changed, 2 deletions(-)
>>>=20
>>> diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
>>> index 267126d..feca07f 100644
>>> --- a/fs/nfs/nfs3xdr.c
>>> +++ b/fs/nfs/nfs3xdr.c
>>> @@ -732,14 +732,12 @@ static int decode_wcc_attr(struct xdr_stream =
*xdr, struct nfs_fattr *fattr)
>>>               goto out_overflow;
>>>=20
>>>       fattr->valid |=3D NFS_ATTR_FATTR_PRESIZE
>>> -               | NFS_ATTR_FATTR_PRECHANGE
>>>               | NFS_ATTR_FATTR_PREMTIME
>>>               | NFS_ATTR_FATTR_PRECTIME;
>>>=20
>>>       p =3D xdr_decode_size3(p, &fattr->pre_size);
>>>       p =3D xdr_decode_nfstime3(p, &fattr->pre_mtime);
>>>       xdr_decode_nfstime3(p, &fattr->pre_ctime);
>>> -       fattr->pre_change_attr =3D =
nfs_timespec_to_change_attr(&fattr->pre_ctime);
>>>=20
>>>       return 0;
>>> out_overflow:
>>> --
>>> 1.8.3.1
>>>=20
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>=20
>=20


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute
  2017-01-17 16:20     ` Olga Kornievskaia
@ 2017-01-17 16:23       ` Trond Myklebust
       [not found]         ` <DAAF9132-C732-427E-88F0-321679D07750@netapp.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Trond Myklebust @ 2017-01-17 16:23 UTC (permalink / raw)
  To: Olga Kornievskaia; +Cc: Olga Kornievskaia, Linux NFS Mailing List

DQo+IE9uIEphbiAxNywgMjAxNywgYXQgMTE6MjAsIE9sZ2EgS29ybmlldnNrYWlhIDxrb2xnYUBu
ZXRhcHAuY29tPiB3cm90ZToNCj4gDQo+IEhpIFRyb25kLA0KPiANCj4gSG9uZXN0bHksIEkgaGF2
ZW7igJl0IHJldHJpZWQgdGhlIDQuMTAtcmMuIEkgaGF2ZW7igJl0IHJlY2FsbGVkIGFueSBwYXRj
aGVzIHRoYXQgZGVhbHQgd2l0aCBvdXQgb2Ygb3JkZXIgUlBDcyBhbmQgYXR0cmlidXRlcyBhbmQg
dGhlcmVmb3JlIGFzc3VtZWQgaXQgd2FzIHN0aWxsIGFuIGlzc3VlLiBJIHdpbGwgcmVjaGVjayB0
aGUgNC4xMC1yYyBpZiB5b3UgdGhpbmsgdGhlIGlzc3VlIHNob3VsZCBoYXZlIGJlZW4gYWRkcmVz
c2VkLg0KPiANCj4gDQoNCkkgd291bGQgYXNzdW1lIHRoYXQgY29tbWl0IGNhMGRhYTI3N2FjYSAo
Ik5GUzogQ2FjaGUgYWdncmVzc2l2ZWx5IHdoZW4gZmlsZSBpcyBvcGVuIGZvciB3cml0aW5n4oCd
KSBzaG91bGQgaGF2ZSBoZWxwZWQuIFBsZWFzZSBsZXQgbWUga25vdyBpZiB0aGF0IGlzIG5vdCB0
aGUgY2FzZS4NCg0KPj4gT24gSmFuIDE3LCAyMDE3LCBhdCAxMToxNCBBTSwgVHJvbmQgTXlrbGVi
dXN0IDx0cm9uZG15QHByaW1hcnlkYXRhLmNvbT4gd3JvdGU6DQo+PiANCj4+IElzIHRoZXJl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5mby5odG1sDQo+Pj4gDQo+PiANCj4gDQoNCg==


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute
       [not found]             ` <8C661DEF-5BD9-46F4-AD68-E68C3FF720C1@netapp.com>
@ 2017-01-20 15:41               ` Olga Kornievskaia
  0 siblings, 0 replies; 6+ messages in thread
From: Olga Kornievskaia @ 2017-01-20 15:41 UTC (permalink / raw)
  To: Olga Kornievskaia; +Cc: Trond Myklebust, Linux NFS Mailing List

On Tue, Jan 17, 2017 at 11:38 AM, Olga Kornievskaia <kolga@netapp.com> wrote:
>
> On Jan 17, 2017, at 11:36 AM, Trond Myklebust <trondmy@primarydata.com>
> wrote:
>
>
> On Jan 17, 2017, at 11:34, Olga Kornievskaia <kolga@netapp.com> wrote:
>
>
> On Jan 17, 2017, at 11:23 AM, Trond Myklebust <trondmy@primarydata.com>
> wrote:
>
> ca0daa277aca
>
>
> The problem is on v3 is this patch suppose to help ?
>
>
> It is protocol agnostic.
>
>
> Ok, I will test !

My testing shows no invalidations with the patch where prior to that
it would do so. Thanks Trond.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-20 15:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 20:19 [PATCH 1/1] NFSv3: Ignore wcc before ctime attribute Olga Kornievskaia
2017-01-17 14:33 ` Olga Kornievskaia
2017-01-17 16:14   ` Trond Myklebust
2017-01-17 16:20     ` Olga Kornievskaia
2017-01-17 16:23       ` Trond Myklebust
     [not found]         ` <DAAF9132-C732-427E-88F0-321679D07750@netapp.com>
     [not found]           ` <B4620365-C09B-4E12-8B3A-C5AD922AD773@primarydata.com>
     [not found]             ` <8C661DEF-5BD9-46F4-AD68-E68C3FF720C1@netapp.com>
2017-01-20 15:41               ` Olga Kornievskaia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.