dm cache: avoid preallocation if no work in writeback_some_dirty_blocks()
authorMike Snitzer <snitzer@redhat.com>
Fri, 17 Jul 2015 01:26:10 +0000 (21:26 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 17 Jul 2015 02:32:07 +0000 (22:32 -0400)
commite782eff591bca2d96bac30ab5d1cfa4ccd3b0f86
tree5e21539eba3903ddfee00729e38d5a006f2f2005
parent386cb7cdeeef97e0bf082a8d6bbfc07a2ccce07b
dm cache: avoid preallocation if no work in writeback_some_dirty_blocks()

Refactor writeback_some_dirty_blocks() to avoid prealloc_data_structs()
if the policy doesn't have any dirty blocks ready for writeback.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-target.c