• Nils Goroll's avatar
    Handle a race between stvfe_mutate() and stvfe_dskoc_fco() · 36aee12b
    Nils Goroll authored
    In stvfe_dskoc_fco() we change the oc's stevedore to memstv only
    _after_ we have taken a refernce via fellow_cache_obj_get() and thus
    potentially put the fco onto the lru list.
    
    This order is important, because other requests racing on
    stvfe_dskoc_fco() need to also go through fellow_cache_obj_get() until
    the memstv object has been established for real.
    
    Yet this opens a window for a window where an fco is on LRU with
    oc->stobj->stevedore still set to dskstv, even without dirty reads,
    and even more so with dirty reads.
    
    Because any additional synchronization here could kill performance, we
    handle this outdated read in stvfe_mutate by not touching the object
    (yet). It will be hit the next time we iterate the LRU list.
    
    Fixes #13, hopefully.
    36aee12b
Name
Last commit
Last update
LICENSES Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
COPYING Loading commit data...
INSTALL.rst Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
bootstrap Loading commit data...
configure.ac Loading commit data...