]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: Add can_merge_blob and merge_blob
authorAdam Kupczyk <akupczyk@ibm.com>
Wed, 10 May 2023 09:53:06 +0000 (09:53 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Thu, 6 Jul 2023 15:28:50 +0000 (15:28 +0000)
commitfe1e028f775df7d937723ff3dfa3ee432dcc2251
tree33961f0ff4bd7895c5c50a82c8e5ebbdf913686b
parent801c87c185c0e67a73f8d9c689c56ab6452cf580
os/bluestore: Add can_merge_blob and merge_blob

Two new functions:
1) can_marge_blob checks if 2 blobs are compatible to be merged together
2) merge_blob merges 2 blobs into 1, emptying source and putting all to destination

Modify merge_blob() to return logical length of produced blob.

Clear "unused" bitmap

When make blob shared or merge it with other blob, clear unused.
It drops some potential optimizations for writing into large blobs,
but it is unlikely to be useful.
Such info can be useful only after it reverts from Shared to regular blob.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/os/bluestore/bluestore_types.h