diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2015-03-24 20:35:26 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-11-25 16:22:02 (GMT) |
commit | edb5e5f63d80c368467e4a0628c5b6d30f1673eb (patch) | |
tree | a3352874f2a331f4537bfd2def1b9226169d8a1a /drivers/block/drbd/drbd_main.c | |
parent | 5fb3bc4ddcdda8d2a6b2185075d140b9009f99b5 (diff) | |
download | linux-edb5e5f63d80c368467e4a0628c5b6d30f1673eb.tar.xz |
drbd: fix spurious alert level printk
When accessing out meta data area on disk, we double check the
plausibility of the requested sector offsets, and are very noisy about
it if they look suspicious.
During initial read of our "superblock", for "external" meta data,
this triggered because the range estimate returned by
drbd_md_last_sector() was still wrong.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 3a9a0f1..a4aa7eb 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -3270,6 +3270,10 @@ int drbd_md_read(struct drbd_device *device, struct drbd_backing_dev *bdev) * and read it. */ bdev->md.meta_dev_idx = bdev->disk_conf->meta_dev_idx; bdev->md.md_offset = drbd_md_ss(bdev); + /* Even for (flexible or indexed) external meta data, + * initially restrict us to the 4k superblock for now. + * Affects the paranoia out-of-range access check in drbd_md_sync_page_io(). */ + bdev->md.md_size_sect = 8; if (drbd_md_sync_page_io(device, bdev, bdev->md.md_offset, READ)) { /* NOTE: can't do normal error processing here as this is |