On Monday, February 21, 2011 10:33:16 PM Josef Bacik wrote:
So you have just done 2 searches for the same thing. Instead of doing
btrfs_remove_free_space here, put
bitmap_clear_bits()
after the search_bitmap, and do a
unlink_free_space()
if it's not a bitmap, that way we don't race with the allocator (even
though this isn't a problem, it just sucks) and we don't do the search
twice. Other than that it looks great, thank you,
yes we are searching the same extent for twice, once in btrfs_trim_block_group,
another once we call btrfs_remove_free_space, I'll get it fixed and post a new version,
Thanks a lot.
Josef