From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45AABECAAD8 for ; Fri, 23 Sep 2022 15:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663946116; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BQs86e66usAKDkcjRHtyfundQhEH+w2h6NzVw5rAGbc=; b=AqJc8nRCIhVBg4zFLLhZC8pr0C07ZxKbMNVxPUi1N84zKxsk0JwPUq+9JbCybb9yf0uK/u x6uuYTvS7UcTxBcWSGd0deAClJZWqGHPuVpw49GAykfz06zcg+6uFjukqbk5n1Y+uI3L5K 9eGUCjFKzdGyVN5iHbiAL/uuh5HrX2U= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-35-LtAGg5gZP069U9U8l0rjzQ-1; Fri, 23 Sep 2022 11:15:14 -0400 X-MC-Unique: LtAGg5gZP069U9U8l0rjzQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B6B4F185A7AA; Fri, 23 Sep 2022 15:15:12 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E9C61415138; Fri, 23 Sep 2022 15:15:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D79CE19465B6; Fri, 23 Sep 2022 15:15:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 272AD19465A4 for ; Fri, 23 Sep 2022 15:15:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 173D2492B13; Fri, 23 Sep 2022 15:15:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DAE6F492B12 for ; Fri, 23 Sep 2022 15:15:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BDFF5801231 for ; Fri, 23 Sep 2022 15:15:08 +0000 (UTC) Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-187-PehtI96oMKu3C5iR3Kx3ow-1; Fri, 23 Sep 2022 11:15:07 -0400 X-MC-Unique: PehtI96oMKu3C5iR3Kx3ow-1 Received: by mail-qk1-f197.google.com with SMTP id az15-20020a05620a170f00b006cece4cd0beso200583qkb.22 for ; Fri, 23 Sep 2022 08:15:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=i/7qErjHQwpjdxeuxG56UOY53/Pb3ceXUixswzrpqTk=; b=7n0PQD2K5AUcHO1SQvyMXTnFb9rceVpBOeTSxvSzMiO98Dgz+ouEZZC0X64GNNVs92 ESGtnPMKu7pNwsuYXB+VBdn9l9EhwjEH7LgZyHhZ+ouDj4cWgzzsFb/WGkMSjzBaMj0/ b1LhYcRChoHddN+Bo3EVKii4LV2eS4sh3VWuvro+ahYxnE1IFqEriAO1OI64TPh13jDI gvKRn1xxF/2YDaLekbqN4Ahv82FXPg4fETLagABdYyaLpRh5/o4krg2NiCs5Ge4dA+S1 UtKlMx/XStMibgPC5K6aCInoujyS87Russ55DmVLgLirDMJlrr+jefyucQFMoMRY2MH8 5r6Q== X-Gm-Message-State: ACrzQf3zfSoXl7C7KLd0KcYn+yjQ5RuvKGy2nWgWVifMcgPUudl1Q5jp HlxBLOZw5N2ZyyD5eT2ibA0qOVNJaYSGNrlWemMnNZJ8OGwPX+Lh+jcGIXrlmY2sNZ0RKo67izM I+jPQ8CPqxHWtxw== X-Received: by 2002:a05:6214:76b:b0:4ac:be62:d2e5 with SMTP id f11-20020a056214076b00b004acbe62d2e5mr7176236qvz.91.1663946106769; Fri, 23 Sep 2022 08:15:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Jg5JqThdy0P5kS2uSLUoQ3+kfdp9Ppg4QGXjxFRDk5XYyybGVmtH43Lh/lTr6N1EDYoCkpg== X-Received: by 2002:a05:6214:76b:b0:4ac:be62:d2e5 with SMTP id f11-20020a056214076b00b004acbe62d2e5mr7176213qvz.91.1663946106592; Fri, 23 Sep 2022 08:15:06 -0700 (PDT) Received: from localhost (pool-68-160-173-162.bstnma.fios.verizon.net. [68.160.173.162]) by smtp.gmail.com with ESMTPSA id g12-20020ac8468c000000b0035cb9531851sm5432876qto.65.2022.09.23.08.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:15:06 -0700 (PDT) Date: Fri, 23 Sep 2022 11:15:05 -0400 From: Mike Snitzer To: Sarthak Kukreti Message-ID: References: <20220915164826.1396245-1-sarthakkukreti@google.com> <20220915164826.1396245-2-sarthakkukreti@google.com> MIME-Version: 1.0 In-Reply-To: <20220915164826.1396245-2-sarthakkukreti@google.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Subject: Re: [dm-devel] [PATCH RFC 1/8] block: Introduce provisioning primitives X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , Gwendal Grignou , Theodore Ts'o , "Michael S . Tsirkin" , Jason Wang , Bart Van Assche , Mike Snitzer , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, dm-devel@redhat.com, Andreas Dilger , Daniil Lunev , Stefan Hajnoczi , Paolo Bonzini , linux-ext4@vger.kernel.org, Evan Green , Alasdair Kergon Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, Sep 15 2022 at 12:48P -0400, Sarthak Kukreti wrote: > From: Sarthak Kukreti > > Introduce block request REQ_OP_PROVISION. The intent of this request > is to request underlying storage to preallocate disk space for the given > block range. Block device that support this capability will export > a provision limit within their request queues. > > Signed-off-by: Sarthak Kukreti > --- > block/blk-core.c | 5 ++++ > block/blk-lib.c | 55 +++++++++++++++++++++++++++++++++++++++ > block/blk-merge.c | 17 ++++++++++++ > block/blk-settings.c | 19 ++++++++++++++ > block/blk-sysfs.c | 8 ++++++ > block/bounce.c | 1 + > include/linux/bio.h | 6 +++-- > include/linux/blk_types.h | 5 +++- > include/linux/blkdev.h | 16 ++++++++++++ > 9 files changed, 129 insertions(+), 3 deletions(-) > > diff --git a/block/blk-settings.c b/block/blk-settings.c > index 8bb9eef5310e..be79ad68b330 100644 > --- a/block/blk-settings.c > +++ b/block/blk-settings.c > @@ -57,6 +57,7 @@ void blk_set_default_limits(struct queue_limits *lim) > lim->misaligned = 0; > lim->zoned = BLK_ZONED_NONE; > lim->zone_write_granularity = 0; > + lim->max_provision_sectors = 0; > } > EXPORT_SYMBOL(blk_set_default_limits); > > @@ -81,6 +82,7 @@ void blk_set_stacking_limits(struct queue_limits *lim) > lim->max_dev_sectors = UINT_MAX; > lim->max_write_zeroes_sectors = UINT_MAX; > lim->max_zone_append_sectors = UINT_MAX; > + lim->max_provision_sectors = UINT_MAX; > } > EXPORT_SYMBOL(blk_set_stacking_limits); > Please work through the blk_stack_limits() implementation too (simple min_not_zero?). -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A0E6C6FA82 for ; Fri, 23 Sep 2022 15:16:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230054AbiIWPPc (ORCPT ); Fri, 23 Sep 2022 11:15:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbiIWPPT (ORCPT ); Fri, 23 Sep 2022 11:15:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D4E940E12 for ; Fri, 23 Sep 2022 08:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663946108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i/7qErjHQwpjdxeuxG56UOY53/Pb3ceXUixswzrpqTk=; b=bFBFyrGJUWMRmMxQa1IWFql0ZOi36fAqmXNFYBD2AqxN0IGNlLlB6ZsBVYjErT8abruYl4 hs8yrfeK/BXujeLGn3BX+RPGUGW5sx5lfESinS/GuarSlOoYTJ65+S6z6H3uk1OtnZCeWo onUxdw3ygOUJUFcp0wQi3kjVr5agmE8= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-393-iZbvzTXaNQe2-E0RKUUTvQ-1; Fri, 23 Sep 2022 11:15:07 -0400 X-MC-Unique: iZbvzTXaNQe2-E0RKUUTvQ-1 Received: by mail-qt1-f200.google.com with SMTP id fe14-20020a05622a4d4e00b0035cc376b1d5so173732qtb.4 for ; Fri, 23 Sep 2022 08:15:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=i/7qErjHQwpjdxeuxG56UOY53/Pb3ceXUixswzrpqTk=; b=dPKzJ13D5PapzHwQa/O1pn6tzA2zerzwgdBGUyiZa+pgt1Ff1+c5ZcVqhGxpqr5ziL VE4zPurqIYrsT0eZX01iKZ9j0YMx7/gy738FpuvGxBz5UVt/6IGDTKGWXM2635/Gns4s WMnShXY+TYIoA8smNTQLTo0n+ehm6SIDc4O3ohwjD1wBUBu7Ch2b5DHlkv7TZXLF0DZo GBLPD/DHHLJuixVUrwETNkGPRvalP8iEBprzKBR4w8rF9TzfwKpnfBP8AffQFj0GX8vO JUmyG3y1A8DKo9n1seOUtUkzXegyRus4DnUELEV6oRncow4qe1tEI1DCZwEs3tYh8cUu FBCQ== X-Gm-Message-State: ACrzQf33NDJJjItornMNs2gmwXpQ8aeIbUpSnKNsPdxUob/OPhGPuZBG Br/bPePRsTsbBCMR5gI+kdzAvU1k3v0aS37CyUsDP0jsV7E2MzUAlxEQAjnitliKrScIPi87bdo rSb85+Ge5tTGd5yEIzYBDYA== X-Received: by 2002:a05:6214:76b:b0:4ac:be62:d2e5 with SMTP id f11-20020a056214076b00b004acbe62d2e5mr7176241qvz.91.1663946106772; Fri, 23 Sep 2022 08:15:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Jg5JqThdy0P5kS2uSLUoQ3+kfdp9Ppg4QGXjxFRDk5XYyybGVmtH43Lh/lTr6N1EDYoCkpg== X-Received: by 2002:a05:6214:76b:b0:4ac:be62:d2e5 with SMTP id f11-20020a056214076b00b004acbe62d2e5mr7176213qvz.91.1663946106592; Fri, 23 Sep 2022 08:15:06 -0700 (PDT) Received: from localhost (pool-68-160-173-162.bstnma.fios.verizon.net. [68.160.173.162]) by smtp.gmail.com with ESMTPSA id g12-20020ac8468c000000b0035cb9531851sm5432876qto.65.2022.09.23.08.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:15:06 -0700 (PDT) Date: Fri, 23 Sep 2022 11:15:05 -0400 From: Mike Snitzer To: Sarthak Kukreti Cc: dm-devel@redhat.com, linux-block@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Jens Axboe , "Michael S . Tsirkin" , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Alasdair Kergon , Mike Snitzer , Theodore Ts'o , Andreas Dilger , Bart Van Assche , Daniil Lunev , Evan Green , Gwendal Grignou Subject: Re: [PATCH RFC 1/8] block: Introduce provisioning primitives Message-ID: References: <20220915164826.1396245-1-sarthakkukreti@google.com> <20220915164826.1396245-2-sarthakkukreti@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220915164826.1396245-2-sarthakkukreti@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Thu, Sep 15 2022 at 12:48P -0400, Sarthak Kukreti wrote: > From: Sarthak Kukreti > > Introduce block request REQ_OP_PROVISION. The intent of this request > is to request underlying storage to preallocate disk space for the given > block range. Block device that support this capability will export > a provision limit within their request queues. > > Signed-off-by: Sarthak Kukreti > --- > block/blk-core.c | 5 ++++ > block/blk-lib.c | 55 +++++++++++++++++++++++++++++++++++++++ > block/blk-merge.c | 17 ++++++++++++ > block/blk-settings.c | 19 ++++++++++++++ > block/blk-sysfs.c | 8 ++++++ > block/bounce.c | 1 + > include/linux/bio.h | 6 +++-- > include/linux/blk_types.h | 5 +++- > include/linux/blkdev.h | 16 ++++++++++++ > 9 files changed, 129 insertions(+), 3 deletions(-) > > diff --git a/block/blk-settings.c b/block/blk-settings.c > index 8bb9eef5310e..be79ad68b330 100644 > --- a/block/blk-settings.c > +++ b/block/blk-settings.c > @@ -57,6 +57,7 @@ void blk_set_default_limits(struct queue_limits *lim) > lim->misaligned = 0; > lim->zoned = BLK_ZONED_NONE; > lim->zone_write_granularity = 0; > + lim->max_provision_sectors = 0; > } > EXPORT_SYMBOL(blk_set_default_limits); > > @@ -81,6 +82,7 @@ void blk_set_stacking_limits(struct queue_limits *lim) > lim->max_dev_sectors = UINT_MAX; > lim->max_write_zeroes_sectors = UINT_MAX; > lim->max_zone_append_sectors = UINT_MAX; > + lim->max_provision_sectors = UINT_MAX; > } > EXPORT_SYMBOL(blk_set_stacking_limits); > Please work through the blk_stack_limits() implementation too (simple min_not_zero?). From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B015C6FA82 for ; Fri, 23 Sep 2022 15:15:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id F38C083E3E; Fri, 23 Sep 2022 15:15:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org F38C083E3E Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bFBFyrGJ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M7jpJRsmBsrf; Fri, 23 Sep 2022 15:15:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7B9C483443; Fri, 23 Sep 2022 15:15:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7B9C483443 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4E710C0033; Fri, 23 Sep 2022 15:15:13 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 55B53C0032 for ; Fri, 23 Sep 2022 15:15:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3000460FE2 for ; Fri, 23 Sep 2022 15:15:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3000460FE2 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bFBFyrGJ X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JJkgVwPN-NVW for ; Fri, 23 Sep 2022 15:15:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DE94961118 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id DE94961118 for ; Fri, 23 Sep 2022 15:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663946108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i/7qErjHQwpjdxeuxG56UOY53/Pb3ceXUixswzrpqTk=; b=bFBFyrGJUWMRmMxQa1IWFql0ZOi36fAqmXNFYBD2AqxN0IGNlLlB6ZsBVYjErT8abruYl4 hs8yrfeK/BXujeLGn3BX+RPGUGW5sx5lfESinS/GuarSlOoYTJ65+S6z6H3uk1OtnZCeWo onUxdw3ygOUJUFcp0wQi3kjVr5agmE8= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-185-rxk9ZzNSNzmIm7heG_pv9g-1; Fri, 23 Sep 2022 11:15:07 -0400 X-MC-Unique: rxk9ZzNSNzmIm7heG_pv9g-1 Received: by mail-qk1-f199.google.com with SMTP id de16-20020a05620a371000b006ceb92bc740so219368qkb.15 for ; Fri, 23 Sep 2022 08:15:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=i/7qErjHQwpjdxeuxG56UOY53/Pb3ceXUixswzrpqTk=; b=0Ay2/mLLbxC3yjftpQFVgzAl2bkiR0UErN19LbGvrQ183eOPmR4tXA2KCkeJkui/xx 5v+zxxF0xjEQOIp8ZHr7W7MFZMtpLFDZGAMPAfM2/r8OiX0fflY/HYIRKhxYL9ytBRQn SmkLTCa+3diyE/fpaNaE1je49KMpvxwdVL8Ze2mMZ06SqCeTxd39hgtG5xqRirIqXbIl 0LReYOJICJYdy7JQkAtftgaabzrTxmufx2tQ0qC2AAk0OG9RDwMWNT0ixDhgJA+s8Lpv +OWpoVm6lHDTWLUMhS+NDjOu06OA/3jgV33lX1WCrTGkjb57PoQbfxfoIvqnDfD08/yo pWEQ== X-Gm-Message-State: ACrzQf1c0ZLgbBkTMG7HRNpeDqp8H+YGhK/uk+ZDe5SMZ718TYmoRBuu SdhPBLNKDcJFriBjzuW37SUOPGqutzANGgdUfyD5Nmc1BCq7FRMdpIFXI+DUbGpz/phwaosM2pN dBLpRDj2MbR+Vh2SoQ6arWkNnXSRDPrw2tWECO7t5 X-Received: by 2002:a05:6214:76b:b0:4ac:be62:d2e5 with SMTP id f11-20020a056214076b00b004acbe62d2e5mr7176242qvz.91.1663946106773; Fri, 23 Sep 2022 08:15:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Jg5JqThdy0P5kS2uSLUoQ3+kfdp9Ppg4QGXjxFRDk5XYyybGVmtH43Lh/lTr6N1EDYoCkpg== X-Received: by 2002:a05:6214:76b:b0:4ac:be62:d2e5 with SMTP id f11-20020a056214076b00b004acbe62d2e5mr7176213qvz.91.1663946106592; Fri, 23 Sep 2022 08:15:06 -0700 (PDT) Received: from localhost (pool-68-160-173-162.bstnma.fios.verizon.net. [68.160.173.162]) by smtp.gmail.com with ESMTPSA id g12-20020ac8468c000000b0035cb9531851sm5432876qto.65.2022.09.23.08.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:15:06 -0700 (PDT) Date: Fri, 23 Sep 2022 11:15:05 -0400 From: Mike Snitzer To: Sarthak Kukreti Subject: Re: [PATCH RFC 1/8] block: Introduce provisioning primitives Message-ID: References: <20220915164826.1396245-1-sarthakkukreti@google.com> <20220915164826.1396245-2-sarthakkukreti@google.com> MIME-Version: 1.0 In-Reply-To: <20220915164826.1396245-2-sarthakkukreti@google.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: Jens Axboe , Gwendal Grignou , Theodore Ts'o , "Michael S . Tsirkin" , Bart Van Assche , Mike Snitzer , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, dm-devel@redhat.com, Andreas Dilger , Daniil Lunev , Stefan Hajnoczi , Paolo Bonzini , linux-ext4@vger.kernel.org, Evan Green , Alasdair Kergon X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Thu, Sep 15 2022 at 12:48P -0400, Sarthak Kukreti wrote: > From: Sarthak Kukreti > > Introduce block request REQ_OP_PROVISION. The intent of this request > is to request underlying storage to preallocate disk space for the given > block range. Block device that support this capability will export > a provision limit within their request queues. > > Signed-off-by: Sarthak Kukreti > --- > block/blk-core.c | 5 ++++ > block/blk-lib.c | 55 +++++++++++++++++++++++++++++++++++++++ > block/blk-merge.c | 17 ++++++++++++ > block/blk-settings.c | 19 ++++++++++++++ > block/blk-sysfs.c | 8 ++++++ > block/bounce.c | 1 + > include/linux/bio.h | 6 +++-- > include/linux/blk_types.h | 5 +++- > include/linux/blkdev.h | 16 ++++++++++++ > 9 files changed, 129 insertions(+), 3 deletions(-) > > diff --git a/block/blk-settings.c b/block/blk-settings.c > index 8bb9eef5310e..be79ad68b330 100644 > --- a/block/blk-settings.c > +++ b/block/blk-settings.c > @@ -57,6 +57,7 @@ void blk_set_default_limits(struct queue_limits *lim) > lim->misaligned = 0; > lim->zoned = BLK_ZONED_NONE; > lim->zone_write_granularity = 0; > + lim->max_provision_sectors = 0; > } > EXPORT_SYMBOL(blk_set_default_limits); > > @@ -81,6 +82,7 @@ void blk_set_stacking_limits(struct queue_limits *lim) > lim->max_dev_sectors = UINT_MAX; > lim->max_write_zeroes_sectors = UINT_MAX; > lim->max_zone_append_sectors = UINT_MAX; > + lim->max_provision_sectors = UINT_MAX; > } > EXPORT_SYMBOL(blk_set_stacking_limits); > Please work through the blk_stack_limits() implementation too (simple min_not_zero?). _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization