The old strategy was to initiate a commit after any non-idempotent
transaction. This only worked if the transaction was idempotent with
respect to itself, or could be replayed partially without problems,
and in reality that isn't the case. For example:
- clone A -> B
- write to A
- <sync>
If we crash before the sync, and replay the clone A->B, we corrupt B with
the new A data.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
spos.op++;
}
- if (!idempotent && !btrfs_stable_commits) {
- dout(10) << "performed non-idempotent operation and not using btrfs snaps, triggering a commit" << dendl;
- trigger_commit(op_seq);
- }
return 0; // FIXME count errors
}