lkml.org 
[lkml]   [2023]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] tracing: user_event fix for 6.4
On Fri, 23 Jun 2023 at 12:29, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Before user events become an ABI, fix the return value of the write
> operation when tracing is disabled. It should not return an error, but
> simply report it wrote zero bytes. Just like any other write operation
> that doesn't write data but does not "fail".

This makes no sense.

A write() returning 0 means "Disk full". It's most definitely an
error, and a failure.

But zero is not a particularly _good_ failure code. At least not
unless your tracing disk is full. Is it?

If tracing is disabled, and you write something to it, I would expect
to get a valid and reasonable error code back. Something like EINVAL
or EIO or something to show "you did something wrong".

I do not at all understand the sentence

"When user_events are disabled, its write operation should return zero"

as an "explanation" for this, and my immediate reaction is "Really?
Why? That makes no sense".

Linus

\
 
 \ /
  Last update: 2023-06-24 01:22    [W:0.138 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site