[Tux3] PATCH: fix a small bug in filemap_extent_io

Jonas Fietz info at jonasfietz.de
Mon Dec 1 12:51:31 PST 2008


Spotted and fixed by hirofumi, i am just the messenger :)


# HG changeset patch
# User Jonas Fietz <data at geekig.de>
# Date 1228164310 -3600
# Node ID e6c5f679a1c0585cbe2d0e2b65ec51e0bd30d0b2
# Parent  965fa90edabda66d20d01b628ee1a902de7951f1
correct one case in filemap_extent_io, where the value of next_extend was not updated

diff --git a/user/kernel/filemap.c b/user/kernel/filemap.c
--- a/user/kernel/filemap.c
+++ b/user/kernel/filemap.c
@@ -90,7 +90,7 @@
 		limit = next_key(cursor, depth);
 	struct dleaf *leaf = bufdata(cursor[depth].buffer);
 	struct dwalk *walk = &(struct dwalk){ };
-dleaf_dump(&tux_inode(inode)->btree, leaf);
+	dleaf_dump(&tux_inode(inode)->btree, leaf);
 	/* Probe below io start to include overlapping extents */
 	dwalk_probe(leaf, sb->blocksize, walk, 0); // start at beginning of leaf just for now
 
@@ -125,6 +125,8 @@
 			if (start > dwalk_index(walk))
 				count -= start - dwalk_index(walk);
 			index += count;
+			next_extent = NULL;
+			continue;
 		}
 		block_t next_index = limit;
 		if ((next_extent = dwalk_next(walk))) {

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



More information about the Tux3 mailing list