Thread (9 messages) 9 messages, 5 authors, 2011-02-24

Re: [PATCH] Btrfs: Batched discard support for btrfs

From: Li Dongyang <hidden>
Date: 2011-02-24 02:24:59

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help