From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Change variable blk to biblk
Date: Thu, 12 Apr 2012 14:10:12 +0100 [thread overview]
Message-ID: <1334236212.2697.13.camel@menhir> (raw)
In-Reply-To: <4f6998ec-c1cb-4c71-9399-25ace6ddad06@zmail12.collab.prod.int.phx2.redhat.com>
Hi,
Now in the -nmw tree. Thanks,
Steve.
On Thu, 2012-04-12 at 08:41 -0400, Bob Peterson wrote:
> Hi,
>
> This patch renames a variable from blk to biblk for clarity's sake.
>
> Regards,
>
> Bob Peterson
> Red Hat GFS
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> --
> Author: Bob Peterson <rpeterso@redhat.com>
> Date: Thu Apr 12 08:24:57 2012 -0500
>
> GFS2: Change variable blk to biblk
>
> In the resource group code, we have no less than three different
> kinds of block references: block relative to the file system (u64),
> block relative to the rgrp (u32), and block relative to the bitmap.
> This is a small step to making the code more readable; it renames
> variable blk to biblk to solidify in my mind that it's relative to
> the bitmap and nothing else.
>
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index 5968eae..7a1cf67 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -1297,7 +1297,7 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal, unsigned char state,
> {
> struct gfs2_bitmap *bi = NULL;
> const u32 length = rgd->rd_length;
> - u32 blk = BFITNOENT;
> + u32 biblk = BFITNOENT;
> unsigned int buf, x;
> const u8 *buffer = NULL;
>
> @@ -1334,8 +1334,8 @@ do_search:
> if (state != GFS2_BLKST_UNLINKED && bi->bi_clone)
> buffer = bi->bi_clone + bi->bi_offset;
>
> - blk = gfs2_bitfit(buffer, bi->bi_len, goal, state);
> - if (blk != BFITNOENT)
> + biblk = gfs2_bitfit(buffer, bi->bi_len, goal, state);
> + if (biblk != BFITNOENT)
> break;
>
> if ((goal == 0) && (state == GFS2_BLKST_FREE))
> @@ -1348,10 +1348,10 @@ skip:
> goal = 0;
> }
>
> - if (blk != BFITNOENT)
> + if (biblk != BFITNOENT)
> *rbi = bi;
>
> - return blk;
> + return biblk;
> }
>
> /**
>
prev parent reply other threads:[~2012-04-12 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <61ebc846-7d92-46ce-9ee2-1e9cec3f7103@zmail12.collab.prod.int.phx2.redhat.com>
2012-04-12 12:41 ` [Cluster-devel] [GFS2 PATCH] GFS2: Change variable blk to biblk Bob Peterson
2012-04-12 13:10 ` 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=1334236212.2697.13.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).