]> git.baikalelectronics.ru Git - kernel.git/commit
drbd: fix effective error returned when refusing an invalidate
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 27 Mar 2013 13:08:37 +0000 (14:08 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 Mar 2013 16:10:24 +0000 (10:10 -0600)
commitf4bb28c6e6d3dbc90b443bdcf1a7909d179cb60f
tree53d73028d31415f615850f05193a21073da43725
parenta64a0e2198efb3359241276c8e275b2fee47243f
drbd: fix effective error returned when refusing an invalidate

Since commit
  drbd: Disallow the peer_disk_state to be D_OUTDATED while connected
trying to invalidate a disconnected Primary returned an error code
that did not really match the situation:
"Refusing to be Outdated while Connected"

Insert two more specific conditions into is_valid_state(),
changing that to "Need access to UpToDate data",
respectively "Need a connection to start verify or resync".

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_state.c