[Tux3] [PATCH 08/10] rename extent() to make_extent()

OGAWA Hirofumi hirofumi at mail.parknet.co.jp
Fri Oct 17 02:43:39 PDT 2008


Let's use extent for local value.

---

 user/test/dleaf.c   |    2 +-
 user/test/filemap.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -puN user/test/dleaf.c~extent-rename user/test/dleaf.c
--- tux3/user/test/dleaf.c~extent-rename	2008-10-16 01:20:45.000000000 +0900
+++ tux3-hirofumi/user/test/dleaf.c	2008-10-16 01:20:45.000000000 +0900
@@ -25,7 +25,7 @@ struct group { u32 count:8, keyhi:24; };
 struct entry { u32 limit:8, keylo:24; };
 struct dleaf { u16 magic, free, used, groups; struct extent table[]; };
 
-struct extent extent(block_t block, unsigned count)
+struct extent make_extent(block_t block, unsigned count)
 {
 	return (struct extent){ .block = block, .count = count - 1 };
 }
diff -puN user/test/filemap.c~extent-rename user/test/filemap.c
--- tux3/user/test/filemap.c~extent-rename	2008-10-16 01:20:45.000000000 +0900
+++ tux3-hirofumi/user/test/filemap.c	2008-10-16 01:20:45.000000000 +0900
@@ -162,7 +162,7 @@ retry:;
 			if (block == -1)
 				goto nospace; // clean up !!!
 		}
-		seg[segs++] = extent(block, gap);
+		seg[segs++] = make_extent(block, gap);
 		index += gap;
 	}
 
@@ -184,7 +184,7 @@ retry:;
 	if (write) {
 		*walk = rewind;
 		for (i = 0, index = start - offset; i < segs; i++, index += seg[i].count)
-			dwalk_mock(walk, index, extent(seg[i].block, extent_count(seg[i])));
+			dwalk_mock(walk, index, make_extent(seg[i].block, extent_count(seg[i])));
 		trace("need %i data and %i index bytes", walk->mock.free, -walk->mock.used);
 		trace("need %i bytes, %u bytes free", walk->mock.free - walk->mock.used, dleaf_free(&inode->btree, leaf));
 		if (dleaf_free(&inode->btree, leaf) <= walk->mock.free - walk->mock.used) {
@@ -200,7 +200,7 @@ retry:;
 		dwalk_chop_after(walk);
 		for (i = 0, index = start - offset; i < segs; i++) {
 			trace("pack 0x%Lx => %Lx/%x", index, (L)seg[i].block, extent_count(seg[i]));
-			dwalk_pack(walk, index, extent(seg[i].block, extent_count(seg[i])));
+			dwalk_pack(walk, index, make_extent(seg[i].block, extent_count(seg[i])));
 			index += extent_count(seg[i]);
 		}
 		//dleaf_dump(&inode->btree, leaf);
_

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list