linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,  Jan Kara <jack@suse.cz>,
	 lsf-pc <lsf-pc@lists.linux-foundation.org>,
	 linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] tracing the source of errors
Date: Thu, 08 Feb 2024 15:47:38 -0500	[thread overview]
Message-ID: <871q9mvg2d.fsf@mailhost.krisman.be> (raw)
In-Reply-To: <ZcNw-ek8s3AHxxCB@casper.infradead.org> (Matthew Wilcox's message of "Wed, 7 Feb 2024 12:00:57 +0000")

Matthew Wilcox <willy@infradead.org> writes:

> Option (b)
>
> -#define EINVAL		22
> +#define E_INVAL	22
> +#define EINVAL		ERR(E_INVAL)

Note there will surely be cases where EINVAL is used as a soft failure
and the kernel will just try something else, instead of propagating the
error up the stack.  In this case, there is no point in logging the
first case of error, as it will just be expected behavior.

So there's really no way around explicitly annotating (ERR (EINVAL))
in place where it really matters, instead of changing the definition
of -EINVAL itself or automatically converting check sites.

>
> and then change all code that does something like:
>
> 	if (err == -EINVAL)
> to
> 	if (err == -E_INVAL)
>
> Or have I misunderstood?



-- 
Gabriel Krisman Bertazi

  parent reply	other threads:[~2024-02-08 20:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07  9:54 [LSF/MM/BPF TOPIC] tracing the source of errors Miklos Szeredi
2024-02-07 11:00 ` [Lsf-pc] " Jan Kara
2024-02-07 11:23   ` Miklos Szeredi
2024-02-07 12:00     ` Matthew Wilcox
2024-02-07 12:19       ` Miklos Szeredi
2024-02-08 20:47       ` Gabriel Krisman Bertazi [this message]
2024-02-07 19:29     ` Eric Sandeen
2024-02-08 20:39   ` Gabriel Krisman Bertazi
2024-02-07 17:16 ` Darrick J. Wong
2024-02-07 21:37 ` Dave Chinner
2024-02-08  9:09   ` Miklos Szeredi
2024-02-09  2:27     ` Dave Chinner
2024-02-08 15:57   ` Matthew Wilcox
2024-02-09  1:55     ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q9mvg2d.fsf@mailhost.krisman.be \
    --to=krisman@suse.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=miklos@szeredi.hu \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).