]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: handle no-op write with snapshot case 3552/head
authorLoic Dachary <ldachary@redhat.com>
Fri, 30 Jan 2015 17:49:16 +0000 (18:49 +0100)
committerLoic Dachary <ldachary@redhat.com>
Mon, 2 Feb 2015 23:58:17 +0000 (00:58 +0100)
commita0eff325f19f6311cd870679d271e3f6ae3f51f3
tree09160a5e660bf1a6eeea92537a8bc96c44fa13fd
parent8820d4c30a8bf62527ac552491e9825906c4a3d3
osd: handle no-op write with snapshot case

If we have a transaction that does something to the object but it !exists
both before and after, we will continue through the write path.  If the
snapdir object already exists, and we try to create it again, we will
leak a snapdir obc.

Fix is to not recreate the snapdir if it already exists.

Fixes: #10262
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit 02fae9fc54c10b5a932102bac43f32199d4cb612)

    Conflicts:
        src/osd/ReplicatedPG.cc
        src/test/librados/snapshots.cc
src/osd/ReplicatedPG.cc