From patchwork Mon Jan 7 19:23:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Pittman X-Patchwork-Id: 10751143 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 E50B191E for ; Mon, 7 Jan 2019 19:23:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4BCA285A5 for ; Mon, 7 Jan 2019 19:23:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9024285F0; Mon, 7 Jan 2019 19:23:57 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 646DC285D5 for ; Mon, 7 Jan 2019 19:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727517AbfAGTX4 (ORCPT ); Mon, 7 Jan 2019 14:23:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40264 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726602AbfAGTX4 (ORCPT ); Mon, 7 Jan 2019 14:23:56 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3DA4888E57; Mon, 7 Jan 2019 19:23:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-125-164.rdu2.redhat.com [10.10.125.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF2E268870; Mon, 7 Jan 2019 19:23:55 +0000 (UTC) From: John Pittman To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, John Pittman Subject: [PATCH] null_blk: enable discard support by default Date: Mon, 7 Jan 2019 14:23:52 -0500 Message-Id: <20190107192352.3129-1-jpittman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 07 Jan 2019 19:23:56 +0000 (UTC) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Support for discard was added to the null_blk driver in 'commit 306eb6b4ad4f ("nullb: support discard")'. For ease of use in benchmarking and target testing, enable this support by default. Signed-off-by: John Pittman --- drivers/block/null_blk_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 62c9654b9ce8..c4a1db0fb336 100644 --- a/drivers/block/null_blk_main.c +++ b/drivers/block/null_blk_main.c @@ -527,6 +527,7 @@ static struct nullb_device *null_alloc_dev(void) dev->zoned = g_zoned; dev->zone_size = g_zone_size; dev->zone_nr_conv = g_zone_nr_conv; + dev->discard = true; return dev; }