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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 AC0C4C04A68 for ; Wed, 27 Jul 2022 14:58:36 +0000 (UTC) Received: from localhost ([::1]:49528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGiUd-00017t-GE for qemu-devel@archiver.kernel.org; Wed, 27 Jul 2022 10:58:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGiCU-0007D9-1e; Wed, 27 Jul 2022 10:39:50 -0400 Received: from mail-yb1-xb31.google.com ([2607:f8b0:4864:20::b31]:43714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGiCS-0006Iv-Jy; Wed, 27 Jul 2022 10:39:49 -0400 Received: by mail-yb1-xb31.google.com with SMTP id o15so2442822yba.10; Wed, 27 Jul 2022 07:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EV2Nu4Ep/Xp9EAqF2XYhS4EkantcIcyjq+CThjWXU1Y=; b=XZT1WlWyyf66n1CEjHMbhmWgkaToPLD6nMtZeJaUh4jn6gfw3Abf4WUn48scCgIrGr Cl7oas6T+kj+c9c+cx0ZxDHLtg/1/4eQIG30mPZbbl1UpRW1HKerv/K4c3j930aoz1GR ckKo18SWXnMFwcVgr3WnoAMhIAEk2yJl5CL/JBT8UqixoASL8/s5RcS8Lwi/ke6GBjQg VXFhhF3VlGBVP17mNVgJ72ZRzSZqt63AM8z8ju4yBgdiDu0eMmgUYCW1GZRW525Wfsje DT0SnyzUTHO7u5R6fxPvnrw5oAY7iq9ddj8q9mfFURwc+0oWmRomK7PWlKC6QYnAD1JZ hOxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EV2Nu4Ep/Xp9EAqF2XYhS4EkantcIcyjq+CThjWXU1Y=; b=wlY2rrqofCWMu0kC+GBVAWuI35Qg1XfALpo+40Jg8bV7iybPh0sG/vBUIPa/ne0rLw I9K4psyP6YqBxON1QPVhFKOLrc3k8+vQeFZ5K6f/JyUaS7It8OEVopZNy4Qh3gXP9uuI 1E2pFGLG1FZwQ5CeBH47XhCEHDOhftwdInzG0xBD/Ulj5tmFZVgN5WlYg59q+35pRilq DVBOUf/TYo7foGiikrrCG3j9IsLe/LeMpZ3gE9jbfxXCu7/22cBdnINTLPbiTqZS76zN 6i2VJlbNne1e0dM8YBBwuZwmQSJdEFe4p9aBnA7czcEWlSEeiBw54NUN16daVtXTOQ99 59Iw== X-Gm-Message-State: AJIora+tTtcd9yGtOd7bSdhk5BPAbMzz1CUSytA4CR2Wa2VGx8OQvQL9 WV0CdacnKSOMKVfIl1vJAleiJwjsbu7RiD8jHpo= X-Google-Smtp-Source: AGRyM1sMI4FwQsoKLOswzCRJmUHFXdl/8UG6QKf/0pHRYZ2MwE2fqNx+s8NfsDU+RqAMk45CLY0gduwM5uVQgS4OHsY= X-Received: by 2002:a25:238d:0:b0:673:4607:acf4 with SMTP id j135-20020a25238d000000b006734607acf4mr593818ybj.209.1658932786382; Wed, 27 Jul 2022 07:39:46 -0700 (PDT) MIME-Version: 1.0 References: <20220712021345.8530-1-faithilikerun@gmail.com> <20220712021345.8530-7-faithilikerun@gmail.com> In-Reply-To: <20220712021345.8530-7-faithilikerun@gmail.com> From: Stefan Hajnoczi Date: Wed, 27 Jul 2022 10:39:34 -0400 Message-ID: Subject: Re: [RFC v4 6/9] raw-format: add zone operations To: Sam Li , Markus Armbruster , Hanna Reitz , Kevin Wolf Cc: qemu-devel , Damien Le Moal , Dmitry Fomichev , Stefan Hajnoczi , qemu block , Eric Blake , Fam Zheng , Hannes Reinecke Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::b31; envelope-from=stefanha@gmail.com; helo=mail-yb1-xb31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, 11 Jul 2022 at 22:21, Sam Li wrote: > > Signed-off-by: Sam Li > --- > block/raw-format.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/block/raw-format.c b/block/raw-format.c > index 69fd650eaf..96bdb6c1e2 100644 > --- a/block/raw-format.c > +++ b/block/raw-format.c > @@ -314,6 +314,17 @@ static int coroutine_fn raw_co_pdiscard(BlockDriverState *bs, > return bdrv_co_pdiscard(bs->file, offset, bytes); > } > > +static int coroutine_fn raw_co_zone_report(BlockDriverState *bs, int64_t offset, > + int64_t *nr_zones, > + BlockZoneDescriptor *zones) { > + return bdrv_co_zone_report(bs->file->bs, offset, nr_zones, zones); > +} > + > +static int coroutine_fn raw_co_zone_mgmt(BlockDriverState *bs, zone_op op, > + int64_t offset, int64_t len) { > + return bdrv_co_zone_mgmt(bs->file->bs, op, offset, len); > +} > + Kevin, Markus, or Hanna: bdrv_*() APIs take a mix of BlockDriverState *bs and BdrvChild *child arguments. Should these new APIs take bs or child? Reviewed-by: Stefan Hajnoczi