lkml.org 
[lkml]   [2017]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] dm-unstripe: unstripe RAID 0/dm-striped device
[snip]
On Wed, Dec 13, 2017 at 04:11:44PM -0800, Randy Dunlap wrote:
>
> >=
>

Thanks, good catch.


> > + tot_sec = i_size_read(bbdev->bd_inode) >> SECTOR_SHIFT;
> > + mod = tot_sec % target->chunk_sectors;
>
> Did you build this on 32-bit also? Is that '%' OK on 32-bit?

I've looked at this a bit and still can't figure out why this
modulo operation would operate differently on a 32 versus a 64
bit platform? I know sector_t is config dependent but the
sector_t should be promoted to 64 bit width during the modulo
operation.

Are you wondering whether sector_t is the right type for any of
the math in this file? Perhaps we should be safe and only use
u64s?

\
 
 \ /
  Last update: 2017-12-15 16:49    [W:0.073 / U:2.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site