'Determine RBD features supported by our version of librbd.'

def _get_rbd_support(self):

    old_format = True
    features = 0
    if self._supports_layering:
        old_format = False
        features |= self.rbd.RBD_FEATURE_LAYERING
    if self._supports_stripingv2:
        old_format = False
        features |= self.rbd.RBD_FEATURE_STRIPINGV2
    if CONF.backup_ceph_image_journals:
        if (self._supports_exclusive_lock and self._supports_journaling):
            old_format = False
            features |= (self.rbd.RBD_FEATURE_EXCLUSIVE_LOCK | self.rbd.RBD_FEATURE_JOURNALING)
        else:
            LOG.error('RBD    journaling    not    supported    -    unable    to    support    per    image    mirroring    in    backup    pool')
            raise exception.BackupInvalidCephArgs(_('Image    Journaling    set    but    RBD    backend    does    not    support    journaling'))
    return (old_format, features)
