#9881 MDS flush journal asok command

Based on greg's branch to avoid awkward merging later, merge this after that.
This code matches the setup up there; that's what do-while loops are for.