]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/refcount: ENOENT when put on non-existent object
authorSage Weil <sage@redhat.com>
Tue, 16 Dec 2014 00:11:05 +0000 (16:11 -0800)
committerSage Weil <sage@redhat.com>
Tue, 16 Dec 2014 00:11:05 +0000 (16:11 -0800)
commitdb951aed0aca59a1bb2b21b87ada714e6769e230
tree9c9fefff58f33fbf590fa06b0a3b421fb4780b3e
parentbc2b9f6bf5fa629e127852720d6ad42ef1276b12
cls/refcount: ENOENT when put on non-existent object

If we get ENOENT, do not that that to mean an implicit reference count of
1.  That means that if you put a non-existent object, we should get
ENOENT instead of doing a useless delete on the OSD.

Note that this changes the get behavior slightly, too: doing a get on a
non-existent object will now fail with ENOENT instead of implicitly
creating it.

Stumbled across this from #10262.

Signed-off-by: Sage Weil <sage@redhat.com>
src/cls/refcount/cls_refcount.cc
src/test/cls_refcount/test_cls_refcount.cc