drbd: silence some noisy log messages during disconnect
authorLars Ellenberg <lars.ellenberg@linbit.com>
Fri, 21 Jan 2011 11:35:15 +0000 (12:35 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 10 Mar 2011 10:48:04 +0000 (11:48 +0100)
commit0ddc5549f88dfc4a4c919693e9a86095e89e080b
tree95b89ce27e2e6d2e0989bd75becf19ca590c2c35
parent20ceb2b22edaf51e59e76087efdc71a16a2858de
drbd: silence some noisy log messages during disconnect

If we fail to send the information that we lost our disk,
we have no connection, and no disk: no access to data anymore.
That is either expected (deconfiguration), or there will be so much
noise in the logs that "Sending state failed" is not useful at all.
Drop it.

If the reason for a shorter than expected receive was a signal,
which we sent because we already decided to disconnect,
these additional log messages are confusing and useless.

This patch follows this pattern:
 - dev_warn(DEV, "short read expecting header on sock: r=%d\n", r);
 + if (!signal_pending(current))
 +  dev_warn(DEV, "short read expecting header on sock: r=%d\n", r);

Also make them all dev_warn for consistency.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_receiver.c