Skip to content

Commit

Permalink
smart: Clarify ID_ATA_SMART_ACCESS udev property values
Browse files Browse the repository at this point in the history
Turned out the value of 'none' is actually useful to blacklist
and prevent any I/O to a device that would break, disconnect
or otherwise error out.

https://bugzilla.redhat.com/show_bug.cgi?id=515881#c24
  • Loading branch information
tbzatek committed Sep 27, 2024
1 parent b893c4b commit 35275fa
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/plugins/smart/smart-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,25 @@
* libblockdev generally tends to avoid any udev interaction, leaving the burden
* to callers.
*
* Valid values for this property include `auto`, `linux-ide`, `sat16`, `sat12`,
* `sunplus`, `jmicron`.
* Valid values for this property include:
* - `'sat16'`: 16 Byte SCSI ATA SAT Passthru
* - `'sat12'`: 12 Byte SCSI ATA SAT Passthru
* - `'linux-ide'`: Native Linux IDE
* - `'sunplus'`: SunPlus USB/ATA bridges
* - `'jmicron'`: JMicron USB/ATA bridges
* - `'none'`: No access method, avoid any I/O and ignore the device
* - `'auto'`: Autodetection based on parent subsystem (default)
*
* A common example to override QEMU ATA device type, which often requires legacy
* IDE protocol:
* |[
* KERNEL=="sd*", ENV{ID_VENDOR}=="ATA", ENV{ID_MODEL}=="QEMU_HARDDISK", ENV{ID_ATA}=="1", ENV{ID_ATA_SMART_ACCESS}="linux-ide"
* ]|
*
* An example of blacklisting a USB device, in case of errors caused by reading SMART data:
* |[
* ATTRS{idVendor}=="152d", ATTRS{idProduct}=="2329", ENV{ID_ATA_SMART_ACCESS}="none"
* ]|
*/

/**
Expand Down

0 comments on commit 35275fa

Please sign in to comment.