Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932871AbcDFBeh (ORCPT ); Tue, 5 Apr 2016 21:34:37 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33929 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753056AbcDFBeg (ORCPT ); Tue, 5 Apr 2016 21:34:36 -0400 MIME-Version: 1.0 In-Reply-To: <20160406001841.GA31161@kmo-pixel> References: <1459857443-20611-1-git-send-email-tom.leiming@gmail.com> <1459857443-20611-2-git-send-email-tom.leiming@gmail.com> <20160406001841.GA31161@kmo-pixel> Date: Wed, 6 Apr 2016 09:34:34 +0800 Message-ID: Subject: Re: [PATCH 01/27] block: bio: introduce 4 helpers for cleanup From: Ming Lei To: Kent Overstreet Cc: Jens Axboe , Linux Kernel Mailing List , linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , Jan Kara , Keith Busch , Tejun Heo , Mike Snitzer 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: 713 Lines: 19 On Wed, Apr 6, 2016 at 8:18 AM, Kent Overstreet wrote: > On Tue, Apr 05, 2016 at 07:56:46PM +0800, Ming Lei wrote: >> Some drivers access bio->bi_vcnt and bio->bi_io_vec directly, >> firstly it isn't a good practice, secondly it may cause trouble >> for converting to multipage bvecs. > > "not good practice" is OO bullshit snake oil without more justification. We > don't plaster accessors everywhere without an actual reason. > > How would it cause trouble with multipage bvecs? Simply speaking, the current drivers may depend on .bi_vcnt for computing how many page there are in one bio. After multipage bvecs, it is not true any more. Isn't it a actual reason? Thanks, Ming Lei