diff options
author | Greg Farnum <greg@inktank.com> | 2013-08-19 10:29:49 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-08-19 10:29:49 -0700 |
commit | 4e86be9232602ed595d885fcaeda5e47ad9a2a6a (patch) | |
tree | f749e9f041a67e2c61e7c5a4f8f6da2d20cd1354 | |
parent | f5636be742bffb19f16fdb832891fd1a43679ccf (diff) | |
download | ceph-4e86be9232602ed595d885fcaeda5e47ad9a2a6a.tar.gz |
librados: synchronous commands should return on commit instead of ack
This is unlikely to be noticed by anybody, but it is a big change. Document
in the PendingReleaseNotes and bump up the librados minor version number
to 68.
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | PendingReleaseNotes | 7 | ||||
-rw-r--r-- | src/include/rados/librados.h | 2 | ||||
-rw-r--r-- | src/librados/IoCtxImpl.cc | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 67919e54118..ccbe0596b70 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -11,3 +11,10 @@ v0.68 offender, has been removed. This breaks compatibility with pre-bobtail librbd clients by preventing them from creating new images. + +* librados now returns on commit instead of ack for synchronous calls. + This is a bit safer in the case where both OSDs and the client crash, and + is probably how it should have been acting from the beginning. Users are + unlikely to notice but it could result in lower performance in some + circumstances. Those who care should switch to using the async interfaces, + which let you specify safety semantics precisely.
\ No newline at end of file diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h index 4a5be3d1777..6f5e454c8e8 100644 --- a/src/include/rados/librados.h +++ b/src/include/rados/librados.h @@ -24,7 +24,7 @@ extern "C" { #endif #define LIBRADOS_VER_MAJOR 0 -#define LIBRADOS_VER_MINOR 53 +#define LIBRADOS_VER_MINOR 68 #define LIBRADOS_VER_EXTRA 0 #define LIBRADOS_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra) diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc index ce9743a54b3..c7900585458 100644 --- a/src/librados/IoCtxImpl.cc +++ b/src/librados/IoCtxImpl.cc @@ -504,14 +504,14 @@ int librados::IoCtxImpl::operate(const object_t& oid, ::ObjectOperation *o, int r; eversion_t ver; - Context *onack = new C_SafeCond(&mylock, &cond, &done, &r); + Context *oncommit = new C_SafeCond(&mylock, &cond, &done, &r); int op = o->ops[0].op.op; ldout(client->cct, 10) << ceph_osd_op_name(op) << " oid=" << oid << " nspace=" << oloc.nspace << dendl; lock->Lock(); objecter->mutate(oid, oloc, *o, snapc, ut, 0, - onack, NULL, &ver); + NULL, oncommit, &ver); lock->Unlock(); mylock.Lock(); |