On 09/12/16 09:38, Wang Xiaoguang wrote: <snip> >> Actually even that is not true; both patches seem to be wrong in subtle >> ways. Naohiro's patch seems to prevent the deletion during balance, whereas >> yours prevents the cleaner from kicking in. > Indeed in my patch, I just change "struct mutex delete_unused_bgs_mutex" > to "struct rw_semaphore bg_delete_sem", and try to get bg_delete_sem when > we allocate data space, so this patch should work as before :) > >> >> As a simple reproducer you can convert from -mdup to -msingle (to create >> bloat) and then balance with -musage=10. Depending on which of the two >> patches are applied, you end with bloat that only grows and never shrinks, >> or bloat that ends up in mixed state (dup and single). > Can you give me a simple test script to reproduce your problem. > (I can write it myself, but I'm afraid I may misunderstand you :) ) I don't have a script and no time this week to play with this. Just create an fs with dup metadata, balance -mconvert=single and then back with -mconvert=dup. That's all I tried. Holger -- 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
