From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Chao Yu <yuchao0@huawei.com>, Yunlei He <heyunlei@huawei.com>,
Damien Le Moal <damien.lemoal@wdc.com>,
Fan Li <fanofcode.li@samsung.com>,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: fix 32-bit build
Date: Wed, 23 Nov 2016 13:18:53 -0800 [thread overview]
Message-ID: <20161123211853.GA49619@jaegeuk> (raw)
In-Reply-To: <2253375.qgaJy4NpnU@wuerfel>
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
prev parent reply other threads:[~2016-11-23 21:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 14:20 [PATCH] f2fs: fix 32-bit build Arnd Bergmann
2016-11-22 14:27 ` Damien Le Moal
2016-11-23 18:42 ` Jaegeuk Kim
2016-11-23 21:05 ` Arnd Bergmann
2016-11-23 21:18 ` Jaegeuk Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161123211853.GA49619@jaegeuk \
--to=jaegeuk@kernel.org \
--cc=arnd@arndb.de \
--cc=damien.lemoal@wdc.com \
--cc=fanofcode.li@samsung.com \
--cc=heyunlei@huawei.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox