dm thin: avoid metadata commit if a pool's thin devices haven't changed
Commit 905e51b
("dm thin: commit outstanding data every second")
introduced a periodic commit. This commit occurs regardless of whether
any thin devices have made changes.
Fix the periodic commit to check if any of a pool's thin devices have
changed using dm_pool_changed_this_transaction().
Reported-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Cc: stable@vger.kernel.org
This commit is contained in:
@@ -1357,7 +1357,8 @@ static void process_deferred_bios(struct pool *pool)
|
||||
bio_list_init(&pool->deferred_flush_bios);
|
||||
spin_unlock_irqrestore(&pool->lock, flags);
|
||||
|
||||
if (bio_list_empty(&bios) && !need_commit_due_to_time(pool))
|
||||
if (bio_list_empty(&bios) &&
|
||||
!(dm_pool_changed_this_transaction(pool->pmd) && need_commit_due_to_time(pool)))
|
||||
return;
|
||||
|
||||
if (commit(pool)) {
|
||||
|
Fai riferimento in un nuovo problema
Block a user