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.
>>
>> http://lxr.linux.no/#linux+v2.6.36/include/linux/ata.h#L799
>>
>> 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.

Thanks
Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux