[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] dm-cache bug when using the cleaner?



On Tue, Mar 05, 2013 at 04:52:49PM +0000, thornber redhat com wrote:
> Hi Darrick,
> 
> You're using it correctly and have found a bug, thanks!  This patch fixes it:
> 
>   https://github.com/jthornber/linux-2.6/commit/6bbc70ab77ab828f1fecd8a3f4776b344eedef24

Seems to fix my problem, thank you!

--D

> This is the test scenario I use (tweaked to catch your issue).
> 
>   def wait_for_all_clean(cache)
>     cache.event_tracker.wait(cache) do |cache|
>       status = CacheStatus.new(cache)
>       STDERR.puts "#{status.nr_dirty} dirty blocks"
>       status.nr_dirty == 0
>     end
>   end
> 
>   def test_cleaner_policy
>     with_standard_cache(:format => true) do |cache|
>       git_prepare(cache, :ext4)
> 
>       cache.pause do
>         table = cache.active_table
>         table.targets[0].args[5] = 'cleaner'
>         cache.load(table)
>       end
> 
>       wait_for_all_clean(cache)
> 
>       cache.pause do
>         table = cache.active_table
>         table.targets[0].args[5] = 'mq'
>         cache.load(table)
>       end
> 
>       status = CacheStatus.new(cache)
>       assert_equal(0, status.nr_dirty)
>     end
> 
>     # We should be able to use the origin directly now                                                                       
>     with_standard_linear do |origin|
>       fs = FS::file_system(:ext4, origin)
>       fs.with_mount('./kernel_builds', :discard => true) do
>         # triggers fsck                                                                                                      
>       end
>     end
>   end


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]