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
nexedi
linux
Commits
6693befa
Commit
6693befa
authored
Oct 15, 2002
by
Eric Sandeen
Committed by
Christoph Hellwig
Oct 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XFS: Clean up xfs' log message printing
Modid: 2.5.x-xfs:slinx:129771a
parent
95539719
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
28 additions
and
48 deletions
+28
-48
fs/xfs/support/debug.c
fs/xfs/support/debug.c
+10
-29
fs/xfs/xfs_dir.c
fs/xfs/xfs_dir.c
+4
-4
fs/xfs/xfs_dir_leaf.c
fs/xfs/xfs_dir_leaf.c
+1
-1
fs/xfs/xfs_error.c
fs/xfs/xfs_error.c
+1
-1
fs/xfs/xfs_fsops.c
fs/xfs/xfs_fsops.c
+2
-2
fs/xfs/xfs_iget.c
fs/xfs/xfs_iget.c
+0
-1
fs/xfs/xfs_log.c
fs/xfs/xfs_log.c
+1
-1
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_log_recover.c
+3
-3
fs/xfs/xfs_qm.c
fs/xfs/xfs_qm.c
+2
-2
fs/xfs/xfs_rw.c
fs/xfs/xfs_rw.c
+1
-1
fs/xfs/xfs_trans_buf.c
fs/xfs/xfs_trans_buf.c
+1
-1
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vfsops.c
+2
-2
No files found.
fs/xfs/support/debug.c
View file @
6693befa
...
...
@@ -40,6 +40,11 @@ int doass = 1;
static
char
message
[
256
];
/* keep it off the stack */
static
spinlock_t
xfs_err_lock
=
SPIN_LOCK_UNLOCKED
;
/* Translate from CE_FOO to KERN_FOO, err_level(CE_FOO) == KERN_FOO */
static
char
*
err_level
[
8
]
=
{
KERN_EMERG
,
KERN_ALERT
,
KERN_CRIT
,
KERN_ERR
,
KERN_WARNING
,
KERN_NOTICE
,
KERN_INFO
,
KERN_DEBUG
};
void
assfail
(
char
*
a
,
char
*
f
,
int
l
)
{
...
...
@@ -71,10 +76,7 @@ get_thread_id(void)
return
current
->
pid
;
}
# define xdprintk(format...) printk(format)
#else
# define xdprintk(format...) do { } while (0)
#endif
#endif
/* DEBUG */
void
cmn_err
(
register
int
level
,
char
*
fmt
,
...)
...
...
@@ -86,18 +88,7 @@ cmn_err(register int level, char *fmt, ...)
va_start
(
ap
,
fmt
);
if
(
*
fmt
==
'!'
)
fp
++
;
vsprintf
(
message
,
fp
,
ap
);
switch
(
level
)
{
case
CE_CONT
:
case
CE_WARN
:
printk
(
"%s
\n
"
,
message
);
break
;
case
CE_DEBUG
:
xdprintk
(
"%s
\n
"
,
message
);
break
;
default:
printk
(
"%s
\n
"
,
message
);
break
;
}
printk
(
"%s%s
\n
"
,
err_level
[
level
],
message
);
va_end
(
ap
);
spin_unlock
(
&
xfs_err_lock
);
...
...
@@ -111,18 +102,8 @@ icmn_err(register int level, char *fmt, va_list ap)
{
spin_lock
(
&
xfs_err_lock
);
vsprintf
(
message
,
fmt
,
ap
);
switch
(
level
)
{
case
CE_CONT
:
case
CE_WARN
:
printk
(
"%s"
,
message
);
break
;
case
CE_DEBUG
:
xdprintk
(
"%s"
,
message
);
break
;
default:
printk
(
"cmn_err level %d "
,
level
);
printk
(
"%s
\n
"
,
message
);
break
;
}
spin_unlock
(
&
xfs_err_lock
);
printk
(
"%s%s
\n
"
,
err_level
[
level
],
message
);
if
(
level
==
CE_PANIC
)
BUG
();
}
fs/xfs/xfs_dir.c
View file @
6693befa
...
...
@@ -534,7 +534,7 @@ xfs_dir_shortform_validate_ondisk(xfs_mount_t *mp, xfs_dinode_t *dp)
return
0
;
}
if
(
INT_GET
(
dp
->
di_core
.
di_size
,
ARCH_CONVERT
)
<
sizeof
(
sf
->
hdr
))
{
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"Invalid shortform size: dp 0x%p
\n
"
,
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"Invalid shortform size: dp 0x%p"
,
dp
);
return
1
;
}
...
...
@@ -546,7 +546,7 @@ xfs_dir_shortform_validate_ondisk(xfs_mount_t *mp, xfs_dinode_t *dp)
count
=
sf
->
hdr
.
count
;
if
((
count
<
0
)
||
((
count
*
10
)
>
XFS_LITINO
(
mp
)))
{
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"Invalid shortform count: dp 0x%p
\n
"
,
dp
);
"Invalid shortform count: dp 0x%p"
,
dp
);
return
(
1
);
}
...
...
@@ -561,7 +561,7 @@ xfs_dir_shortform_validate_ondisk(xfs_mount_t *mp, xfs_dinode_t *dp)
xfs_dir_ino_validate
(
mp
,
ino
);
if
(
sfe
->
namelen
>=
XFS_LITINO
(
mp
))
{
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"Invalid shortform namelen: dp 0x%p
\n
"
,
dp
);
"Invalid shortform namelen: dp 0x%p"
,
dp
);
return
1
;
}
namelen_sum
+=
sfe
->
namelen
;
...
...
@@ -569,7 +569,7 @@ xfs_dir_shortform_validate_ondisk(xfs_mount_t *mp, xfs_dinode_t *dp)
}
if
(
namelen_sum
>=
XFS_LITINO
(
mp
))
{
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"Invalid shortform namelen: dp 0x%p
\n
"
,
dp
);
"Invalid shortform namelen: dp 0x%p"
,
dp
);
return
1
;
}
...
...
fs/xfs/xfs_dir_leaf.c
View file @
6693befa
...
...
@@ -105,7 +105,7 @@ xfs_dir_ino_validate(xfs_mount_t *mp, xfs_ino_t ino)
XFS_AGINO_TO_INO
(
mp
,
agno
,
agino
)
==
ino
;
if
(
XFS_TEST_ERROR
(
!
ino_ok
,
mp
,
XFS_ERRTAG_DIR_INO_VALIDATE
,
XFS_RANDOM_DIR_INO_VALIDATE
))
{
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"Invalid inode number 0x%Lx
\n
"
,
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"Invalid inode number 0x%Lx"
,
(
unsigned
long
long
)
ino
);
return
XFS_ERROR
(
EFSCORRUPTED
);
}
...
...
fs/xfs/xfs_error.c
View file @
6693befa
...
...
@@ -89,7 +89,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
for
(
i
=
0
;
i
<
XFS_NUM_INJECT_ERROR
;
i
++
)
{
if
(
xfs_etest
[
i
]
==
error_tag
&&
xfs_etest_fsid
[
i
]
==
fsid
)
{
cmn_err
(
CE_WARN
,
"Injecting error (%s) at file %s, line %d, on filesystem
\"
%s
\"
\n
"
,
"Injecting error (%s) at file %s, line %d, on filesystem
\"
%s
\"
"
,
expression
,
file
,
line
,
xfs_etest_fsname
[
i
]);
return
1
;
}
...
...
fs/xfs/xfs_fsops.c
View file @
6693befa
...
...
@@ -353,7 +353,7 @@ xfs_growfs_data_private(
sectbb
,
0
,
&
bp
);
if
(
error
)
{
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"error %d reading secondary superblock for ag %d
\n
"
,
"error %d reading secondary superblock for ag %d"
,
error
,
agno
);
break
;
}
...
...
@@ -368,7 +368,7 @@ xfs_growfs_data_private(
continue
;
}
else
{
xfs_fs_cmn_err
(
CE_WARN
,
mp
,
"write error %d updating secondary superblock for ag %d
\n
"
,
"write error %d updating secondary superblock for ag %d"
,
error
,
agno
);
break
;
/* no point in continuing */
}
...
...
fs/xfs/xfs_iget.c
View file @
6693befa
...
...
@@ -245,7 +245,6 @@ xfs_iget_core(
cmn_err
(
CE_PANIC
,
"xfs_iget_core: ambiguous vns: vp/0x%p, invp/0x%p"
,
inode_vp
,
vp
);
BUG
();
}
read_unlock
(
&
ih
->
ih_lock
);
...
...
fs/xfs/xfs_log.c
View file @
6693befa
...
...
@@ -2064,7 +2064,7 @@ xlog_state_do_callback(
}
while
(
first_iclog
!=
iclog
);
if
(
repeats
&&
(
repeats
%
10
)
==
0
)
{
xfs_fs_cmn_err
(
CE_WARN
,
log
->
l_mp
,
"xlog_state_do_callback: looping %d
\n
"
,
repeats
);
"xlog_state_do_callback: looping %d"
,
repeats
);
}
}
while
(
!
ioerrors
&&
loopdidcallbacks
);
...
...
fs/xfs/xfs_log_recover.c
View file @
6693befa
...
...
@@ -476,7 +476,7 @@ xlog_find_head(xlog_t *log,
* mkfs etc write a dummy unmount record to a fresh
* log so we can store the uuid in there
*/
xlog_warn
(
"XFS: totally zeroed log
\n
"
);
xlog_warn
(
"XFS: totally zeroed log"
);
}
return
0
;
...
...
@@ -3142,7 +3142,7 @@ xlog_unpack_data(xlog_rec_header_t *rhead,
"XFS: Disregard message if filesystem was created with non-DEBUG kernel"
);
if
(
XFS_SB_VERSION_HASLOGV2
(
&
log
->
l_mp
->
m_sb
))
{
cmn_err
(
CE_DEBUG
,
"XFS: LogR this is a LogV2 filesystem
\n
"
);
"XFS: LogR this is a LogV2 filesystem"
);
}
log
->
l_flags
|=
XLOG_CHKSUM_MISMATCH
;
}
...
...
@@ -3619,7 +3619,7 @@ xlog_recover_finish(xlog_t *log, int mfsi_flags)
log
->
l_flags
&=
~
XLOG_RECOVERY_NEEDED
;
}
else
{
cmn_err
(
CE_DEBUG
,
"!Ending clean XFS mount for filesystem: %s
\n
"
,
"!Ending clean XFS mount for filesystem: %s"
,
log
->
l_mp
->
m_fsname
);
}
return
0
;
...
...
fs/xfs/xfs_qm.c
View file @
6693befa
...
...
@@ -1039,14 +1039,14 @@ xfs_qm_unmount(
vp
=
XFS_ITOV
(
XFS_QI_UQIP
(
mp
));
VN_RELE
(
vp
);
if
(
vn_count
(
vp
)
>
1
)
cmn_err
(
CE_WARN
,
"UQUOTA busy vp=0x%x count=%d
\n
"
,
cmn_err
(
CE_WARN
,
"UQUOTA busy vp=0x%x count=%d"
,
vp
,
vn_count
(
vp
));
}
if
(
XFS_IS_GQUOTA_ON
(
mp
))
{
vp
=
XFS_ITOV
(
XFS_QI_GQIP
(
mp
));
VN_RELE
(
vp
);
if
(
vn_count
(
vp
)
>
1
)
cmn_err
(
CE_WARN
,
"GQUOTA busy vp=0x%x count=%d
\n
"
,
cmn_err
(
CE_WARN
,
"GQUOTA busy vp=0x%x count=%d"
,
vp
,
vn_count
(
vp
));
}
...
...
fs/xfs/xfs_rw.c
View file @
6693befa
...
...
@@ -230,7 +230,7 @@ xfs_ioerror_alert(
xfs_daddr_t
blkno
)
{
cmn_err
(
CE_ALERT
,
"I/O error in filesystem (
\"
%s
\"
) meta-data dev 0x%x block 0x%llx
\n
"
"I/O error in filesystem (
\"
%s
\"
) meta-data dev 0x%x block 0x%llx"
" (
\"
%s
\"
) error %d buf count %u"
,
(
!
mp
||
!
mp
->
m_fsname
)
?
"(fs name not set)"
:
mp
->
m_fsname
,
XFS_BUF_TARGET_DEV
(
bp
),
...
...
fs/xfs/xfs_trans_buf.c
View file @
6693befa
...
...
@@ -472,7 +472,7 @@ xfs_trans_read_buf(
*/
#if defined(DEBUG)
if
(
XFS_BUF_ISSTALE
(
bp
)
&&
XFS_BUF_ISDELAYWRITE
(
bp
))
cmn_err
(
CE_NOTE
,
"about to pop assert, bp == 0x%x
\n
"
,
bp
);
cmn_err
(
CE_NOTE
,
"about to pop assert, bp == 0x%x"
,
bp
);
#endif
ASSERT
((
XFS_BUF_BFLAGS
(
bp
)
&
(
XFS_B_STALE
|
XFS_B_DELWRI
))
!=
(
XFS_B_STALE
|
XFS_B_DELWRI
));
...
...
fs/xfs/xfs_vfsops.c
View file @
6693befa
...
...
@@ -225,7 +225,7 @@ xfs_start_flags(
(
ap
->
logbufs
<
XLOG_NUM_ICLOGS
||
ap
->
logbufs
>
XLOG_MAX_ICLOGS
))
{
cmn_err
(
CE_WARN
,
"XFS: invalid logbufs value: %d [not %d-%d]
\n
"
,
"XFS: invalid logbufs value: %d [not %d-%d]"
,
ap
->
logbufs
,
XLOG_NUM_ICLOGS
,
XLOG_MAX_ICLOGS
);
return
XFS_ERROR
(
EINVAL
);
}
...
...
@@ -237,7 +237,7 @@ xfs_start_flags(
ap
->
logbufsize
!=
128
*
1024
&&
ap
->
logbufsize
!=
256
*
1024
)
{
cmn_err
(
CE_WARN
,
"XFS: invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]
\n
"
,
"XFS: invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]"
,
ap
->
logbufsize
);
return
XFS_ERROR
(
EINVAL
);
}
...
...
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