From 4b86a872561ad052bdc6f092a06807822d26beb1 Mon Sep 17 00:00:00 2001 From: Paul Clements Date: Tue, 16 Oct 2007 23:27:36 -0700 Subject: [PATCH] NBD: set uninitialized devices to size 0 This fixes errors with utilities (such as LVM's vgscan) that try to scan all devices. Previously this would generate read errors when uninitialized nbd devices were scanned: # vgscan Reading all physical volumes. This may take a while... /dev/nbd0: read failed after 0 of 1024 at 0: Input/output error /dev/nbd0: read failed after 0 of 1024 at 509804544: Input/output error /dev/nbd0: read failed after 0 of 2048 at 0: Input/output error /dev/nbd1: read failed after 0 of 1024 at 509804544: Input/output error /dev/nbd1: read failed after 0 of 2048 at 0: Input/output error From now on, uninitialized nbd devices will have size zero, which prevents these errors. Signed-off-by: Paul Clements Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed