2008/7/31 Chris Mason <chris.mason@xxxxxxxxxx>: > On Wed, 2008-07-30 at 14:14 -0400, Chris Mason wrote: >> On Wed, 2008-07-30 at 23:52 +0800, Yan Zheng wrote: >> > Hello, >> > >> > The memory reclaiming issue happens when snapshot exists. In that >> > case, some cache entries may not be used during old snapshot dropping, >> > so they will remain in the cache until umount. The patch adds a field >> > to struct btrfs_leaf_ref to record create time. Besides, the patch >> > makes all dead roots of a given snapshot linked together in order of >> > create time. After a old snapshot was completely dropped, we check the >> > dead root list and remove all cache entries created before the oldest >> > dead root in the list. >> > >> >> Hi Yan, >> >> I think this is missing some hunks, it isn't compiling quite right: >> > > Well, outside of these errors the code looks right. I'll push it out, > just send along an incremental if it is needed. > Sorry, I missed all hunks for extent-tree.c. Here is the incremental. Regards YZ --- diff -r ac9bcbf9edab extent-tree.c --- a/extent-tree.c Wed Jul 30 16:54:26 2008 -0400 +++ b/extent-tree.c Thu Jul 31 19:23:56 2008 +0800 @@ -1054,6 +1054,7 @@ int btrfs_inc_ref(struct btrfs_trans_han goto out; } + ref->root_gen = root->root_key.offset; ref->bytenr = buf->start; ref->owner = btrfs_header_owner(buf); ref->generation = btrfs_header_generation(buf); -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
