Re: [PATCH] efivarfs: avoid slow QueryVariableInfo() in statfs()

From: Prashant Singh

Date: Thu Sep 17 2026 - 15:49:15 EST


On Thu, 17 Sep 2026, at 10:36, Ard Biesheuvel wrote:
> Could we instead introduce a mount option that disables used/available
> reporting entirely? Feel free to set the default to 'disabled' when
> CONFIG_PREEMPT_RT is set.

Will do. I'll add a bool mount option (e.g. statfs_capacity) that, when
disabled, skips QueryVariableInfo() in statfs() and reports 0
used/available, defaulting to disabled under CONFIG_PREEMPT_RT.

If you'd rather df still show numbers without the per-statfs firmware
call, I could instead prime the value once at mount and serve that
(stale but non-zero) as a "cached" mode -- i.e. a tri-state option:

statfs_capacity=live|cached|off
live - current behaviour: rate-limited QueryVariableInfo() on statfs()
cached - prime once at mount, serve the static value (no per-statfs call)
off - report 0 used/available (no firmware call at all)

default: live on non-RT, off on CONFIG_PREEMPT_RT

Happy either way.

Thanks,
Prashant