]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
LibrbdWriteback: complete writes strictly in order 214/head
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 10 Apr 2013 21:16:56 +0000 (14:16 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 10 Apr 2013 23:57:08 +0000 (16:57 -0700)
commit06d05e5ed7e09fa873cc05021d16f21317a1f8ef
treeb54d532944f9ebc65f69beeb453e98c3acafa387
parent909dfb7d183f54f7583a70c05550bec07856d4e4
LibrbdWriteback:  complete writes strictly in order

RADOS returns writes to the same object in the same order. The
ObjectCacher relies on this assumption to make sure previous writes
are complete and maintain consistency. Reads, however, may be
reordered with respect to each other. When writing to an rbd clone,
reads to the parent must be performed when the object does not exist
in the child yet. These reads may be reordered, resulting in the
original writes being reordered. This breaks the assmuptions of the
ObjectCacher, causing an assert to fail.

To fix this, keep a per-object queue of outstanding writes to an
object in the LibrbdWriteback handler, and finish them in the order in
which they were sent.

Fixes: #4531
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librbd/LibrbdWriteback.cc
src/librbd/LibrbdWriteback.h