[Tux3] [PATCH 09/10] Fix missing set_buffer_dirty()

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



---

 user/test/btree.c   |    1 +
 user/test/filemap.c |    2 ++
 2 files changed, 3 insertions(+)

diff -puN user/test/filemap.c~filemap-dtree-dirty user/test/filemap.c
--- tux3/user/test/filemap.c~filemap-dtree-dirty	2008-10-16 01:20:45.000000000 +0900
+++ tux3-hirofumi/user/test/filemap.c	2008-10-16 01:20:45.000000000 +0900
@@ -203,6 +203,8 @@ retry:;
 			dwalk_pack(walk, index, make_extent(seg[i].block, extent_count(seg[i])));
 			index += extent_count(seg[i]);
 		}
+		set_buffer_dirty(path[inode->btree.root.depth].buffer);
+
 		//dleaf_dump(&inode->btree, leaf);
 		/* assert we used exactly the expected space */
 		/* assert(??? == ???); */
diff -puN user/test/btree.c~filemap-dtree-dirty user/test/btree.c
--- tux3/user/test/btree.c~filemap-dtree-dirty	2008-10-16 01:20:45.000000000 +0900
+++ tux3-hirofumi/user/test/btree.c	2008-10-16 01:20:45.000000000 +0900
@@ -464,6 +464,7 @@ int btree_leaf_split(struct btree *btree
 		leafbuf = path[btree->root.depth].buffer = newbuf;
 		newbuf = swap;
 	}
+	set_buffer_dirty(newbuf);
 	brelse(newbuf);
 	return insert_node(btree, newkey, childblock, path);
 }
_

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



More information about the Tux3 mailing list