From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate 64-bit divides
Date: Fri, 20 Jul 2012 19:41:23 +0100 [thread overview]
Message-ID: <1342809683.2742.17.camel@menhir> (raw)
In-Reply-To: <6bd0b436-5259-4980-82e6-0e49744dd0a7@zmail12.collab.prod.int.phx2.redhat.com>
Hi,
Thanks - now in the -nmw tree,
Steve.
On Fri, 2012-07-20 at 14:05 -0400, Bob Peterson wrote:
> Hi,
>
> This patch removes the 64-bit divides introduced in the previous patch
> in favor of shifting, so that it will compile properly on 32-bit machines.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> ---
> commit 050bf58948473a5c83e22f3db046f52a9ffa4cce
> Author: Bob Peterson <rpeterso@redhat.com>
> Date: Fri Jul 20 12:59:43 2012 -0500
>
> GFS2: Eliminate 64-bit divides
>
> This patch removes the 64-bit divides in favor of shifting, so that
> it will compile properly on 32-bit machines.
> ---
> fs/gfs2/file.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
> index 9f94832..9aa6af1 100644
> --- a/fs/gfs2/file.c
> +++ b/fs/gfs2/file.c
> @@ -384,7 +384,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
> return ret;
>
> atomic_set(&ip->i_res->rs_sizehint,
> - PAGE_CACHE_SIZE / sdp->sd_sb.sb_bsize);
> + PAGE_CACHE_SIZE >> sdp->sd_sb.sb_bsize_shift);
>
> gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
> ret = gfs2_glock_nq(&gh);
> @@ -669,7 +669,7 @@ static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
> if (ret)
> return ret;
>
> - atomic_set(&ip->i_res->rs_sizehint, writesize / sdp->sd_sb.sb_bsize);
> + atomic_set(&ip->i_res->rs_sizehint, writesize >> sdp->sd_sb.sb_bsize_shift);
> if (file->f_flags & O_APPEND) {
> struct gfs2_holder gh;
>
> @@ -795,7 +795,7 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset,
> if (unlikely(error))
> goto out_uninit;
>
> - atomic_set(&ip->i_res->rs_sizehint, len / sdp->sd_sb.sb_bsize);
> + atomic_set(&ip->i_res->rs_sizehint, len >> sdp->sd_sb.sb_bsize_shift);
>
> while (len > 0) {
> if (len < bytes)
>
prev parent reply other threads:[~2012-07-20 18:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2a6c55fa-677e-4459-b841-524ef2512548@zmail12.collab.prod.int.phx2.redhat.com>
2012-07-20 18:05 ` [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate 64-bit divides Bob Peterson
2012-07-20 18:41 ` Steven Whitehouse [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=1342809683.2742.17.camel@menhir \
--to=swhiteho@redhat.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;
as well as URLs for NNTP newsgroup(s).