]> 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)
committerSamuel Just <sjust@redhat.com>
Wed, 28 Jan 2015 22:55:39 +0000 (14:55 -0800)
commitaa038684dce1964d5d23802d23f2bd772458ea11
treee0ffd57ee993fcb5e8cb28d5f2fd973a97763c63
parente045ad4a39076547209ac1dc298df5ebffb76669
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