Re: [RFC] PATCH to fix rescan_partitions to return errors properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 04, 2006 at 10:37:49AM -0700, Suzuki Kp wrote:
> Erik Mouw wrote:
> >I disagree. It's perfectly valid for a disk not to have a partition
> >table (for example: components of a RAID5 MD device) and we shouldn't
> >scare users about that. Also an unrecognised partition table format
> >(DEC VMS, Novell Netware, etc.) is not a reason to throw an error, it's
> >just unrecognised and as far as the kernel knows it's unpartioned.
> 
> Thank you very much for the clarification.
> 
> But don't you think that, we should let know the user that he/she is 
> trying to re-read a partition table from a device, which doesn't have it 
> or is not useful for the kernel or to him, rather than making him happy 
> with a success ?

But we already do that. This is a part of the log from a 2.6.18 kernel:

SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
 sda: unknown partition table

(SATA disk without partition table. It's one out of four components for
a RAID5 MD array).

Reading the partition table from an unpartitioned device *is* a
success. If that's what the user wanted, then yes, that will make him
happy.

If we let the kernel return an error like you propose, we will get a
lot of bug reports from users plugging in their new and shiny disk:
Kernel finds no partition table and throws an error. User thinks his
shiny disk is faulty, lkml tells him it's not, user then asks why the
kernel throws an error...


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux