Re: [PATCH RFC 6/7] fs: Add more superblock error subtypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux