[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d473061b-688f-f4a6-c0e8-61c22b8a2b10@cloud.ionos.com>
Date: Wed, 11 Mar 2020 00:10:04 +0100
From: Guoqing Jiang <guoqing.jiang@...ud.ionos.com>
To: Matteo Croce <mcroce@...hat.com>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-nvdimm@...ts.01.org,
linux-bcache@...r.kernel.org, linux-raid@...r.kernel.org,
linux-mmc@...r.kernel.org, xen-devel@...ts.xenproject.org,
linux-scsi@...r.kernel.org, linux-nfs@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Anna Schumaker <anna.schumaker@...app.com>,
Dan Williams <dan.j.williams@...el.com>,
Song Liu <song@...nel.org>
Subject: Re: [PATCH v2] block: refactor duplicated macros
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
Powered by blists - more mailing lists