def is_on_filesystem(entry, filesystem):
    """
    Check if a certain element is on a certain type of filesystem
    :param entry: a dfvfs PathSpec object
    :param filesystem: dfvfs type indicator string
    :return: True if the specified filesystem is somewhere in the path-chain of the element
    """
    path = entry
    while True:
        if path.type_indicator == filesystem:
            return True
        if path.parent:
            path = path.parent
        else:
            return False