The equation:
$$ dS = \frac{dQ}{T} $$
only applies to reversible processes. For an irreversible process $dS \gt dQ/T$.
To see this start with the expression for the change in internal energy:
$$ dU = dQ - dW $$
The internal energy is a state function, so this equation always applies whether the process is reversible or irreversible. So for a reversible process we have:
$$ dU = TdS - dW_{rev} $$
Suppose we make the same change in $U$ with an irreversible process then we have:
$$ dU = dQ_{irrev} - dW_{irrev} $$
And because $dU$ is the same in both cases we equate the two expressions to get:
$$ TdS - dW_{rev} = dQ_{irrev} - dW_{irrev} $$
which rearranges to:
$$ dS = \frac{dQ_{irrev}}{T} + \frac{dW_{rev} - dW_{irrev}}{T} $$
But we know that the work from a reversible process is always greater than the work from an irreversible process i.e. $dW_{rev} - dW_{irrev} > 0$, and this means:
$$ dS = \frac{dQ_{irrev}}{T} + \Delta $$
for some positive number $\Delta$ that depends on the details of the irreversible process.