]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/Newstore: Check onode.omap_head in valid() and next()
authorXiaoxi Chen <xiaoxi.chen@intel.com>
Wed, 15 Apr 2015 16:10:08 +0000 (00:10 +0800)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:38 +0000 (13:39 -0400)
commit65877832f8d8d542a179c184937d1dc28a059475
tree6adbafb8bf5e663536713ebdb791ab8ba029e8ab
parent1a97fd6cb7cdc31288b34ba333b505dddce6fa76
os/Newstore: Check onode.omap_head in valid() and next()

The db iter will be set to KeyValueDB::Iterator() if onode.omap_head
not present. In that case if we touch the db iter we will get a segmentation
fault.

Prevent to touch the db iter when onode.omap_head is invalid(equals to 0).

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
src/os/newstore/NewStore.cc