From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, khazhy@google.com,
adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
linux-fsdevel@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH RFC 6/7] fs: Add more superblock error subtypes
Date: Wed, 21 Oct 2020 11:21:04 -0400 [thread overview]
Message-ID: <20201021152104.GO181507@mit.edu> (raw)
In-Reply-To: <20201020191543.601784-7-krisman@collabora.com>
On Tue, Oct 20, 2020 at 03:15:42PM -0400, Gabriel Krisman Bertazi wrote:
> diff --git a/include/uapi/linux/watch_queue.h b/include/uapi/linux/watch_queue.h
> index d0a45a4ded7d..6bfe35dc7b5d 100644
> --- a/include/uapi/linux/watch_queue.h
> +++ b/include/uapi/linux/watch_queue.h
> @@ -110,6 +110,10 @@ enum superblock_notification_type {
> NOTIFY_SUPERBLOCK_ERROR = 1, /* Error in filesystem or blockdev */
> NOTIFY_SUPERBLOCK_EDQUOT = 2, /* EDQUOT notification */
> NOTIFY_SUPERBLOCK_NETWORK = 3, /* Network status change */
> + NOTIFY_SUPERBLOCK_INODE_ERROR = 4, /* Inode Error */
> + NOTIFY_SUPERBLOCK_WARNING = 5, /* Filesystem warning */
> + NOTIFY_SUPERBLOCK_INODE_WARNING = 6, /* Filesystem inode warning */
> + NOTIFY_SUPERBLOCK_MSG = 7, /* Filesystem message */
> };
Hmm, I wonder if this is the right break down. In ext4 we have
ext4_error() and ext4_error_inode(), but that's just a convenience so
that if there is an error number, we can log information relating to
the inode. It's unclear if we need to break apart *_WARNING and
*INODE_WARNING in the notification types. So I'd suggest dropping
*_INODE_ERROR and *_INODE_WARNING and let those get subsumed into
*_ERROR and *_WARNING. We can include the __64 for block and inode
numbers for *_ERROR and _*WARNING, which can be non-zero if they are
available for a particular notification.
I *do* thnk we should separate out file system error and blockdev
warnings, however. So maybe NOTIFY_SUPERBLOCK_ERROR should be
redifined to mean only "file system level error" and we should add a
NOTIFY_SUPERBLOCK_EIO for an I/O errors coming from the block device.
For that notification type, we can add a __u8 or __u32 containing the
BLK_STS_* errors.
I suspect in the future we should also consider a new block device
notification scheme, where we can provide more detailed information
such as SCSI sense codes, etc. But that's a separable feature, I
think.
Cheers,
- Ted
next prev parent reply other threads:[~2020-10-21 15:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 19:15 [PATCH RFC 0/7] Superblock notifications Gabriel Krisman Bertazi
2020-10-20 19:15 ` [PATCH RFC 1/7] watch_queue: Make watch_sizeof() check record size Gabriel Krisman Bertazi
2020-10-20 19:15 ` [PATCH RFC 2/7] security: Add hooks to rule on setting a watch for superblock Gabriel Krisman Bertazi
2020-10-20 19:15 ` [PATCH RFC 3/7] watch_queue: Support a text field at the end of the notification Gabriel Krisman Bertazi
2020-10-20 19:15 ` [PATCH RFC 4/7] vfs: Add superblock notifications Gabriel Krisman Bertazi
2020-10-20 19:15 ` [PATCH RFC 5/7] vfs: Include origin of the SB error notification Gabriel Krisman Bertazi
2020-10-20 19:15 ` [PATCH RFC 6/7] fs: Add more superblock error subtypes Gabriel Krisman Bertazi
2020-10-21 15:21 ` Theodore Y. Ts'o [this message]
2020-10-20 19:15 ` [PATCH RFC 7/7] ext4: Implement SB error notification through watch_sb Gabriel Krisman Bertazi
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=20201021152104.GO181507@mit.edu \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=dhowells@redhat.com \
--cc=kernel@collabora.com \
--cc=khazhy@google.com \
--cc=krisman@collabora.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).