From patchwork Thu Jan 24 17:23:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Garzarella X-Patchwork-Id: 10779673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3CBD213B5 for ; Thu, 24 Jan 2019 17:34:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A846C31126 for ; Thu, 24 Jan 2019 17:34:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9888C311B8; Thu, 24 Jan 2019 17:34:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 410B731126 for ; Thu, 24 Jan 2019 17:34:03 +0000 (UTC) Received: from localhost ([127.0.0.1]:57513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmit8-0000lx-8O for patchwork-qemu-devel@patchwork.kernel.org; Thu, 24 Jan 2019 12:34:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmisJ-0000OL-R5 for qemu-devel@nongnu.org; Thu, 24 Jan 2019 12:33:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmisH-0006IP-S0 for qemu-devel@nongnu.org; Thu, 24 Jan 2019 12:33:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35684) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmisB-0006BY-9D; Thu, 24 Jan 2019 12:33:03 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF3DF8E3EA; Thu, 24 Jan 2019 17:23:31 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-117-40.ams2.redhat.com [10.36.117.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0E067D2E5; Thu, 24 Jan 2019 17:23:24 +0000 (UTC) From: Stefano Garzarella To: qemu-devel@nongnu.org Date: Thu, 24 Jan 2019 18:23:21 +0100 Message-Id: <20190124172323.230296-1-sgarzare@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 24 Jan 2019 17:23:31 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 0/2] virtio-blk: add DISCARD and WRITE ZEROES features X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series adds the support of DISCARD and WRITE ZEROES commands and extends the virtio-blk-test to test WRITE_ZEROES command when the feature is enabled. RFC because I'm not sure if the "case" conditions that I used in virtio-blk.c is clean enough. This series requires the new virtio headers from linux v5.0-rc1 already imported by Paolo: Based-on: <20190104082731.24967-1-pbonzini@redhat.com> Thanks, Stefano Stefano Garzarella (2): virtio-blk: add DISCARD and WRITE ZEROES features tests/virtio-blk: add test for WRITE_ZEROES command hw/block/virtio-blk.c | 79 +++++++++++++++++++++++++++++++++++++++++ tests/virtio-blk-test.c | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+)