linux/fs/xfs/xfs_error.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
 * All Rights Reserved.
 */
#include "xfs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_fs.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_errortag.h"
#include "xfs_error.h"
#include "xfs_sysfs.h"
#include "xfs_inode.h"

#ifdef DEBUG

static unsigned int xfs_errortag_random_default[] =;

struct xfs_errortag_attr {};

static inline struct xfs_errortag_attr *
to_attr(struct attribute *attr)
{}

static inline struct xfs_mount *
to_mp(struct kobject *kobject)
{}

STATIC ssize_t
xfs_errortag_attr_store(
	struct kobject		*kobject,
	struct attribute	*attr,
	const char		*buf,
	size_t			count)
{}

STATIC ssize_t
xfs_errortag_attr_show(
	struct kobject		*kobject,
	struct attribute	*attr,
	char			*buf)
{}

static const struct sysfs_ops xfs_errortag_sysfs_ops =;

#define XFS_ERRORTAG_ATTR_RW(_name, _tag)

#define XFS_ERRORTAG_ATTR_LIST(_name)

XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();
XFS_ERRORTAG_ATTR_RW();

static struct attribute *xfs_errortag_attrs[] =;
ATTRIBUTE_GROUPS();

static const struct kobj_type xfs_errortag_ktype =;

int
xfs_errortag_init(
	struct xfs_mount	*mp)
{}

void
xfs_errortag_del(
	struct xfs_mount	*mp)
{}

static bool
xfs_errortag_valid(
	unsigned int		error_tag)
{}

bool
xfs_errortag_enabled(
	struct xfs_mount	*mp,
	unsigned int		tag)
{}

bool
xfs_errortag_test(
	struct xfs_mount	*mp,
	const char		*expression,
	const char		*file,
	int			line,
	unsigned int		error_tag)
{}

int
xfs_errortag_get(
	struct xfs_mount	*mp,
	unsigned int		error_tag)
{}

int
xfs_errortag_set(
	struct xfs_mount	*mp,
	unsigned int		error_tag,
	unsigned int		tag_value)
{}

int
xfs_errortag_add(
	struct xfs_mount	*mp,
	unsigned int		error_tag)
{}

int
xfs_errortag_clearall(
	struct xfs_mount	*mp)
{}
#endif /* DEBUG */

void
xfs_error_report(
	const char		*tag,
	int			level,
	struct xfs_mount	*mp,
	const char		*filename,
	int			linenum,
	xfs_failaddr_t		failaddr)
{}

void
xfs_corruption_error(
	const char		*tag,
	int			level,
	struct xfs_mount	*mp,
	const void		*buf,
	size_t			bufsize,
	const char		*filename,
	int			linenum,
	xfs_failaddr_t		failaddr)
{}

/*
 * Complain about the kinds of metadata corruption that we can't detect from a
 * verifier, such as incorrect inter-block relationship data.  Does not set
 * bp->b_error.
 *
 * Call xfs_buf_mark_corrupt, not this function.
 */
void
xfs_buf_corruption_error(
	struct xfs_buf		*bp,
	xfs_failaddr_t		fa)
{}

/*
 * Warnings specifically for verifier errors.  Differentiate CRC vs. invalid
 * values, and omit the stack trace unless the error level is tuned high.
 */
void
xfs_buf_verifier_error(
	struct xfs_buf		*bp,
	int			error,
	const char		*name,
	const void		*buf,
	size_t			bufsz,
	xfs_failaddr_t		failaddr)
{}

/*
 * Warnings specifically for verifier errors.  Differentiate CRC vs. invalid
 * values, and omit the stack trace unless the error level is tuned high.
 */
void
xfs_verifier_error(
	struct xfs_buf		*bp,
	int			error,
	xfs_failaddr_t		failaddr)
{}

/*
 * Warnings for inode corruption problems.  Don't bother with the stack
 * trace unless the error level is turned up high.
 */
void
xfs_inode_verifier_error(
	struct xfs_inode	*ip,
	int			error,
	const char		*name,
	const void		*buf,
	size_t			bufsz,
	xfs_failaddr_t		failaddr)
{}