Merge "Fix deadlock for write-disk cmd."