dm thin: avoid metadata commit if a pool's thin devices haven't changed
authorMike Snitzer <snitzer@redhat.com>
Thu, 6 Feb 2014 11:08:56 +0000 (06:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 05:30:13 +0000 (21:30 -0800)
commit4f48d3328e128896f3d22ca5f8c4825108e55e30
tree3b20d1f54e958df0eab2de8fbd80803d554630d4
parentf4124bc34fe3a9f6c5fa3910ca0cc573708eb3b6
dm thin: avoid metadata commit if a pool's thin devices haven't changed

commit 4d1662a30dde6e545086fe0e8fd7e474c4e0b639 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-thin-metadata.c
drivers/md/dm-thin-metadata.h
drivers/md/dm-thin.c