Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2212892imu; Wed, 21 Nov 2018 08:15:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vnh1MV7wM8f4ZzyK89DoFLvnJFhn6RuTnjXd96bHdYuWS+qOWrC1SVkeQ2XHQIuWcHDqkX X-Received: by 2002:a63:e80e:: with SMTP id s14mr6573743pgh.30.1542816912580; Wed, 21 Nov 2018 08:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542816912; cv=none; d=google.com; s=arc-20160816; b=sLbL//9sC4F8ArBVFyb0Ch+LU4rUg5YtzqWB/Lk6vx2ycL5xy5/rix31yraHBj2Zya qFzHx1zKiRKYx/LGEOFsuhhzYlL18NShZYn292LWG4f8Q4tJFSjrjBnvpgkYOw++Rjvo PDiyGNGWXhvtjrDRs59FuFrXEg1qMZca2D+9nmSMFiGQoFAV2dIUgZzbgVJm+9wtJ/6V VJJg7VXvj7IfdxhNTu08voqO+oClNkQewrwxw3cw6oP9/x9Q/yFpOR0ol9OF4XGVtkQn yI7McUcUtmEcWew3oFhMwjZo6YuDhFEqNyGrxbRNAkf3trvzuZOstQ+EoB9gsZYz3LpM l+GA== 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=uiXJjv/R/sz9ksv8kxoIoMGUDTLIDHfwzAk5ORchlJY=; b=QqteYSiaesDRWfmHPKo2ERSK5XL7fvpoUAARNDuyE6Lz03I4LXRsfBJdlndiF5/Glz t7uVk7xRMqoJdugCcev/YLi1S57VZzaICK7QDW/0Gpq9BOrJRn3GwCOzOzicuQdUVkIQ QrCdSxCCtl7RRGtyl8zHwL+RcHPaVpYhZAbXZncq1/+T//2ubjCGAxG1o5X6HJnTYk/S yJZr4yZZ9LTM2xjTLEnBXZiKTyY2Z9CcirDfQJnLtMrkE3czgVdlgvrnPWXeAaJ/kSMf q618tf9TH0VMtdzBjFd+ld1QoBUfN+WiaDwAOWUnL10C6hrG1drfYlB1+7qMo8DYBPmT 5qYg== 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 w6si7986356pfb.191.2018.11.21.08.14.47; Wed, 21 Nov 2018 08:15:12 -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 S1731892AbeKVCrN (ORCPT + 99 others); Wed, 21 Nov 2018 21:47:13 -0500 Received: from verein.lst.de ([213.95.11.211]:52342 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731667AbeKVCrN (ORCPT ); Wed, 21 Nov 2018 21:47:13 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 09AB768C19; Wed, 21 Nov 2018 17:12:07 +0100 (CET) Date: Wed, 21 Nov 2018 17:12:06 +0100 From: Christoph Hellwig To: Ming Lei Cc: Christoph Hellwig , 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 , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com Subject: Re: [PATCH V11 15/19] block: enable multipage bvecs Message-ID: <20181121161206.GD4977@lst.de> References: <20181121032327.8434-1-ming.lei@redhat.com> <20181121032327.8434-16-ming.lei@redhat.com> <20181121145502.GA3241@lst.de> <20181121154812.GD19111@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181121154812.GD19111@ming.t460p> 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 11:48:13PM +0800, Ming Lei wrote: > I guess the correct check should be: > > end_addr = vec_addr + bv->bv_offset + bv->bv_len; > if (same_page && > (end_addr & PAGE_MASK) != (page_addr & PAGE_MASK)) > return false; Indeed.