Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S947893AbcJaW76 (ORCPT ); Mon, 31 Oct 2016 18:59:58 -0400 Received: from mail-vk0-f44.google.com ([209.85.213.44]:34274 "EHLO mail-vk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S947786AbcJaW7y (ORCPT ); Mon, 31 Oct 2016 18:59:54 -0400 MIME-Version: 1.0 In-Reply-To: <20161031152901.GD30919@infradead.org> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> <1477728600-12938-10-git-send-email-tom.leiming@gmail.com> <20161031152901.GD30919@infradead.org> From: Ming Lei Date: Tue, 1 Nov 2016 06:59:52 +0800 Message-ID: Subject: Re: [PATCH 09/60] dm: dm.c: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments To: Christoph Hellwig Cc: Jens Axboe , Linux Kernel Mailing List , linux-block , Linux FS Devel , "Kirill A . Shutemov" , Alasdair Kergon , Mike Snitzer , "maintainer:DEVICE-MAPPER (LVM)" , Shaohua Li , "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" 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: 552 Lines: 17 On Mon, Oct 31, 2016 at 11:29 PM, Christoph Hellwig wrote: > On Sat, Oct 29, 2016 at 04:08:08PM +0800, Ming Lei wrote: >> Avoid to access .bi_vcnt directly, because it may be not what >> the driver expected any more after supporting multipage bvec. >> >> Signed-off-by: Ming Lei > > It would be really nice to have a comment in the code why it's > even checking for multiple segments. > OK, will add comment about using !bio_multiple_segments(rq->bio) to replace 'rq->bio->bi_vcnt == 1'. Thanks, Ming Lei