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 =
On Wed, Mar 11, 2020 at 12:10 AM Guoqing Jiang
wrote:
>
>
>
> 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 =
The macros PAGE_SECTORS, PAGE_SECTORS_SHIFT and SECTOR_MASK are defined
several times in different flavours across the whole tree.
Define them just once in a common header.
Signed-off-by: Matteo Croce
---
v2:
As Dan Williams suggested:
#define PAGE_SECTORS_MASK(~(PAGE_SECTORS - 1))