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 53301C001E0 for ; Tue, 1 Aug 2023 12:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231392AbjHAM7Y (ORCPT ); Tue, 1 Aug 2023 08:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjHAM7W (ORCPT ); Tue, 1 Aug 2023 08:59:22 -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 65E202111 for ; Tue, 1 Aug 2023 05:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690894718; 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=qCe2p2QN9kRBjT/3kMdEzmYcq2EYKmnX7BhNzQuR/cY=; b=VmI/hpXSwrDBdLOa4ieNxjkO7AyfGVNK1JH+kZOIlgmNdY5KwXt13Br3teGwwnIUtTbntM t5r6ned+ndjDrSG8FMSLijUyJXDegSelEwXSFSR7CzYo7zlNKplpv1SdcojgnjonPL8zDh ykSNq51KIULNhlr476eANjHtUaRxC1Q= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-607-yAUigt5fM2WwXlu__pkf3g-1; Tue, 01 Aug 2023 08:58:34 -0400 X-MC-Unique: yAUigt5fM2WwXlu__pkf3g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0CE671C2BD62; Tue, 1 Aug 2023 12:58:34 +0000 (UTC) Received: from ovpn-8-18.pek2.redhat.com (ovpn-8-18.pek2.redhat.com [10.72.8.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4767040C6CCC; Tue, 1 Aug 2023 12:58:26 +0000 (UTC) Date: Tue, 1 Aug 2023 20:58:22 +0800 From: Ming Lei To: "Andreas Hindborg (Samsung)" Cc: Niklas Cassel , Matias =?iso-8859-1?Q?Bj=F8rling?= , open list , Damien Le Moal , Jens Axboe , "gost.dev@samsung.com" , "hch@infradead.org" , Johannes Thumshirn , Aravind Ramesh , "open list:BLOCK LAYER" , Hans Holmberg , Minwoo Im Subject: Re: [PATCH v9 2/2] ublk: enable zoned storage support Message-ID: References: <20230714072510.47770-1-nmi@metaspace.dk> <20230714072510.47770-3-nmi@metaspace.dk> <87il9zot9c.fsf@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87il9zot9c.fsf@metaspace.dk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Tue, Aug 01, 2023 at 02:11:56PM +0200, Andreas Hindborg (Samsung) wrote: > > Niklas Cassel writes: > > > On Fri, Jul 14, 2023 at 09:25:10AM +0200, Andreas Hindborg wrote: > >> From: Andreas Hindborg > > > > Hello Andreas! > > > > > > >> /* for READ request, writing data in iod->addr to rq buffers */ > >> @@ -1120,6 +1404,11 @@ static void ublk_commit_completion(struct ublk_device *ub, > >> /* find the io request and complete */ > >> req = blk_mq_tag_to_rq(ub->tag_set.tags[qid], tag); > >> > >> + if (io->flags & UBLK_IO_FLAG_ZONE_APPEND) { > > > > Do we really need to introduce a completely new flag just for this? > > > > if (req_op(req) == REQ_OP_ZONE_APPEND) > > > > should work just as well, no? > > Makes sense, thanks. The above one can be replaced with req_op(). But extra cost is added when retrieving request for the check in __ublk_ch_uring_cmd(). Thanks, Ming