Merge "Break up lock into I/O and non-I/O" into main