]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph osd: add support for new op cmpext
authorwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Fri, 21 Apr 2017 08:51:09 +0000 (16:51 +0800)
committerwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Wed, 26 Apr 2017 01:08:22 +0000 (09:08 +0800)
commitbfc334b5376768e7f4cb41f577c73c90ae586e25
tree82e7d71cb3ddae1f4d0848385fa2bd5bcc2dcbc8
parentdee4f31cabb1399b6c8d23a2c442387382669780
ceph osd: add support for new op cmpext
This adds support for a new op cmpext. The request will read
extent.length bytes and compare them to extent.length bytes at
extent.offset on disk. return 0 on success, negative error code
on failure, (-MAX_ERRNO - mismatch_off) on mismatch

rbd will use this in a multi op request to implement the
SCSI COMPARE_AND_WRITE request which is used by VMware for
its atomic test and set request.

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: Mike Christie <mchristi@redhat.com>
[ddiss@suse.de: ReplicatedPG -> PrimaryLogPG]
Reviewed-by: David Disseldorp <ddiss@suse.de>
src/include/rados.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h
src/tracing/osd.tp