Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034740AbcJaWuK (ORCPT ); Mon, 31 Oct 2016 18:50:10 -0400 Received: from mail-ua0-f194.google.com ([209.85.217.194]:34675 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034722AbcJaWuG (ORCPT ); Mon, 31 Oct 2016 18:50:06 -0400 MIME-Version: 1.0 In-Reply-To: <20161031151123.GA3193@infradead.org> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> <1477728600-12938-46-git-send-email-tom.leiming@gmail.com> <20161031135943.36crigad55hwmmrl@thunk.org> <20161031151123.GA3193@infradead.org> From: Ming Lei Date: Tue, 1 Nov 2016 06:50:04 +0800 Message-ID: Subject: Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair To: Christoph Hellwig Cc: "Theodore Ts'o" , Jens Axboe , Linux Kernel Mailing List , linux-block , Linux FS Devel , "Kirill A . Shutemov" , Mike Christie , Hannes Reinecke , Keith Busch , Mike Snitzer , Johannes Thumshirn , Bart Van Assche Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 18 On Mon, Oct 31, 2016 at 11:11 PM, Christoph Hellwig wrote: > On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: >> What is _rd and _wt supposed to stand for? > > I think it's read and write, but I think the naming is highly > unfortunate. I started dabbling around with the patches a bit, > and to keep my sanity a started reaming it to _pages and _bvec > which is the real semantics - the _rd or _pages gives you a synthetic > bvec for each page, and the other one gives you the full bvec. Looks _pages & _bvec is better and still a little confusing and not reflect its real purpose from user view, since both points to real bvec. Could we just rename _rd as bio_for_each_segment_all_ro() which means the pointed bvec is readonly and not introduce _wt? Thanks, Ming Lei