diff options
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 528909090df7..889175110c91 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
@@ -762,7 +762,7 @@ static int drbd_may_do_local_read(struct drbd_conf *mdev, sector_t sector, int s | |||
762 | return 0 == drbd_bm_count_bits(mdev, sbnr, ebnr); | 762 | return 0 == drbd_bm_count_bits(mdev, sbnr, ebnr); |
763 | } | 763 | } |
764 | 764 | ||
765 | static int drbd_should_do_remote(struct drbd_conf *mdev) | 765 | static bool drbd_should_do_remote(struct drbd_conf *mdev) |
766 | { | 766 | { |
767 | union drbd_state s = mdev->state; | 767 | union drbd_state s = mdev->state; |
768 | 768 | ||
@@ -770,13 +770,17 @@ static int drbd_should_do_remote(struct drbd_conf *mdev) | |||
770 | (s.pdsk >= D_INCONSISTENT && | 770 | (s.pdsk >= D_INCONSISTENT && |
771 | s.conn >= C_WF_BITMAP_T && | 771 | s.conn >= C_WF_BITMAP_T && |
772 | s.conn < C_AHEAD); | 772 | s.conn < C_AHEAD); |
773 | /* Before proto 96 that was >= CONNECTED instead of >= C_WF_BITMAP_T. | ||
774 | That is equivalent since before 96 IO was frozen in the C_WF_BITMAP* | ||
775 | states. */ | ||
773 | } | 776 | } |
774 | static int drbd_should_send_oos(struct drbd_conf *mdev) | 777 | static bool drbd_should_send_oos(struct drbd_conf *mdev) |
775 | { | 778 | { |
776 | union drbd_state s = mdev->state; | 779 | union drbd_state s = mdev->state; |
777 | 780 | ||
778 | return s.pdsk >= D_INCONSISTENT && | 781 | return s.conn == C_AHEAD || s.conn == C_WF_BITMAP_S; |
779 | (s.conn == C_AHEAD || s.conn == C_WF_BITMAP_S); | 782 | /* pdsk = D_INCONSISTENT as a consequence. Protocol 96 check not necessary |
783 | since we enter state C_AHEAD only if proto >= 96 */ | ||
780 | } | 784 | } |
781 | 785 | ||
782 | static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, unsigned long start_time) | 786 | static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, unsigned long start_time) |