Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: avert data races on the nodeRef map
Under load, a filesystem that attempts to explicitly invalidate nodes via the InvalidateEntry and InvalidateNodeAttr methods of the server can race on access to the server's nodeRef map. This leads to panics when the runtime detects it. According to the comments on the server, the "meta" lock is supposed to be held when accessing this map; however the Invalidate* methods do not do this. The obvious fix of adding locks there does not quite work, since in some cases the server already holds that lock (vending a request to the FS) making the upcall a deadlock. This patch addresses the problem by introducing a new lock specifically for the nodeRef map, and ensuring it is explicitly acquired by the methods that access that map.
- Loading branch information