drbd: fix spurious alert level printk
authorLars Ellenberg <lars.ellenberg@linbit.com>
Tue, 24 Mar 2015 20:35:26 +0000 (21:35 +0100)
committerJens Axboe <axboe@fb.com>
Wed, 25 Nov 2015 16:22:02 +0000 (09:22 -0700)
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>
drivers/block/drbd/drbd_main.c

index 3a9a0f11200426771d0c9bffe77d6cc4a4f54c9c..a4aa7eb5507d8595cc6ccd779168ba81398a6d52 100644 (file)
@@ -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
This page took 0.027786 seconds and 5 git commands to generate.