mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
mtd: Add sysfs attributes to expose the ECC stats fields
These new sysfs device attributes allow us to retrieve the ECC and bad block stats by poking a sysfs file, which is often more convenient than using the ioctl. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by: Pekon Gupta <pekon@ti.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
committed by
Brian Norris
parent
89384f6462
commit
990a3af0c2
@@ -184,3 +184,41 @@ Description:
|
||||
|
||||
It will always be a non-negative integer. In the case of
|
||||
devices lacking any ECC capability, it is 0.
|
||||
|
||||
What: /sys/class/mtd/mtdX/ecc_failures
|
||||
Date: June 2014
|
||||
KernelVersion: 3.17
|
||||
Contact: linux-mtd@lists.infradead.org
|
||||
Description:
|
||||
The number of failures reported by this device's ECC. Typically,
|
||||
these failures are associated with failed read operations.
|
||||
|
||||
It will always be a non-negative integer. In the case of
|
||||
devices lacking any ECC capability, it is 0.
|
||||
|
||||
What: /sys/class/mtd/mtdX/corrected_bits
|
||||
Date: June 2014
|
||||
KernelVersion: 3.17
|
||||
Contact: linux-mtd@lists.infradead.org
|
||||
Description:
|
||||
The number of bits that have been corrected by means of the
|
||||
device's ECC.
|
||||
|
||||
It will always be a non-negative integer. In the case of
|
||||
devices lacking any ECC capability, it is 0.
|
||||
|
||||
What: /sys/class/mtd/mtdX/bad_blocks
|
||||
Date: June 2014
|
||||
KernelVersion: 3.17
|
||||
Contact: linux-mtd@lists.infradead.org
|
||||
Description:
|
||||
The number of blocks marked as bad, if any, in this partition.
|
||||
|
||||
What: /sys/class/mtd/mtdX/bbt_blocks
|
||||
Date: June 2014
|
||||
KernelVersion: 3.17
|
||||
Contact: linux-mtd@lists.infradead.org
|
||||
Description:
|
||||
The number of blocks that are marked as reserved, if any, in
|
||||
this partition. These are typically used to store the in-flash
|
||||
bad block table (BBT).
|
||||
|
||||
Reference in New Issue
Block a user