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 D1108C636D7 for ; Tue, 31 Jan 2023 13:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231952AbjAaNpe (ORCPT ); Tue, 31 Jan 2023 08:45:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbjAaNpd (ORCPT ); Tue, 31 Jan 2023 08:45:33 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7084269F; Tue, 31 Jan 2023 05:45:31 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id A7B4968B05; Tue, 31 Jan 2023 14:45:22 +0100 (CET) Date: Tue, 31 Jan 2023 14:45:21 +0100 From: Christoph Hellwig To: Bart Van Assche Cc: Christoph Hellwig , Jens Axboe , Ilya Dryomov , "Michael S. Tsirkin" , Jason Wang , Minchan Kim , Sergey Senozhatsky , Keith Busch , Sagi Grimberg , Chaitanya Kulkarni , "Martin K. Petersen" , David Howells , Marc Dionne , Xiubo Li , Steve French , Trond Myklebust , Anna Schumaker , Mike Marshall , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chuck Lever , linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, devel@lists.orangefs.org, io-uring@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 01/23] block: factor out a bvec_set_page helper Message-ID: <20230131134521.GA24165@lst.de> References: <20230130092157.1759539-1-hch@lst.de> <20230130092157.1759539-2-hch@lst.de> <2bab7050-dec7-3af8-b643-31b414b8c4b4@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2bab7050-dec7-3af8-b643-31b414b8c4b4@acm.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Jan 30, 2023 at 09:09:23AM -0800, Bart Van Assche wrote: > Has it been considered to use structure assignment instead of introducing > bvec_set_page(), e.g. as follows? > > bip->bip_vec[bip->bip_vcnt] = (struct bio_vec) { > .bv_page = page, .bv_len = len, .bv_offset = offset }; Unless it's hidden behind a macro it doesn't solve the problem of abstraction away the layout. I'm also find it less readable.