]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: handle no-op write with snapshot case
authorSage Weil <sage@redhat.com>
Tue, 16 Dec 2014 01:04:32 +0000 (17:04 -0800)
committerSage Weil <sage@redhat.com>
Mon, 26 Jan 2015 01:47:50 +0000 (17:47 -0800)
commit8d29a4a231666830914903b95599d80da7b97def
treedca512b01b28541695f9334acf3954cabdb0f926
parent8ba48d10c252b28cde5b4da1286421db12b57cc2
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 and lock and later crash on an assert when the obc
is destroyed:

0> 2014-12-06 01:49:51.750163 7f08d6ade700 -1 osd/osd_types.h: In function 'ObjectContext::~ObjectContext()' thread 7f08d6ade700 time 2014-12-06 01:49:51.605411
osd/osd_types.h: 2944: FAILED assert(rwstate.empty())

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

Fixes: #10262
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 02fae9fc54c10b5a932102bac43f32199d4cb612)
src/osd/ReplicatedPG.cc
src/test/librados/snapshots.cc