dm thin: change data device's flush_bio to be member of struct pool
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 13 Jan 2020 20:41:53 +0000 (15:41 -0500)
committerMike Snitzer <snitzer@redhat.com>
Wed, 15 Jan 2020 01:23:13 +0000 (20:23 -0500)
commitf06c03d1ded22cf1c059650c4ba02496e93a0c06
tree0c5ec8d966a08d8c97ccb4cadf340579d615bab9
parent873937e75f9a8ea231a502c3d29d9cb6ad91b3ef
dm thin: change data device's flush_bio to be member of struct pool

With commit fe64369163c5 ("dm thin: don't allow changing data device
during thin-pool load") it is now possible to re-parent the data
device's flush_bio from the pool_c to pool structure.  Doing so offers
improved lifetime guarantees for the flush_bio so that the call to
dm_pool_register_pre_commit_callback can now be done safely from
pool_ctr().

Depends-on: fe64369163c5 ("dm thin: don't allow changing data device during thin-pool load")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin.c