]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: include modified objects in flush list even if onode unchanged 12541/head
authorSage Weil <sage@redhat.com>
Mon, 19 Dec 2016 15:03:44 +0000 (10:03 -0500)
committerSage Weil <sage@redhat.com>
Mon, 19 Dec 2016 15:03:44 +0000 (10:03 -0500)
commit1b319f2e8f2aa4048d24a9801efe8f9447c64827
tree4dd7c8fee879fc9fe279eaa573710194a7b6d21c
parent8da0f348d3735260ae6ba417d1bc7e8ce7204441
os/bluestore: include modified objects in flush list even if onode unchanged

We use the onode flush list so that we can ->flush() as
a barrier before doing any read/modify/write.  For
example, omap_rmkeyrange will flush before reading to
see what keys to erase in order to ensure that any
previous inserts are applied to the db and we see them
and remove them.

However, some omap operations don't update the onode
itself, which means write_onode() doesn't get called and
we aren't put on this list.

Add a note_modified_object() helper that can be called
instead of write_onode() for those cases.  That way we
get on the list and flush() works as expected.

We could have resolved this by just putting ourselves on
the dirty onode list, but in practice every OSD op is
writing omap keys to the pgmeta object and there is no
need to touch the onode key in this case, so doing so
would be a big regression.

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