Commit 9ba7806f authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

bump smartctl timeout in helper

bad firmwares may cause ioctl calls to time out which takes notably
longer than the standard 30 second timeout of qprocess. instead opt for
a 65 second timeout which should be sufficient to allow for internal
smartctl timeouts.

the only downside to a longer timeout is that potentially malfunctioning
firmwares will slow down the refresh checks of other devices from
finishing as well (since queries are sequential because kauth itself
isn't re-entrant). on the plus side we'll then cover devices so long as
they have data

BUG: 428844
FIXED-IN: 5.20.4
parent 15734829
......@@ -70,7 +70,13 @@ ActionReply SMARTHelper::smartctl(const QVariantMap &args)
{ QStringLiteral("--all"), QStringLiteral("--json=c"), devicePath },
// Wait for 120 seconds + 5 seconds leeway.
// This allows us to ideally let smartctl time out internally and still
// construct a json blob if possible. The kernel ioctl timeout for nvme
// apparently is 60 seconds and internal smartctl timeouts also largely
// appear to be in that range but there may be more than one :|
ActionReply reply;
reply.addData(QStringLiteral("exitCode"), p.exitCode());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment