]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/filestore/FileJournal: FileJournal::open() close journal file before return error 16120/head
authorYang Honggang <joseph.yang@xtaotech.com>
Wed, 5 Jul 2017 09:19:11 +0000 (17:19 +0800)
committerYang Honggang <joseph.yang@xtaotech.com>
Wed, 5 Jul 2017 11:52:02 +0000 (19:52 +0800)
commit6ae403660e6fc40b43b73d7e3a3884acb27a1a51
tree7ef583bdc9186d004d10283b4bc0724b6a6bfbbd
parent98e00ab70b0994c7a3c62c07b158f8cd06043e71
os/filestore/FileJournal: FileJournal::open() close journal file before return error

After successfully opened journal in FileJournal::open(), the following
error returns will cause journal->open() in JournalingObjectStore::journal_replay()
failed and delete journal. In ~FileJournal(), we assert fd == -1. As we not cleanup
journal fd in FileJournal::open(), fd is not -1. This will generate a core.

Fixes: http://tracker.ceph.com/issues/20504
Signed-off-by: Yang Honggang <joseph.yang@xtaotech.com>
src/os/filestore/FileJournal.cc