os/FileJournal: fix journal completion plug removal
We plug completions when transitioning from a full to non-full journal
to ensure that we do not complete items before we have a stable journal
starting point that is past the committed_thru marker. However, the order
of the header update and completion queueing means that we never remove
the plug if the journalq is empty--the seq test is always false. The
result is very slow osd requests that only commit when we do a full sync.
This bug was masked until recently by another issue, fixed in
170d4a3d794260476ecde1e5e2ee719b7cb3ffd1.
The simple fix is to reorder the completion queuing before we update the
new header.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>