def _zero_volume(path, volume_size):
    """Write zeros over the specified path

    :param path: logical volume path
    :param size: number of zeros to write
    """
    bs = units.Mi
    direct_flags = ('oflag=direct',)
    sync_flags = ()
    remaining_bytes = volume_size

    # The loop efficiently writes zeros using dd,
    # and caters for versions of dd that don't have
    # the easier to use iflag=count_bytes option.
    while remaining_bytes:
        zero_blocks = remaining_bytes / bs
        seek_blocks = (volume_size - remaining_bytes) / bs
        zero_cmd = ('dd', 'bs=%s' % bs,
                    'if=/dev/zero', 'of=%s' % path,
                    'seek=%s' % seek_blocks, zero_blocks % 'count=%s')
        zero_cmd += direct_flags
        zero_cmd += sync_flags
        if zero_blocks:
            utils.execute(*zero_cmd, run_as_root=True)
        remaining_bytes %= bs
        bs /= units.Ki  # Limit to 3 iterations
        # Use O_DIRECT with initial block size and fdatasync otherwise
        direct_flags = ()
        sync_flags = ('conv=fdatasync',)
dataset/ETHPy150Open openstack/nova/nova/virt/libvirt/storage/lvm.py/_zero_volume/swapped operands of `%`