'Verify the metadata\'s name value matches what we think the object is
named.
:raises DiskFileCollision: if the metadata stored name does not match
the referenced name of the file
:raises DiskFileNotExist: if the object has expired
:raises DiskFileQuarantined: if data inconsistencies were detected
between the metadata and the file-system
metadata'

def _verify_data_file(self, fp):

    try:
        mname = self._metadata['name']
    except KeyError:
        raise self._quarantine(self._name, 'missing    name    metadata')
    else:
        if (mname != self._name):
            raise DiskFileCollision('Client    path    does    not    match    path    stored    in    object    metadata')
    try:
        x_delete_at = int(self._metadata['X-Delete-At'])
    except KeyError:
        pass
    except ValueError:
        raise self._quarantine(self._name, ('bad    metadata    x-delete-at    value    %s' % self._metadata['X-Delete-At']))
    else:
        if (x_delete_at <= time.time()):
            raise DiskFileNotExist('Expired')
    try:
        metadata_size = int(self._metadata['Content-Length'])
    except KeyError:
        raise self._quarantine(self._name, 'missing    content-length    in    metadata')
    except ValueError:
        raise self._quarantine(self._name, ('bad    metadata    content-length    value    %s' % self._metadata['Content-Length']))
    try:
        fp.seek(0, 2)
        obj_size = fp.tell()
        fp.seek(0, 0)
    except OSError as err:
        raise self._quarantine(self._name, ('not    stat-able:    %s' % err))
    if (obj_size != metadata_size):
        raise self._quarantine(self._name, ('metadata    content-length    %s    does    not    match    actual    object    size    %s' % (metadata_size, obj_size)))
    return fp
