[ARVADOS] updated: f40a1843030dea9c6dc65df7a1c3b0d507b95231
Git user
git at public.curoverse.com
Wed Sep 21 18:10:57 EDT 2016
Summary of changes:
services/fuse/arvados_fuse/__init__.py | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
via f40a1843030dea9c6dc65df7a1c3b0d507b95231 (commit)
from c366a7dc2ef2b056d4c132f85096a10f5defb759 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f40a1843030dea9c6dc65df7a1c3b0d507b95231
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Sep 21 18:10:54 2016 -0400
10117: The check needs to be between clear() and the deletion from entries.
diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index 2afeae7..463a5f7 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -151,6 +151,14 @@ class InodeCache(object):
_logger.debug("InodeCache sent kernel invalidate inode %i", obj.inode)
return
obj.clear()
+
+ # The llfuse lock is released in del_entry(), which is called by
+ # Directory.clear(). While the llfuse lock is released, it can happen
+ # that a reentrant call removes this entry before this call gets to it.
+ # Ensure that the entry is still valid before trying to remove it.
+ if obj.inode not in self._entries:
+ return
+
self._total -= obj.cache_size
del self._entries[obj.inode]
if obj.cache_uuid:
@@ -166,16 +174,7 @@ class InodeCache(object):
for ent in self._entries.values():
if self._total < self.cap or len(self._entries) < self.min_entries:
break
- # The llfuse lock is released in del_entry(), which is called
- # when clearing the contents of a directory. While the llfuse
- # lock is released, it can happen that cap_cache is called
- # reentrantly. It is possible for the reentrant call to remove
- # entries this call hasn't gotten to yet. Ensure that the
- # entry is still valid before trying to remove it.
- if ent.inode in self._entries:
- self._remove(ent, True)
- else:
- break
+ self._remove(ent, True)
def manage(self, obj):
if obj.persisted():
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list