Fix buffer cache deadlocks by splitting dirty buffers into two categories: