]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: drop partial entry and adjust write_pos when opening PurgeQueue 14447/head
authorYan, Zheng <zyan@redhat.com>
Wed, 12 Apr 2017 10:06:23 +0000 (18:06 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 18 Apr 2017 02:20:09 +0000 (10:20 +0800)
commit48f3c91004cc93fa5506f050291e62e5474dc757
treeaecfd799bb6fcf9bb867f8977ce158cc00efa784
parent8ae2962b79903e217fda83cea4140af64b5d6883
mds: drop partial entry and adjust write_pos when opening PurgeQueue

At tail journal, there can be partial written entry. Before appending
new entries to the journal, we need to drop any partial written entry
and adjust write_pos. For mds log, partial written entry is detected
and dropped when replaying the journal.

For PurgeQueue journal, we don't replay the whole journal when MDS
starts. Before appending new entry to the journal, we need to drop
any partial written entry and adjust write_pos.

Previous patch makes the journal header write_pos align to boundary
of fully flushed entry. We can start finding partial written entry
from the journal header write_pos. It should be fast even when the
purge queue is very large.

Fixes: http://tracker.ceph.com/issues/19450
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/PurgeQueue.cc
src/mds/PurgeQueue.h