[PATCH 1/2] NBD: set uninitialized devices to size 0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Clements
Date: Friday, August 24, 2007 - 10:06 am

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.

Patch applies and was tested against 2.6.23-rc2-mm2.

Thanks,
Paul
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] NBD: set uninitialized devices to size 0, Paul Clements, (Fri Aug 24, 10:06 am)
[PATCH 2/2] NBD: allow hung network I/O to be cancelled, Paul Clements, (Fri Aug 24, 10:40 am)
Re: [PATCH 1/2] NBD: set uninitialized devices to size 0, Andrew Morton, (Fri Aug 24, 4:48 pm)
Re: [PATCH 1/2] NBD: set uninitialized devices to size 0, Bill Davidsen, (Tue Aug 28, 7:54 pm)