Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172939
b: refs/heads/master
c: 1352994
h: refs/heads/master
i:
  172937: 48e122d
  172935: 667ec0e
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Nov 4, 2009
1 parent 1b7333f commit eb1f39b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad19bf6e544f4d1abc22d2be130c7d5e4163146f
refs/heads/master: 1352994b363195ce932749d3518d4dc9a5479fea
14 changes: 9 additions & 5 deletions trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, "
Expand All @@ -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));
Expand Down

0 comments on commit eb1f39b

Please sign in to comment.