Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1160782ybh; Tue, 10 Mar 2020 16:11:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs8nWq5mSm03rEYlVHFB8ImqAhpa5S6ZNqWGsS9+vfucol4aJ2CYqoXtiaVuCaEsnON3Ws6 X-Received: by 2002:a9d:e84:: with SMTP id 4mr107108otj.346.1583881863864; Tue, 10 Mar 2020 16:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583881863; cv=none; d=google.com; s=arc-20160816; b=rzFnU1QsTz9JQ+e1CyRPEz25Il4aKD/dVs/Q7L5pX1TCgzpq7OcDOB5kQdl0WnXxwB SL86z5suRBQC1tFYvsxYfKznRrNjB3MzavtiCtxewlEULp6VhVDe9F4mSFg3+Kjt/um7 VT8zifGV7BjRZhFb7lytqYIkba1E6QHGiXNxyM3NUsTBYdyaasC9weovp+17ccUXKPl4 tBfsBIuAoEaU1/kP/fYb8DXJtzH2a6D5IUm2NCaapQ9GjzXYBI85qHKkXmGsjhjQtnTe S1/+h+fwcD+54aCifLtxWWMuOWHwQ/SlTcArXhbKBtTJY7klpP3FLyMDdI3MQzBvxhOL tdkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ZjzfLVKcrEVYs6WhxkjJMrt4JgyDW89UP2lOPu52OFg=; b=c7v2L3fHkyqzWWU6wPnDiXzaKkMkDDDb075xkHhLPNpWsTwtuZ9kkc52D5HcNJ802W Jwn7bRaL+d2g117bJDjb7SYmnn4zDJccbuyEkwZmdyxElchLrhWvUnK+qgFRE3IdVVzj /QxxW/DC3Ku5L61gcFtk2XbnUq7/Z4nQ/49+VUuTQcEgc0MlcXF8XQJ+fZnDk5SmBcZ7 3p3NsZb2WOl50Vbzq8QGp+wEkCKjXt4ArnnNMPiE01oane0i2fNBQwF8TKeHXcrOOm5M Zsp58H4lk2ossbT0xOmmOcs7kVjFLkXG+ti1oTObs3wpdmzDi4eLrCL0KigJZOHudjqb KFfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b="AFnM8/qV"; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 x10si29447oto.305.2020.03.10.16.10.42; Tue, 10 Mar 2020 16:11:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b="AFnM8/qV"; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727797AbgCJXKH (ORCPT + 99 others); Tue, 10 Mar 2020 19:10:07 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38518 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727752AbgCJXKH (ORCPT ); Tue, 10 Mar 2020 19:10:07 -0400 Received: by mail-ed1-f65.google.com with SMTP id h5so510420edn.5 for ; Tue, 10 Mar 2020 16:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZjzfLVKcrEVYs6WhxkjJMrt4JgyDW89UP2lOPu52OFg=; b=AFnM8/qVZ5INpBhagP0TzCOiNgkxgenab2JvoMJ9TochGwwsyROWvjIewmaXHDUmar l+T11XTf3Z5/Ln3tLw8rQzmHYyAEoebfFfwlJsw4tdw5dINkokIRH6NS2P54C8D6wCSe ws5FELqRVVqhVPNU17Zok/L7q8FpBv0xeV2Yx/a7IwZ+YYOXOhMa8eTAabzdA20EG7IY J84WyBNSEyA/7FhPiNt9Zcn8JPOOzmRwoHz4R7hn1NRoq0KTMVjRHrmh0e6pxHuZgivu ZZqYfgk18R1hF/eFxnc6c5j6COc0wlMKtMCm0st1cu2neOcTZro4+BlqXr2NtmU9v/Vs 2n4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZjzfLVKcrEVYs6WhxkjJMrt4JgyDW89UP2lOPu52OFg=; b=oD/TSf+7nHF73q1jljkk8GSKiYxBmeweni9EcXmoiRZ9Sizaq4l3RKVXlBJ3lehcD4 Qm5ozQi7ff2fmfZl8U08ShTZgI4ZRe3ZbZKJZo0UA0F90wEl2m5O5Z68cr86WDynOp1D QIdlJnaUTldUbXIlEM/wUA+xvwJiC2jPYBvg/7g/XCuUcuPHoX1G6JV3jok0NBu8yxmJ Sr+NgJDuC+vTRpXuJ2iME3hCe2Ryw1Fwh/AWOq4I+1B0nNJq74j9ofxKOpw+1/EFSKud FRWxpFOHSqlEa/pl0cUSJouztZl9hN5zUF5UdyctMHK4BSuH4zqAsM1tY+6Rzs3eEXUP Zuag== X-Gm-Message-State: ANhLgQ2sJWgFcaI4TQaj0DbJjckVxvZZ2t3nGbxhZqJ5wORwO2rFoDq1 vdLtUZaRiWY+VCLdr82kBi4aZQ== X-Received: by 2002:a05:6402:549:: with SMTP id i9mr174325edx.323.1583881805877; Tue, 10 Mar 2020 16:10:05 -0700 (PDT) Received: from ?IPv6:2001:16b8:4849:2c00:55b0:6e1e:26ab:27a5? ([2001:16b8:4849:2c00:55b0:6e1e:26ab:27a5]) by smtp.gmail.com with ESMTPSA id h22sm3715651eds.88.2020.03.10.16.10.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Mar 2020 16:10:05 -0700 (PDT) Subject: Re: [PATCH v2] block: refactor duplicated macros To: Matteo Croce , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org, linux-nfs@vger.kernel.org Cc: Jens Axboe , "James E.J. Bottomley" , Ulf Hansson , Anna Schumaker , Dan Williams , Song Liu References: <20200310223516.102758-1-mcroce@redhat.com> From: Guoqing Jiang Message-ID: Date: Wed, 11 Mar 2020 00:10:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200310223516.102758-1-mcroce@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 3/10/20 11:35 PM, Matteo Croce wrote: > +++ b/drivers/md/raid1.c > @@ -2129,7 +2129,7 @@ static void process_checks(struct r1bio *r1_bio) > int vcnt; > > /* Fix variable parts of all bios */ > - vcnt = (r1_bio->sectors + PAGE_SIZE / 512 - 1) >> (PAGE_SHIFT - 9); > + vcnt = (r1_bio->sectors + PAGE_SECTORS - 1) >> (PAGE_SHIFT - 9); Maybe replace "PAGE_SHIFT - 9" with "PAGE_SECTORS_SHIFT" too. Thanks, Guoqing