]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ReplicatedPG: add OpContext::user_at_version
authorGreg Farnum <greg@inktank.com>
Wed, 28 Aug 2013 00:24:24 +0000 (17:24 -0700)
committerGreg Farnum <greg@inktank.com>
Wed, 28 Aug 2013 00:24:50 +0000 (17:24 -0700)
commitc119afa075085c4c1eef347406fd3f61018335aa
tree0f1cdc2ecc004426f7be7515e6efb0762a8853a5
parent7db71fc270c09d5013c56d713f93b2343b7adf92
ReplicatedPG: add OpContext::user_at_version

Set this up with the existing at_version member, but only increase
it for user_modify ops. Use this when logging the PG's user_version. In
order to maintain compatibility with old clients on classic pools, we
force user_version to follow at_version whenever it's updated.

Now that we have and are maintaining this PG user version, use it
for the user version on ops that get ENOENT back, when short-circuiting
replies as part of reply_op_error()[1], or when replying to repops
in eval_repop; further use it for the cls_current_version() function. This
is a small semantic change for that function, as previously it would
generally return the same value as the user would get sent back via
MOSDOpReply -- but I don't think it was something you could count on.
We now define it as being the user version of the PG at the start of the
op, and as a bonus it is defined even for read ops (the at_version is
only filled in on write operations).

[1]: We tweak PGLog to make it easier to retrieve both user and PG versions.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/objclass/class_api.cc
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PGLog.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h