Change in ffilz/nfs-ganesha[next]: MDCACHE - Close an unexport race
From Daniel Gryniewicz <dang@redhat.com>: Daniel Gryniewicz has uploaded this change for review. ( https://review.gerrithub.io/411912 Change subject: MDCACHE - Close an unexport race ...................................................................... MDCACHE - Close an unexport race When unexporting, we have to remove the expmap between the export and it's entries. This involves updating first_export_id. However, lru_run_lane() uses this to get an export for ops. mdcache_unexport() takes a ref on the entry, so that lru_run_lane() will ignore it, but a normal ref doesn't take any locks, so it could update the ref *after* lru_run_lane() has decided do operate on the entry. To fix this, have mdcache_unexport() take an INITIAL ref, which takes the lane lock so it can move the entry toward MRU. This will close the race with lru_run_lane(), which holds the lane lock while getting the export. Change-Id: Ie02ab4c4d0ec94056cafea2ddbdda3275297a043 Signed-off-by: Daniel Gryniewicz <dang@redhat.com> --- M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_export.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/12/411912/1 -- To view, visit https://review.gerrithub.io/411912 To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-MessageType: newchange Gerrit-Change-Id: Ie02ab4c4d0ec94056cafea2ddbdda3275297a043 Gerrit-Change-Number: 411912 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Gryniewicz <dang@redhat.com>
participants (1)
-
GerritHub