Re: [PATCH v2 2/3] fs/resctrl: Return -EINVAL for a missing seq_show implementation

From: Reinette Chatre

Date: Wed Dec 17 2025 - 00:03:38 EST


Hi Aaron,

How is this change required to support the feature of enabling user to
set CBM across domains?

On 12/15/25 3:02 PM, Aaron Tomlin wrote:
> The rdtgroup_seqfile_show() function, which is the sequence file handler
> for reading data from resctrl files, previously returned 0 (success) if
> the file's associated rftype did not define a .seq_show implementation.
>
> This behavior is incorrect and confusing, as a read operation that
> does not define a display function should be treated as an error.

Why should it be treated as an error? Not having rftype::seq_show() set when
user is intended to be able to see data when reading from the file is a kernel
bug. Otherwise it seems fine to return nothing when there is nothing to show
and doing so be successful.

Reinette