aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-11-04 12:38:23 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-11-04 12:38:23 -0500
commit622d32d3ec40d5075523656ef0ea836f6a595ae3 (patch)
treed4c82d4f90ca0deb8fa806f105e204f2bdac2377 /drivers/block
parent476d42f138ba82389a92a894d8a630a70d36278f (diff)
parented814525f2e45188964c270fc3a5a0b644f7e4a9 (diff)
Merge branch 'for-jens' of git://git.drbd.org/linux-2.6-drbd into for-2.6.33
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_main.c7
-rw-r--r--drivers/block/drbd/drbd_nl.c14
-rw-r--r--drivers/block/drbd/drbd_receiver.c6
-rw-r--r--drivers/block/drbd/drbd_req.c7
4 files changed, 19 insertions, 15 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 11d8ff6016ac..157d1e4343c2 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -867,10 +867,9 @@ static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state
867 } 867 }
868 868
869 if (fp == FP_STONITH && 869 if (fp == FP_STONITH &&
870 (ns.role == R_PRIMARY && 870 (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk > D_OUTDATED) &&
871 ns.conn < C_CONNECTED && 871 !(os.role == R_PRIMARY && os.conn < C_CONNECTED && os.pdsk > D_OUTDATED))
872 ns.pdsk > D_OUTDATED)) 872 ns.susp = 1;
873 ns.susp = 1;
874 873
875 if (ns.aftr_isp || ns.peer_isp || ns.user_isp) { 874 if (ns.aftr_isp || ns.peer_isp || ns.user_isp) {
876 if (ns.conn == C_SYNC_SOURCE) 875 if (ns.conn == C_SYNC_SOURCE)
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 22538d9628f1..e2a5875a07b1 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -894,11 +894,6 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
894 min_md_device_sectors = MD_RESERVED_SECT * (nbc->dc.meta_dev_idx + 1); 894 min_md_device_sectors = MD_RESERVED_SECT * (nbc->dc.meta_dev_idx + 1);
895 } 895 }
896 896
897 if (drbd_get_capacity(nbc->md_bdev) > max_possible_sectors)
898 dev_warn(DEV, "truncating very big lower level device "
899 "to currently maximum possible %llu sectors\n",
900 (unsigned long long) max_possible_sectors);
901
902 if (drbd_get_capacity(nbc->md_bdev) < min_md_device_sectors) { 897 if (drbd_get_capacity(nbc->md_bdev) < min_md_device_sectors) {
903 retcode = ERR_MD_DISK_TO_SMALL; 898 retcode = ERR_MD_DISK_TO_SMALL;
904 dev_warn(DEV, "refusing attach: md-device too small, " 899 dev_warn(DEV, "refusing attach: md-device too small, "
@@ -917,6 +912,15 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
917 912
918 nbc->known_size = drbd_get_capacity(nbc->backing_bdev); 913 nbc->known_size = drbd_get_capacity(nbc->backing_bdev);
919 914
915 if (nbc->known_size > max_possible_sectors) {
916 dev_warn(DEV, "==> truncating very big lower level device "
917 "to currently maximum possible %llu sectors <==\n",
918 (unsigned long long) max_possible_sectors);
919 if (nbc->dc.meta_dev_idx >= 0)
920 dev_warn(DEV, "==>> using internal or flexible "
921 "meta data may help <<==\n");
922 }
923
920 drbd_suspend_io(mdev); 924 drbd_suspend_io(mdev);
921 /* also wait for the last barrier ack. */ 925 /* also wait for the last barrier ack. */
922 wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_pending_cnt)); 926 wait_event(mdev->misc_wait, !atomic_read(&mdev->ap_pending_cnt));
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 360baf60f574..9bbc509443e5 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2099,7 +2099,7 @@ static int drbd_asb_recover_0p(struct drbd_conf *mdev) __must_hold(local)
2099 break; 2099 break;
2100 } 2100 }
2101 /* Else fall through to one of the other strategies... */ 2101 /* Else fall through to one of the other strategies... */
2102 dev_warn(DEV, "Discard younger/older primary did not found a decision\n" 2102 dev_warn(DEV, "Discard younger/older primary did not find a decision\n"
2103 "Using discard-least-changes instead\n"); 2103 "Using discard-least-changes instead\n");
2104 case ASB_DISCARD_ZERO_CHG: 2104 case ASB_DISCARD_ZERO_CHG:
2105 if (ch_peer == 0 && ch_self == 0) { 2105 if (ch_peer == 0 && ch_self == 0) {
@@ -3619,10 +3619,6 @@ static void drbd_disconnect(struct drbd_conf *mdev)
3619 set_bit(STOP_SYNC_TIMER, &mdev->flags); 3619 set_bit(STOP_SYNC_TIMER, &mdev->flags);
3620 resync_timer_fn((unsigned long)mdev); 3620 resync_timer_fn((unsigned long)mdev);
3621 3621
3622 /* so we can be sure that all remote or resync reads
3623 * made it at least to net_ee */
3624 wait_event(mdev->misc_wait, !atomic_read(&mdev->local_cnt));
3625
3626 /* wait for all w_e_end_data_req, w_e_end_rsdata_req, w_send_barrier, 3622 /* wait for all w_e_end_data_req, w_e_end_rsdata_req, w_send_barrier,
3627 * w_make_resync_request etc. which may still be on the worker queue 3623 * w_make_resync_request etc. which may still be on the worker queue
3628 * to be "canceled" */ 3624 * to be "canceled" */
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 3678d3d66c6c..d09aac4a84ec 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -505,7 +505,7 @@ void __req_mod(struct drbd_request *req, enum drbd_req_event what,
505 * corresponding hlist_del is in _req_may_be_done() */ 505 * corresponding hlist_del is in _req_may_be_done() */
506 hlist_add_head(&req->colision, ar_hash_slot(mdev, req->sector)); 506 hlist_add_head(&req->colision, ar_hash_slot(mdev, req->sector));
507 507
508 set_bit(UNPLUG_REMOTE, &mdev->flags); /* why? */ 508 set_bit(UNPLUG_REMOTE, &mdev->flags);
509 509
510 D_ASSERT(req->rq_state & RQ_NET_PENDING); 510 D_ASSERT(req->rq_state & RQ_NET_PENDING);
511 req->rq_state |= RQ_NET_QUEUED; 511 req->rq_state |= RQ_NET_QUEUED;
@@ -536,6 +536,11 @@ void __req_mod(struct drbd_request *req, enum drbd_req_event what,
536 * 536 *
537 * Add req to the (now) current epoch (barrier). */ 537 * Add req to the (now) current epoch (barrier). */
538 538
539 /* otherwise we may lose an unplug, which may cause some remote
540 * io-scheduler timeout to expire, increasing maximum latency,
541 * hurting performance. */
542 set_bit(UNPLUG_REMOTE, &mdev->flags);
543
539 /* see drbd_make_request_common, 544 /* see drbd_make_request_common,
540 * just after it grabs the req_lock */ 545 * just after it grabs the req_lock */
541 D_ASSERT(test_bit(CREATE_BARRIER, &mdev->flags) == 0); 546 D_ASSERT(test_bit(CREATE_BARRIER, &mdev->flags) == 0);