]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: move ObjectState side effects out of do_osd_ops
authorSage Weil <sage@newdream.net>
Tue, 26 Apr 2011 17:35:03 +0000 (10:35 -0700)
committerSage Weil <sage@newdream.net>
Tue, 26 Apr 2011 17:35:03 +0000 (10:35 -0700)
commite643642b85a4050cb1f968188b71e87e088470da
treef3c6ee67fdc2f5db00326673bceba32751508d72
parent101ca58e9fc41f326ca5e75b2f75b85943942bbf
osd: move ObjectState side effects out of do_osd_ops

We want to be able to handle a failure mid-way through an OSDOp
transaction and bail out with no side effects.  This patch

 * puts an ObjectState new_obs in the OoContext that modifications go in
 * only applies if it the transaction is a success
 * only does make_writeable (at the end!) if the transaction is a success

There are still side effects with the watch/notify stuff, though.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/ClassHandler.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h