  We present an analysis of the foundations of the well known Clausius
inequality. It is shown that, strictly speaking, the inequality is not a
logical consequence of the Kelvin-Planck formulation of the second law of
thermodynamics. Some thought experiments demonstrating the violation of the
Clausius inequality are considered. Also, a reformulation of the Landauer's
principle in terms of the Clausius inequality is proposed. This version of the
inequality may be considered a consequence of the fluctuation theorem.
