rbd: some helper functions for merge-diff