The equality holds in the reversible case and the strict inequality holds in the irreversible case, with T surr as the temperature of the heat bath (surroundings) here. The reversible case is used to introduce the state function entropy. This is because in cyclic processes the variation of a state function is zero from state functionality.