rbd: some helper functions for merge-diff

Signed-off-by: MingXin Liu <mingxinliu@ubuntukylin.com>
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>