ac44337 Ticket 49079: deadlock on cos cache rebuild

Authored and Committed by tbordaz 7 years ago
    Ticket 49079: deadlock on cos cache rebuild
    
    Bug Description:
        To rebuild the cache cos_cache_creation the thread gets cos definitions from backend.
        It means change_lock is held then cos_cache_creation will acquire some backend pages.
    
        A deadlock can happen if cos_post_op is called while backend is locked.
        For example if a bepreop (urp) does an internal update on a cos definition.
        Then the thread holds backend pages, that will be needed by cos_cache_creation,
        and will acquire change_lock for notification of the cos_cache thread
    
    Fix Description:
    
        Let cos cache rebuild thread run without holding change_lock.
        The lock prevents parallel run but a flag can do the same.
    
    https://fedorahosted.org/389/ticket/49079
    
    Reviewed by: William Brown and Ludwig Krispenz (thanks to you both !!)
    
    Platforms tested: F23
    
    Flag Day: no
    
    Doc impact: no