Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ccbc432a
Commit
ccbc432a
authored
Dec 04, 2002
by
Christoph Hellwig
Committed by
Nathan Scott
Dec 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Implement xfs_panic_mask
SGI Modid: 2.5.x-xfs:slinx:134172a
parent
a04fe871
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
10 deletions
+25
-10
fs/xfs/linux/xfs_globals.c
fs/xfs/linux/xfs_globals.c
+0
-1
fs/xfs/linux/xfs_linux.h
fs/xfs/linux/xfs_linux.h
+1
-0
fs/xfs/linux/xfs_sysctl.c
fs/xfs/linux/xfs_sysctl.c
+7
-3
fs/xfs/linux/xfs_sysctl.h
fs/xfs/linux/xfs_sysctl.h
+2
-0
fs/xfs/xfs_error.c
fs/xfs/xfs_error.c
+5
-1
fs/xfs/xfs_error.h
fs/xfs/xfs_error.h
+7
-2
fs/xfs/xfs_rw.c
fs/xfs/xfs_rw.c
+3
-3
No files found.
fs/xfs/linux/xfs_globals.c
View file @
ccbc432a
...
...
@@ -37,7 +37,6 @@
#include <xfs.h>
uint64_t
xfs_panic_mask
;
/* set to cause more panics */
unsigned
long
xfs_physmem
;
/*
...
...
fs/xfs/linux/xfs_linux.h
View file @
ccbc432a
...
...
@@ -71,6 +71,7 @@
#define restricted_chown xfs_params.restrict_chown
#define irix_sgid_inherit xfs_params.sgid_inherit
#define irix_symlink_mode xfs_params.symlink_mode
#define xfs_panic_mask xfs_params.panic_mask
typedef
struct
xfs_dirent
{
/* data from readdir() */
xfs_ino_t
d_ino
;
/* inode number of entry */
...
...
fs/xfs/linux/xfs_sysctl.c
View file @
ccbc432a
...
...
@@ -40,10 +40,10 @@
extern
struct
xfsstats
xfsstats
;
STATIC
ulong
xfs_min
[
XFS_PARAM
]
=
{
0
,
0
,
0
,
0
};
STATIC
ulong
xfs_max
[
XFS_PARAM
]
=
{
1
,
1
,
1
,
1
};
STATIC
ulong
xfs_min
[
XFS_PARAM
]
=
{
0
,
0
,
0
,
0
,
0
};
STATIC
ulong
xfs_max
[
XFS_PARAM
]
=
{
1
,
1
,
1
,
1
,
127
};
xfs_param_t
xfs_params
=
{
0
,
1
,
0
,
0
};
xfs_param_t
xfs_params
=
{
0
,
1
,
0
,
0
,
0
};
static
struct
ctl_table_header
*
xfs_table_header
;
...
...
@@ -90,6 +90,10 @@ STATIC ctl_table xfs_table[] = {
sizeof
(
ulong
),
0644
,
NULL
,
&
proc_doulongvec_minmax
,
&
sysctl_intvec
,
NULL
,
&
xfs_min
[
5
],
&
xfs_max
[
5
]},
{
XFS_PANIC_MASK
,
"panic_mask"
,
&
xfs_params
.
panic_mask
,
sizeof
(
ulong
),
0644
,
NULL
,
&
proc_doulongvec_minmax
,
&
sysctl_intvec
,
NULL
,
&
xfs_min
[
6
],
&
xfs_max
[
6
]},
{
0
}
};
...
...
fs/xfs/linux/xfs_sysctl.h
View file @
ccbc432a
...
...
@@ -47,6 +47,7 @@ typedef struct xfs_param {
ulong
sgid_inherit
;
/* Inherit ISGID bit if process' GID is */
/* not a member of the parent dir GID. */
ulong
symlink_mode
;
/* Symlink creat mode affected by umask. */
ulong
panic_mask
;
/* bitmask to specify panics on errors. */
}
xfs_param_t
;
enum
{
...
...
@@ -54,6 +55,7 @@ enum {
XFS_RESTRICT_CHOWN
=
2
,
XFS_SGID_INHERIT
=
3
,
XFS_SYMLINK_MODE
=
4
,
XFS_PANIC_MASK
=
5
,
};
extern
xfs_param_t
xfs_params
;
...
...
fs/xfs/xfs_error.c
View file @
ccbc432a
...
...
@@ -224,11 +224,15 @@ xfs_cmn_err(uint64_t panic_tag, int level, xfs_mount_t *mp, char *fmt, ...)
{
va_list
ap
;
#ifdef DEBUG
xfs_panic_mask
|=
XFS_PTAG_SHUTDOWN_CORRUPT
;
#endif
if
(
xfs_panic_mask
&&
(
xfs_panic_mask
&
panic_tag
)
&&
(
level
&
CE_ALERT
))
{
level
&=
~
CE_ALERT
;
level
|=
CE_PANIC
;
cmn_err
(
CE_ALERT
,
"
Transforming an alert into a panic
."
);
cmn_err
(
CE_ALERT
,
"
XFS: Transforming an alert into a BUG
."
);
}
va_start
(
ap
,
fmt
);
xfs_fs_vcmn_err
(
level
,
mp
,
fmt
,
ap
);
...
...
fs/xfs/xfs_error.h
View file @
ccbc432a
...
...
@@ -138,13 +138,18 @@ int xfs_errortag_clearall_umount(int64_t fsid, char *fsname,
/*
* XFS panic tags -- allow a call to xfs_cmn_err() be turned into
* a panic by setting xfs_panic_mask in the
* stune file.
* a panic by setting xfs_panic_mask in a
* sysctl. update xfs_max[XFS_PARAM] if
* more are added.
*/
#define XFS_NO_PTAG 0LL
#define XFS_PTAG_IFLUSH 0x0000000000000001LL
#define XFS_PTAG_LOGRES 0x0000000000000002LL
#define XFS_PTAG_AILDELETE 0x0000000000000004LL
#define XFS_PTAG_AVAILABLE 0x0000000000000008LL
#define XFS_PTAG_SHUTDOWN_CORRUPT 0x0000000000000010LL
#define XFS_PTAG_SHUTDOWN_IOERROR 0x0000000000000020LL
#define XFS_PTAG_SHUTDOWN_LOGERROR 0x0000000000000040LL
struct
xfs_mount
;
/* PRINTFLIKE4 */
...
...
fs/xfs/xfs_rw.c
View file @
ccbc432a
...
...
@@ -116,16 +116,16 @@ xfs_do_force_shutdown(
return
;
if
(
flags
&
XFS_CORRUPT_INCORE
)
{
cmn_err
(
CE_ALERT
,
xfs_cmn_err
(
XFS_PTAG_SHUTDOWN_CORRUPT
,
CE_ALERT
,
mp
,
"Corruption of in-memory data detected. Shutting down filesystem: %s"
,
mp
->
m_fsname
);
}
else
if
(
!
(
flags
&
XFS_FORCE_UMOUNT
))
{
if
(
logerror
)
{
cmn_err
(
CE_ALERT
,
xfs_cmn_err
(
XFS_PTAG_SHUTDOWN_LOGERROR
,
CE_ALERT
,
mp
,
"Log I/O Error Detected. Shutting down filesystem: %s"
,
mp
->
m_fsname
);
}
else
if
(
!
(
flags
&
XFS_SHUTDOWN_REMOTE_REQ
))
{
cmn_err
(
CE_ALERT
,
xfs_cmn_err
(
XFS_PTAG_SHUTDOWN_IOERROR
,
CE_ALERT
,
mp
,
"I/O Error Detected. Shutting down filesystem: %s"
,
mp
->
m_fsname
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment