Thanks, Haohui. These are good suggestions, and I'll incorporate them into a v2 patch here.
If the edit log truncates right before OP_SET_ACL, the semantic of default ACLs is lost.
In an earlier version of this code, I changed OP_ADD and OP_MKDIR to optionally encode the ACL entries. That would have made it atomic like you asked. Then, I switched to this two-op combo, because I thought it might be helpful to use hdfs namenode -recover to get back the file even if its OP_SET_ACL got truncated/corrupted.
However, now I'm doubting that decision. If we recover the file without all of its security restrictions in place, then that might not be such a helpful thing depending on the sensitivity of the data. I'll resurrect the former version of the code when I post v2 so that we have a guarantee of atomicity.