]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/BlueFS: fix async compaction txn
authorSage Weil <sage@redhat.com>
Fri, 2 Sep 2016 16:06:49 +0000 (12:06 -0400)
committerSage Weil <sage@redhat.com>
Fri, 2 Sep 2016 18:00:10 +0000 (14:00 -0400)
commita3568d5a5f58c5209bc50e73b4d36221a3466835
treef2541e7bec78b0a761eb4cd904d6bc042d8b1a33
parent76eab5dc558b10ccf5f7bf0e4f1a456b586ce198
os/bluestore/BlueFS: fix async compaction txn

Our transaction writes are labeled with a seq and uuid
to avoid replaying over garbage.

Two bugs, one real, one potential.

1) The second async compaction transactoin didn't have
its seq and uuid set, so replay always stopped.

2) We were writing two separate transactions, one with
all the new metadata, and the next one with a jump to
the new log offset.  If the first write completed but
it was torn and the second transaction didn't hit disk,
we might see an old transaction with seq == 2 and the
same uuid and replay that instead.

Fix both of these by making the async log txn one single
transaction that jumps directly to the new log offset.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueFS.cc