Skip to content

mgm: FuseServer: some small fixes for Caps

Abhishek Lekshmanan requested to merge wip-caps-concurrency into master

Before starting to refactor Caps towards more lock-free datastructures, just having a couple of small non intrusive fixes that does the following

  • Moving some instances of map.count(key); map.erase(key) with a find call and passing the iterator to erase (the gains would be pretty small, at best O(logn) for an erase as we avoid a second search
  • For dropcaps the set for keeping the keys was replaced with a vector, as we don't seem to use any set like features as this seems to be a temporary place to hold the keys to be deleted.
  • Reuse the return code of erase instead of a count/erase as we seem to only use this as a return flag.
Edited by Abhishek Lekshmanan

Merge request reports