Re: Is there a reliable way to ID a SSD?

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

On Tue, Jan 4, 2011 at 10:47 AM, Mark Lord <kernel@xxxxxxxxxxxx> wrote:
> On 11-01-03 05:50 PM, Greg Freemyer wrote:
>> Would it be better if hdparm looked at /sys/block/sda/queue/rotational
>> instead of just using word 217 of the identify block?
>> The current divergence is:
>> 1) The kernel routine  ata_id_rotation_rate() (in ata.h) is only
>> trusting  word 217 if its ATA7 or higher.
>> 2) There have been a couple proposed kernel patches to libata-scsi.c
>> to quirk in a HORKAGE flag to set the rotation_rate to 1 (meaning SSD)
>> for some known devices.  I don't see those being ACKed yet, but if one
>> ever gets in, hdparm will diverge from the kernels info since its
>> going straight to the identify block for its info.
> That's what hdparm is for.  It reads only from the identify block
> for most of the -I output, so that we (kernel developers) can see
> exactly what the drive itself is reporting.
> This reporting is what makes it useful, rather than simply parroting
> whatever is already reported (or not) in /sys/
> Cheers

Interesting to know.  Maybe the man page could be even more explicit about that.

ie. it currently says:

-I     Request identification info directly from the drive, which is
displayed in a new expanded format with considerably more detail than
with the older -i flag.


Maybe an additional sentence or two like::

This explicitly avoids all kernel quirk logic, thus -I is reporting
exactly what the drive reports and may not agree with other kernel
ABI's which are typically impacted by various kernel quirk logic.  In
some cases when decoding the Identify Block, it will decode and report
information regardless of the ATA  standard supported.

I gather that last sentence from the fact hdparm is decoding word 217
for all drives, even though it is not defined until ATA8, but glancing
at the source, in other situations it appears to take the ATA standard
for the drive into account during the identify block decoding.

To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux