summaryrefslogtreecommitdiff
path: root/drivers/md/dm-thin-metadata.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2014-02-06 06:08:56 -0500
committerMike Snitzer <snitzer@redhat.com>2014-02-17 11:00:05 -0500
commit4d1662a30dde6e545086fe0e8fd7e474c4e0b639 (patch)
tree0845a7da235aceef3400a6ad7c6ab49b9c4c7ed9 /drivers/md/dm-thin-metadata.h
parent80ae49aaed32af72630251eb06161b15cde15ac8 (diff)
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
Diffstat (limited to 'drivers/md/dm-thin-metadata.h')
-rw-r--r--drivers/md/dm-thin-metadata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h
index 9a368567632f..dd6088a17a65 100644
--- a/drivers/md/dm-thin-metadata.h
+++ b/drivers/md/dm-thin-metadata.h
@@ -161,6 +161,8 @@ int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);
*/
bool dm_thin_changed_this_transaction(struct dm_thin_device *td);
+bool dm_pool_changed_this_transaction(struct dm_pool_metadata *pmd);
+
bool dm_thin_aborted_changes(struct dm_thin_device *td);
int dm_thin_get_highest_mapped_block(struct dm_thin_device *td,