NFSv3: Ignore wcc before ctime attribute
Subsystems (2)
PATCH 1/1 NFSv3: Ignore wcc before ctime attribute
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.
--- fs/nfs/nfs3xdr.c | 2 -- 1 file changed, 2 deletions(-)
fs/nfs/nfs3xdr.c +0 -2
@@ -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:
Signature · 1 line
1.8.3.1
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?
Quoted 41 lines · Olga Kornievskaia
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 <[email protected]>--- fs/nfs/nfs3xdr.c | 2 -- 1 file changed, 2 deletions(-)fs/nfs/nfs3xdr.c +0
-3@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Is there a problem with 4.10-rc?
Quoted 11 lines · Olga Kornievskaia
=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 <[email protected]> wrot=
e:
Quoted 12 lines
Quoted 12 lines
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. =20Signed-off-by Olga Kornievskaia <[email protected]>---
Quoted 8 lines
fs/nfs/nfs3xdr.c static int decode_wcc_attr(struct xdr_stream *xdr,=
Quoted 8 lines
fs/nfs/nfs3xdr.c| 2 --1 file changed, 2 deletions(-)=20
fs/nfs/nfs3xdr.c +0
-0@@ -732,14 +732,12 @@ static int decode_wcc_attr(struct xdr_stream *xdr,=
struct nfs_fattr *fattr)
Quoted 11 lines
Quoted 11 lines
fs/nfs/nfs3xdr.c +0
-0goto 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);
Quoted 11 lines
Quoted 10 lines
=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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html=20
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.
Quoted 1 line
On Jan 17, 2017, at 11:14 AM, Trond Myklebust =
Quoted 14 lines · <[email protected]> wrote:
=20
Is there a problem with 4.10-rc?
=20Quoted 11 lines · Olga Kornievskaia
=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 <[email protected]> =
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Commit
7c2dad99d60c86ec686b3bfdcb787c450a7ea89f
"Don't let the ctime override attribute barriers" introduced a =
problem
Quoted 1 line
Quoted 1 line
Quoted 1 line
of invalidating the cache when receiving in-order WRITE replies. =
Because
Quoted 1 line
Quoted 1 line
Quoted 1 line
ctime is no longer checked then attributes are not updated =
appropriately
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
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.
Quoted 11 lines
Quoted 11 lines
fs/nfs/nfs3xdr.c static int decode_wcc_attr(struct xdr_stream =
Quoted 11 lines
=20
Signed-off-by Olga Kornievskaia <[email protected]>---
fs/nfs/nfs3xdr.c| 2 --1 file changed, 2 deletions(-)=20
fs/nfs/nfs3xdr.c +0
-0@@ -732,14 +732,12 @@ static int decode_wcc_attr(struct xdr_stream =
*xdr, struct nfs_fattr *fattr)
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
fs/nfs/nfs3xdr.c +0
-0goto 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);
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
=20
return 0;
out_overflow:
--
1.8.3.1
=20
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html=20
=20
DQo+IE9uIEphbiAxNywgMjAxNywgYXQgMTE6MjAsIE9sZ2EgS29ybmlldnNrYWlhIDxrb2xnYUBu ZXRhcHAuY29tPiB3cm90ZToNCj4gDQo+IEhpIFRyb25kLA0KPiANCj4gSG9uZXN0bHksIEkgaGF2 ZW7igJl0IHJldHJpZWQgdGhlIDQuMTAtcmMuIEkgaGF2ZW7igJl0IHJlY2FsbGVkIGFueSBwYXRj aGVzIHRoYXQgZGVhbHQgd2l0aCBvdXQgb2Ygb3JkZXIgUlBDcyBhbmQgYXR0cmlidXRlcyBhbmQg dGhlcmVmb3JlIGFzc3VtZWQgaXQgd2FzIHN0aWxsI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cGVjX3RvX2NoYW5nZV9hdHRyKCZmYXR0 ci0+cHJlX2N0aW1lKTsNCj4+Pj4gDQo+Pj4+ICAgICAgcmV0dXJuIDA7DQo+Pj4+IG91dF9vdmVy ZmxvdzoNCj4+Pj4gLS0NCj4+Pj4gMS44LjMuMQ0KPj4+PiANCj4+Pj4gLS0NCj4+Pj4gVG8gdW5z dWJzY3JpYmUgZnJvbSB0aGlzIGxpc3Q6IHNlbmQgdGhlIGxpbmUgInVuc3Vic2NyaWJlIGxpbnV4 LW5mcyIgaW4NCj4+Pj4gdGhlIGJvZHkgb2YgYSBtZXNzYWdlIHRvIG1ham9yZG9tb0B2Z2VyLmtl cm5lbC5vcmcNCj4+Pj4gTW9yZSBtYWpvcmRvbW8gaW5mbyBhdCAgaHR0cDovL3ZnZXIua2VybmVs Lm9yZy9tYWpvcmRvbW8taW5mby5odG1sDQo+Pj4gDQo+PiANCj4gDQoNCg==
Quoted 14 lines · Olga Kornievskaia
On Jan 17, 2017, at 11:36 AM, Trond Myklebust <[email protected]> wrote:
On Jan 17, 2017, at 11:34, Olga Kornievskaia <[email protected]> wrote:
On Jan 17, 2017, at 11:23 AM, Trond Myklebust <[email protected]> wrote:
ca0daa277aca
Quoted 7 lines
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.