main.rs: line 261 - when state machine block device state is Failed, log that information to the database by calling save_state().