Thread (3 messages) 3 messages, 2 authors, 2020-03-10

Re: [PATCH v2] block: refactor duplicated macros

From: Guoqing Jiang <hidden>
Date: 2020-03-10 23:10:09
Also in: linux-bcache, linux-block, linux-mmc, linux-nfs, linux-scsi, lkml, nvdimm, xen-devel


On 3/10/20 11:35 PM, Matteo Croce wrote:
quoted hunk ↗ jump to hunk
+++ 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help