Skip to contentSkip to conversation

GFS2: Change variable blk to biblk

PATCH New Bob Peterson 2 participants 2 messages Apr 12, 2012 1 message not in the archive GFS2 file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 61ebc846-7d92-46ce-9ee2-1e9cec3f7103@zmail12.collab.prod.int.phx2.redhat.com

#1 lore raw

PATCH 1/1 GFS2: Change variable blk to biblk

Hi,

This patch renames a variable from blk to biblk for clarity's sake.

Regards,

Bob Peterson
Red Hat GFS

--

Author: Bob Peterson <[email protected]>
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.

fs/gfs2/rgrp.c +5 -5
index 5968eae..7a1cf67 100644
@@ -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;
 }
 
 /**
#2 lore raw

PATCH 1/1 GFS2: Change variable blk to biblk

Hi,

Now in the -nmw tree. Thanks,

Steve.

Quoted 61 lines · Bob Peterson

Hi,

This patch renames a variable from blk to biblk for clarity's sake.

Regards,

Bob Peterson
Red Hat GFS

--

Author: Bob Peterson <[email protected]>
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.

fs/gfs2/rgrp.c +5 -5
index 5968eae..7a1cf67 100644
@@ -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;
 }
 
 /**