Hi Trond,
This is a different question but is related to the attribute handling.
What I see in v4, is that say the client received a reply to the OPEN
with before and after change_attr values for the directory. We check
if the before value is the same as what we have in the cache and if
it's not then we invalidate the directory attributes.
It seems that we don't have similar check for the v3. If in v3, the
server returned a before that was different from what could be seen on
the network trace as the before for the directory, it does not trigger
invalidation. Is this expected because it's v3 or is this a bug?
T24gRnJpLCAyMDE4LTA3LTIwIGF0IDE0OjQ0IC0wNDAwLCBPbGdhIEtvcm5pZXZza2FpYSB3cm90
ZToNCj4gSGkgVHJvbmQsDQo+IA0KPiBUaGlzIGlzIGEgZGlmZmVyZW50IHF1ZXN0aW9uIGJ1dCBp
cyByZWxhdGVkIHRvIHRoZSBhdHRyaWJ1dGUNCj4gaGFuZGxpbmcuDQo+IA0KPiBXaGF0IEkgc2Vl
IGluIHY0LCBpcyB0aGF0IHNheSB0aGUgY2xpZW50IHJlY2VpdmVkIGEgcmVwbHkgdG8gdGhlIE9Q
RU4NCj4gd2l0aCBiZWZvcmUgYW5kIGFmdGVyIGNoYW5nZV9hdHRyIHZhbHVlcyBmb3IgdGhlIGRp
cmVjdG9yeS4gV2UgY2hlY2sNCj4gaWYgdGhlIGJlZm9yZSB2YWx1ZSBpcyB0aGUgc2FtZSBhcyB3
aGF0IHdlIGhhdmUgaW4gdGhlIGNhY2hlIGFuZCBpZg0KPiBpdCdzIG5vdCB0aGVuIHdlIGludmFs
aWRhdGUgdGhlIGRpcmVjdG9yeSBhdHRyaWJ1dGVzLg0KPiANCj4gSXQgc2VlbXMgdGhhdCB3ZSBk
b24ndCBoYXZlIHNpbWlsYXIgY2hlY2sgZm9yIHRoZSB2My4gSWYgaW4gdjMsIHRoZQ0KPiBzZXJ2
ZXIgcmV0dXJuZWQgYSBiZWZvcmUgdGhhdCB3YXMgZGlmZmVyZW50IGZyb20gd2hhdCBjb3VsZCBi
ZSBzZWVuDQo+IG9uDQo+IHRoZSBuZXR3b3JrIHRyYWNlIGFzIHRoZSBiZWZvcmUgZm9yIHRoZSBk
aXJlY3RvcnksIGl0IGRvZXMgbm90DQo+IHRyaWdnZXINCj4gaW52YWxpZGF0aW9uLiBJcyB0aGlz
IGV4cGVjdGVkIGJlY2F1c2UgaXQncyB2MyBvciBpcyB0aGlzIGEgYnVnPw0KDQpEb2Vzbid0IHRo
ZSBjYWxsIHRvICBuZnNfcG9zdF9vcF91cGRhdGVfaW5vZGUoZGlyLCBkYXRhLT5yZXMuZGlyX2F0
dHIpDQppbiBuZnMzX2RvX2NyZWF0ZSgpIGRvIHRoZSByaWdodCB0aGluZz8NCg0KLS0gDQpUcm9u
ZCBNeWtsZWJ1c3QNCkxpbnV4IE5GUyBjbGllbnQgbWFpbnRhaW5lciwgSGFtbWVyc3BhY2UNCnRy
b25kLm15a2xlYnVzdEBoYW1tZXJzcGFjZS5jb20NCg0K
On Fri, Jul 20, 2018 at 2:50 PM, Trond Myklebust
<[email protected]> wrote:
> On Fri, 2018-07-20 at 14:44 -0400, Olga Kornievskaia wrote:
>> Hi Trond,
>>
>> This is a different question but is related to the attribute
>> handling.
>>
>> What I see in v4, is that say the client received a reply to the OPEN
>> with before and after change_attr values for the directory. We check
>> if the before value is the same as what we have in the cache and if
>> it's not then we invalidate the directory attributes.
>>
>> It seems that we don't have similar check for the v3. If in v3, the
>> server returned a before that was different from what could be seen
>> on
>> the network trace as the before for the directory, it does not
>> trigger
>> invalidation. Is this expected because it's v3 or is this a bug?
>
> Doesn't the call to nfs_post_op_update_inode(dir, data->res.dir_attr)
> in nfs3_do_create() do the right thing?
Dah, I knew I was missing something. Thanks.