Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2319834imu; Wed, 21 Nov 2018 09:46:52 -0800 (PST) X-Google-Smtp-Source: AJdET5ctXt55MZ6BOT8PqvhLGPDAmVb2Ag2uz5wn+5yFSS8IzDCCpqoQ5zKJ0kXS8lBERJl3G8HJ X-Received: by 2002:a62:11c7:: with SMTP id 68mr7761411pfr.21.1542822412815; Wed, 21 Nov 2018 09:46:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542822412; cv=none; d=google.com; s=arc-20160816; b=wBZMp3/KLZVF31KpMFMdaubQxEa6l4NbUuZorkExMI5ySQzEpTh7klQWsQfmA7H5Qa 2Kbz2cErILAbPE+n+rnSm3Ilw6HeDFIKEwADmofqyv3Vpmdp96A21Kis7wFuj77bUvJu nULFTec3ajqetVwgCuUfPW5z/02MwhWvAv6PXDkFYMBtG3F7lLd4jBFJlq8K2cVYHqKr 55iPyC8dC6BTGMsMhuzIws8rJcr2MugD0AHWUONFHIMugfEvMeldq74wbtaUf8zAevso tdzj4md7buCuMUaHRgItMsK8vJbQzfEUNl8kL4X8Nr1k7UHBbt7zfyvo4gbnlH2Ym0W1 kpqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MQJnXxTpwbo4SMGDnNjQW7tAVjm5vgYguD6xGKX7BlI=; b=arDdz4xrvHNYv0aFmUhk9QVfPagNExeInw07eKxom59kc+Lb8/hRhegTt8aHbsaGxr 7sJ01kIu56l4AJQh4UoWxCveztaR/E065ZA40zlat4oXCrJosIOi1jiPEk81DhZ97roD gWeFzykDrGTDSWnqcMCUrqBvAT1Njk2zHPU36yxnbKqf9GR3wFHtweB7j7lKsfGc1Xnv 5GyDVDlGG3klCM0VrvVcYGaxFz/QsuYslvm+AGcGU4VgEk7DofYAc3XN5MJtH4Pz+zzT HLFKPaz1x5JADD0qwC6lNRpoq93FZ4jVsYUxfhtW1eIeYf+94QlMwAHRSkc9yzgx4sB/ DR+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si46525910pgl.595.2018.11.21.09.46.29; Wed, 21 Nov 2018 09:46:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731069AbeKVBJZ (ORCPT + 99 others); Wed, 21 Nov 2018 20:09:25 -0500 Received: from verein.lst.de ([213.95.11.211]:51729 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729658AbeKVBJZ (ORCPT ); Wed, 21 Nov 2018 20:09:25 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 1B88068C1D; Wed, 21 Nov 2018 15:34:44 +0100 (CET) Date: Wed, 21 Nov 2018 15:34:44 +0100 From: Christoph Hellwig To: Nikolay Borisov Cc: Ming Lei , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , Omar Sandoval , Sagi Grimberg , Dave Chinner , Kent Overstreet , Mike Snitzer , dm-devel@redhat.com, Alexander Viro , linux-fsdevel@vger.kernel.org, Shaohua Li , linux-raid@vger.kernel.org, David Sterba , linux-btrfs@vger.kernel.org, "Darrick J . Wong" , linux-xfs@vger.kernel.org, Gao Xiang , Christoph Hellwig , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com Subject: Re: [PATCH V11 17/19] block: document usage of bio iterator helpers Message-ID: <20181121143443.GC2594@lst.de> References: <20181121032327.8434-1-ming.lei@redhat.com> <20181121032327.8434-18-ming.lei@redhat.com> <1f93e845-09e8-2c6c-3643-654b8c490597@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f93e845-09e8-2c6c-3643-654b8c490597@suse.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 21, 2018 at 09:45:25AM +0200, Nikolay Borisov wrote: > > + bio_for_each_segment_all() > > + bio_first_bvec_all() > > + bio_first_page_all() > > + bio_last_bvec_all() > > + > > +* The following helpers iterate over single-page bvecs. The passed 'struct > > +bio_vec' will contain a single-page IO vector during the iteration > > + > > + bio_for_each_segment() > > + bio_for_each_segment_all() > > + > > +* The following helpers iterate over single-page bvecs. The passed 'struct > > +bio_vec' will contain a single-page IO vector during the iteration > > + > > + bio_for_each_bvec() > > Just put this helper right below the above 2, no need to repeat the > explanation. Also I'd suggest introducing another catch-all sentence > "All other helpers are assumed to iterate multipage bio vecs" and > perhaps give an example with 1-2 helpers. Well, I think the second explanation is wrong - bio_for_each_bvec iterates over the whole bvecs, not just single page.