diff options
Diffstat (limited to 'src/librbd/migration/FileStream.cc')
-rw-r--r-- | src/librbd/migration/FileStream.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/librbd/migration/FileStream.cc b/src/librbd/migration/FileStream.cc index b548de7ee37..2da9e0df5e7 100644 --- a/src/librbd/migration/FileStream.cc +++ b/src/librbd/migration/FileStream.cc @@ -226,6 +226,18 @@ void FileStream<I>::read(io::Extents&& byte_extents, bufferlist* data, #endif // BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR +template <typename I> +void FileStream<I>::list_sparse_extents(io::Extents&& byte_extents, + io::SparseExtents* sparse_extents, + Context* on_finish) { + // TODO: list sparse extents based on SEEK_HOLE/SEEK_DATA + for (auto [byte_offset, byte_length] : byte_extents) { + sparse_extents->insert(byte_offset, byte_length, + {io::SPARSE_EXTENT_STATE_DATA, byte_length}); + } + on_finish->complete(0); +} + } // namespace migration } // namespace librbd |