diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-11-04 18:38:23 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-11-04 18:38:23 +0100 |
commit | 622d32d3ec40d5075523656ef0ea836f6a595ae3 (patch) | |
tree | d4c82d4f90ca0deb8fa806f105e204f2bdac2377 | |
parent | 476d42f138ba82389a92a894d8a630a70d36278f (diff) | |
parent | ed814525f2e45188964c270fc3a5a0b644f7e4a9 (diff) |
Merge branch 'for-jens' of git://git.drbd.org/linux-2.6-drbd into for-2.6.33
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 7 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 14 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 6 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 7 | ||||
-rw-r--r-- | include/linux/drbd.h | 2 | ||||
-rw-r--r-- | include/linux/drbd_limits.h | 4 |
6 files changed, 22 insertions, 18 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 11d8ff6016a..157d1e4343c 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 } if (fp == FP_STONITH && - (ns.role == R_PRIMARY && - ns.conn < C_CONNECTED && - ns.pdsk > D_OUTDATED)) - ns.susp = 1; + (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk > D_OUTDATED) && + !(os.role == R_PRIMARY && os.conn < C_CONNECTED && os.pdsk > D_OUTDATED)) + ns.susp = 1; if (ns.aftr_isp || ns.peer_isp || ns.user_isp) { if (ns.conn == C_SYNC_SOURCE) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 22538d9628f..e2a5875a07b 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 min_md_device_sectors = MD_RESERVED_SECT * (nbc->dc.meta_dev_idx + 1); } - if (drbd_get_capacity(nbc->md_bdev) > max_possible_sectors) - dev_warn(DEV, "truncating very big lower level device " - "to currently maximum possible %llu sectors\n", - (unsigned long long) max_possible_sectors); - if (drbd_get_capacity(nbc->md_bdev) < min_md_device_sectors) { retcode = ERR_MD_DISK_TO_SMALL; 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 nbc->known_size = drbd_get_capacity(nbc->backing_bdev); + if (nbc->known_size > max_possible_sectors) { + dev_warn(DEV, "==> truncating very big lower level device " + "to currently maximum possible %llu sectors <==\n", + (unsigned long long) max_possible_sectors); + if (nbc->dc.meta_dev_idx >= 0) + dev_warn(DEV, "==>> using internal or flexible " + "meta data may help <<==\n"); + } + drbd_suspend_io(mdev); /* also wait for the last barrier ack. */ 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 360baf60f57..9bbc509443e 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) break; } /* Else fall through to one of the other strategies... */ - dev_warn(DEV, "Discard younger/older primary did not found a decision\n" + dev_warn(DEV, "Discard younger/older primary did not find a decision\n" "Using discard-least-changes instead\n"); case ASB_DISCARD_ZERO_CHG: if (ch_peer == 0 && ch_self == 0) { @@ -3619,10 +3619,6 @@ static void drbd_disconnect(struct drbd_conf *mdev) set_bit(STOP_SYNC_TIMER, &mdev->flags); resync_timer_fn((unsigned long)mdev); - /* so we can be sure that all remote or resync reads - * made it at least to net_ee */ - wait_event(mdev->misc_wait, !atomic_read(&mdev->local_cnt)); - /* wait for all w_e_end_data_req, w_e_end_rsdata_req, w_send_barrier, * w_make_resync_request etc. which may still be on the worker queue * to be "canceled" */ diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 3678d3d66c6..d09aac4a84e 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, * corresponding hlist_del is in _req_may_be_done() */ hlist_add_head(&req->colision, ar_hash_slot(mdev, req->sector)); - set_bit(UNPLUG_REMOTE, &mdev->flags); /* why? */ + set_bit(UNPLUG_REMOTE, &mdev->flags); D_ASSERT(req->rq_state & RQ_NET_PENDING); req->rq_state |= RQ_NET_QUEUED; @@ -536,6 +536,11 @@ void __req_mod(struct drbd_request *req, enum drbd_req_event what, * * Add req to the (now) current epoch (barrier). */ + /* otherwise we may lose an unplug, which may cause some remote + * io-scheduler timeout to expire, increasing maximum latency, + * hurting performance. */ + set_bit(UNPLUG_REMOTE, &mdev->flags); + /* see drbd_make_request_common, * just after it grabs the req_lock */ D_ASSERT(test_bit(CREATE_BARRIER, &mdev->flags) == 0); diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 233db5c18b8..18942ad115d 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h @@ -53,7 +53,7 @@ extern const char *drbd_buildtag(void); -#define REL_VERSION "8.3.3rc2" +#define REL_VERSION "8.3.5" #define API_VERSION 88 #define PRO_VERSION_MIN 86 #define PRO_VERSION_MAX 91 diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index 9d067ce4696..51f47a586ad 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h @@ -70,11 +70,11 @@ /* I don't think that a tcp send buffer of more than 10M is usefull */ #define DRBD_SNDBUF_SIZE_MIN 0 #define DRBD_SNDBUF_SIZE_MAX (10<<20) -#define DRBD_SNDBUF_SIZE_DEF (2*65535) +#define DRBD_SNDBUF_SIZE_DEF 0 #define DRBD_RCVBUF_SIZE_MIN 0 #define DRBD_RCVBUF_SIZE_MAX (10<<20) -#define DRBD_RCVBUF_SIZE_DEF (2*65535) +#define DRBD_RCVBUF_SIZE_DEF 0 /* @4k PageSize -> 128kB - 512MB */ #define DRBD_MAX_BUFFERS_MIN 32 |