[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161123211853.GA49619@jaegeuk>
Date: Wed, 23 Nov 2016 13:18:53 -0800
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Chao Yu <yuchao0@...wei.com>, Yunlei He <heyunlei@...wei.com>,
Damien Le Moal <damien.lemoal@....com>,
Fan Li <fanofcode.li@...sung.com>,
linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] f2fs: fix 32-bit build
On Wed, Nov 23, 2016 at 10:05:41PM +0100, Arnd Bergmann wrote:
> On Wednesday, November 23, 2016 10:42:26 AM CET Jaegeuk Kim wrote:
> >
> > Unfortunately, the sector number is usually a 64-bit number, and
> > we guarantee that bdev_zone_size() returns a power-of-two number.
>
> The sentence no longer makes sense. Maybe
>
> Fortunately, bdev_zone_size() is guaranteed to return a power-of-two
> number, so we can replace the % operator with a cheaper bit mask.
Got it.
Added it with modifed version.
Thanks,
>
> > @@ -693,7 +693,8 @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
> > }
> > sector = SECTOR_FROM_BLOCK(blkstart);
> >
> > - if (sector % bdev_zone_size(bdev) || nr_sects != bdev_zone_size(bdev)) {
> > + if (sector & (bdev_zone_size(bdev) - 1) ||
> >
>
> looks good, thanks for following up!
>
> Arnd
Powered by blists - more mailing lists