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 EFBC9C54EAA for ; Mon, 30 Jan 2023 10:36:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236265AbjA3Kg1 (ORCPT ); Mon, 30 Jan 2023 05:36:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235494AbjA3Kg0 (ORCPT ); Mon, 30 Jan 2023 05:36:26 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED752133; Mon, 30 Jan 2023 02:36:25 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id DCD3968D07; Mon, 30 Jan 2023 11:36:19 +0100 (CET) Date: Mon, 30 Jan 2023 11:36:19 +0100 From: Christoph Hellwig To: David Howells 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" , 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: <20230130103619.GA11874@lst.de> References: <20230130092157.1759539-2-hch@lst.de> <20230130092157.1759539-1-hch@lst.de> <3347557.1675074816@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3347557.1675074816@warthog.procyon.org.uk> 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 10:33:36AM +0000, David Howells wrote: > Christoph Hellwig wrote: > > > +static inline void bvec_set_page(struct bio_vec *bv, struct page *page, > > + unsigned int len, unsigned int offset) > > Could you swap len and offset around? It reads better offset first. You move > offset into the page and then do something with len bytes. This matches bio_add_page and the order inside bio_vec itself. willy wanted to switch it around for bio_add_folio but Jens didn't like it, so I'll stick to the current convention in this area as well.