lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00d28fcc-446b-eff6-a5a3-6675216802b9@redhat.com>
Date:   Mon, 27 Mar 2017 13:34:17 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Changpeng Liu <changpeng.liu@...el.com>,
        virtio-dev@...ts.oasis-open.org,
        virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, hch@....de
Cc:     qemu-devel@...gnu.org
Subject: Re: [virtio-dev] [PATCH] virtio-blk: add DISCARD support to
 virtio-blk driver



On 28/03/2017 10:39, Changpeng Liu wrote:
> +	if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) {
> +		q->limits.discard_zeroes_data = 0;

Maybe you could use another feature bit to populate discard_zeroes_data.

Paolo

> +		q->limits.discard_alignment = blk_size;
> +		q->limits.discard_granularity = blk_size;
> +		blk_queue_max_discard_sectors(q, UINT_MAX);
> +		blk_queue_max_discard_segments(q, 1);
> +		queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
> +	}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ