willscott / go-nfs

golang NFSv3 server
Apache License 2.0
701 stars 76 forks source link

Fix/invalidate on remove #120

Closed willscott closed 10 months ago

willscott commented 10 months ago

118 introduced the concept of handle invalidation, such that a handle involved in a rename would become stale if attempted to be used after the rename.

This extends that semantic to be also true on deletion.

willscott commented 10 months ago
willscott commented 10 months ago

@DUOLabs333 - can you check if this set of updates works for your use case?

in particular, for the test to work I believe the correct expectation is to invalidate the handle of the removed file, rather than that of the containing directory as we had before. The client i'm using in the test was looking at the mtime of the directory to recognize that there's been a change at that level, which seems to indicate an expectation that the containing directory handle does remain valid across renames within it.

DUOLabs333 commented 10 months ago

It seems fine to me.