diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2010-12-12 11:45:41 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:36:35 -0500 |
commit | 24dccabb390412d04435e11cfb535df51def7b2d (patch) | |
tree | ab418eebdb9040302bf06a6d608f722dd3188ebe /drivers/block | |
parent | 2c46407d241f4b0e5b87959aae8f50f41fdd2a3a (diff) |
drbd: Fix: drbd_bitmap_io does not return an enum determine_dev_size
I guess bitmap I/O errors are supposed to cause drbd_determin_dev_size
to return dev_size_error.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index ada5483f7e56..2f0724982143 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -643,11 +643,17 @@ enum determine_dev_size drbd_determin_dev_size(struct drbd_conf *mdev, enum dds_ | |||
643 | || prev_size != mdev->ldev->md.md_size_sect; | 643 | || prev_size != mdev->ldev->md.md_size_sect; |
644 | 644 | ||
645 | if (la_size_changed || md_moved) { | 645 | if (la_size_changed || md_moved) { |
646 | int err; | ||
647 | |||
646 | drbd_al_shrink(mdev); /* All extents inactive. */ | 648 | drbd_al_shrink(mdev); /* All extents inactive. */ |
647 | dev_info(DEV, "Writing the whole bitmap, %s\n", | 649 | dev_info(DEV, "Writing the whole bitmap, %s\n", |
648 | la_size_changed && md_moved ? "size changed and md moved" : | 650 | la_size_changed && md_moved ? "size changed and md moved" : |
649 | la_size_changed ? "size changed" : "md moved"); | 651 | la_size_changed ? "size changed" : "md moved"); |
650 | rv = drbd_bitmap_io(mdev, &drbd_bm_write, "size changed"); /* does drbd_resume_io() ! */ | 652 | err = drbd_bitmap_io(mdev, &drbd_bm_write, "size changed"); /* does drbd_resume_io() ! */ |
653 | if (err) { | ||
654 | rv = dev_size_error; | ||
655 | goto out; | ||
656 | } | ||
651 | drbd_md_mark_dirty(mdev); | 657 | drbd_md_mark_dirty(mdev); |
652 | } | 658 | } |
653 | 659 | ||