From e33c60c7e28a6f2222ef97f8478445d739f9cad1 Mon Sep 17 00:00:00 2001 From: Ming-Hung Tsai Date: Tue, 2 Jun 2020 12:43:55 +0800 Subject: [PATCH] [thin_pool] Add close_thin() --- thin-provisioning/thin_pool.cc | 6 ++++++ thin-provisioning/thin_pool.h | 1 + 2 files changed, 7 insertions(+) diff --git a/thin-provisioning/thin_pool.cc b/thin-provisioning/thin_pool.cc index 5bfb487..d9d9684 100644 --- a/thin-provisioning/thin_pool.cc +++ b/thin-provisioning/thin_pool.cc @@ -279,6 +279,12 @@ thin_pool::open_thin(thin_dev_t dev) return open_device(dev); } +void +thin_pool::close_thin(thin::ptr td) +{ + close_device(td); +} + bool thin_pool::device_exists(thin_dev_t dev) const { diff --git a/thin-provisioning/thin_pool.h b/thin-provisioning/thin_pool.h index ce6e18e..4dffc7b 100644 --- a/thin-provisioning/thin_pool.h +++ b/thin-provisioning/thin_pool.h @@ -94,6 +94,7 @@ namespace thin_provisioning { uint32_t get_time() const; thin::ptr open_thin(thin_dev_t); + void close_thin(thin::ptr td); private: friend class thin;