Patches from HEAD~7

also patch inlining failed in call to 'notify_mode…
…m_cache_flush_done'