[an error occurred while processing this directive]
|
|
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191213185002.GC273569@mit.edu>
Date: Fri, 13 Dec 2019 13:50:02 -0500
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Jan Kara <jack@...e.cz>
Cc: Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH -v2 1/2] ext4: save the error code which triggered an
ext4_error() in the superblock
On Fri, Dec 13, 2019 at 12:29:10PM +0100, Jan Kara wrote:
> On Tue 03-12-19 22:23:34, Theodore Ts'o wrote:
> > This allows the cause of an ext4_error() report to be categorized
> > based on whether it was triggered due to an I/O error, or an memory
> > allocation error, or other possible causes. Most errors are caused by
> > a detected file system inconsistency, so the default code stored in
> > the superblock will be EXT4_ERR_EFSCORRUPTED.
> >
> > Previous-Version-Link: https://lore.kernel.org/r/20191121183036.29385-1-tytso@mit.edu
> > Signed-off-by: Theodore Ts'o <tytso@....edu>
>
> Somewhat late to the party but: Seeing that you basically call
> ext4_set_errno() before every ext4_error() call (or its variants), won't it
> be more concise and less error proned to add errno as an argument to
> ext4_error() and handle setting from there? Or are there times where you
> don't want error set?
There are about 100 calls to ext4_error or its variants in fs/ext4.
This patch inserts ext4_set_errno() before roughly 20 of them. Most
of the time, we call ext4_error() because we've found a file system
inconsistency. So the default if ext4_set_errno() hasn't been called
is EXT4_ERR_EFSCORRUPTED.
I thought about adding errno as an argument to ext4_error(), but it
would have substantially increased the size of the patch.
Cheers,
- Ted
Powered by blists - more mailing lists