Re: [PATCH] efivarfs: avoid slow QueryVariableInfo() in statfs()
From: Ard Biesheuvel
Date: Fri Sep 18 2026 - 03:50:00 EST
On Thu, 17 Sep 2026, at 18:50, Prashant Singh wrote:
> 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.
>
Let's call it nostatfs.
> 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.
>
No, let's keep it simple. Thanks.