Sysfs data is straightforward so we don't need parsing anymore.
Also removed periodical check since data is set only once during
driver initialization. Checking at every device boot or storaged
restart should be sufficient to monitor long term status change.
Test: adb logcat -d -b events | grep storaged_emmc_info
Bug: 36228467
Change-Id: I2a181f52c9f19de1e679a3a905aaebafe4d08227
It's an error to pass open O_CREAT without giving it mode bits:
https://linux.die.net/man/3/open
Bug: 32073964
Test: Compiles with clang FORTIFY.
Change-Id: Iaa78c3003ed960e1ffe7e56623dba33db4e17443
Add uid_monitor class to query /proc/uid_io/stats periodically.
Add a log tag to record any UID that exceeds IO threshold.
Test: adb shell storaged -u
Bug: 34198239
Change-Id: I53568c30dbefe2f4bdb18054d3dedb30b4133d8b
Storaged periodically checks the devices' disk stats and eMMC lifetime.
This information is logged to both the kernel and event log. By event
logging, the data can be aggregated by the checkin service and then
sent to Sawmill.
It also periodically traverses /proc/[pid], maintaining the I/O usage of
all tasks (all sampled tasks). The task I/O data can be reported using
the --dump option.
Storaged is booted when the device boots up and requires the permission
for reading /proc/diskstats, /proc/[pid]/io and debugfs(eMMC ext_csd).
For detailed description, please refer to go/storaged.
Bug: 28826771
Change-Id: I774b1a44cc30092bac1bfcbc08bf487295e7cfed