]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: try to unshare blobs from gen objects 14239/head
authorSage Weil <sage@redhat.com>
Mon, 15 May 2017 14:07:49 +0000 (10:07 -0400)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 18:01:00 +0000 (14:01 -0400)
commit7c6db70b36eccede81d71cc7449c0f9d0fd0b1e5
tree2f3d4da800a0e0b93ad058b310e1445e9fb747e2
parenteebfd47e2ed4fcbc6b9de4542c351b942fb3d05c
os/bluestore: try to unshare blobs from gen objects

OSD EC write pattern clones a to-be-written range to a
gen object and then deletes it shortly after.  Try to
unshare the original blob in the nogen object if it is
in the cache so reduce the shared blob tracking overhead
and copy-on-write behavior.

This doesn't make our write pattern perfect, by any
means, since a small overwrite will generally

 - clone the range to the gen object
 - write the same range, creating a new blob on the
   nogen object
 - remove the clone, and unshare the original blob

This doesn't fix that the overwrite was written
somewhere else and we probably have two competing blobs.
However, future small writes will find the alternate
blob in _do_small_write and reuse the same allocation,
which is something.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/os/bluestore/bluestore_types.cc
src/os/bluestore/bluestore_types.h
src/test/objectstore/test_bluestore_types.cc