Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4776004f
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4776004f
编写于
9月 08, 2008
作者:
T
Theodore Ts'o
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ext4: Add printk priority levels to clean up checkpatch warnings
Signed-off-by:
N
"Theodore Ts'o"
<
tytso@mit.edu
>
上级
1f7c14c6
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
71 addition
and
54 deletion
+71
-54
fs/ext4/balloc.c
fs/ext4/balloc.c
+15
-14
fs/ext4/dir.c
fs/ext4/dir.c
+2
-1
fs/ext4/extents.c
fs/ext4/extents.c
+5
-4
fs/ext4/ialloc.c
fs/ext4/ialloc.c
+9
-7
fs/ext4/mballoc.c
fs/ext4/mballoc.c
+5
-4
fs/ext4/namei.c
fs/ext4/namei.c
+19
-15
fs/ext4/super.c
fs/ext4/super.c
+16
-9
未找到文件。
fs/ext4/balloc.c
浏览文件 @
4776004f
...
...
@@ -379,26 +379,28 @@ static void __rsv_window_dump(struct rb_root *root, int verbose,
bad
=
0
;
prev
=
NULL
;
printk
(
"Block Allocation Reservation Windows Map (%s):
\n
"
,
fn
);
printk
(
KERN_DEBUG
"Block Allocation Reservation "
"Windows Map (%s):
\n
"
,
fn
);
while
(
n
)
{
rsv
=
rb_entry
(
n
,
struct
ext4_reserve_window_node
,
rsv_node
);
if
(
verbose
)
printk
(
"reservation window 0x%p "
printk
(
KERN_DEBUG
"reservation window 0x%p "
"start: %llu, end: %llu
\n
"
,
rsv
,
rsv
->
rsv_start
,
rsv
->
rsv_end
);
if
(
rsv
->
rsv_start
&&
rsv
->
rsv_start
>=
rsv
->
rsv_end
)
{
printk
(
"Bad reservation %p (start >= end)
\n
"
,
printk
(
KERN_DEBUG
"Bad reservation %p (start >= end)
\n
"
,
rsv
);
bad
=
1
;
}
if
(
prev
&&
prev
->
rsv_end
>=
rsv
->
rsv_start
)
{
printk
(
"Bad reservation %p (prev->end >= start)
\n
"
,
rsv
);
printk
(
KERN_DEBUG
"Bad reservation %p "
"(prev->end >= start)
\n
"
,
rsv
);
bad
=
1
;
}
if
(
bad
)
{
if
(
!
verbose
)
{
printk
(
"Restarting reservation walk in verbose mode
\n
"
);
printk
(
KERN_DEBUG
"Restarting reservation "
"walk in verbose mode
\n
"
);
verbose
=
1
;
goto
restart
;
}
...
...
@@ -406,7 +408,7 @@ static void __rsv_window_dump(struct rb_root *root, int verbose,
n
=
rb_next
(
n
);
prev
=
rsv
;
}
printk
(
"Window map complete.
\n
"
);
printk
(
KERN_DEBUG
"Window map complete.
\n
"
);
BUG_ON
(
bad
);
}
#define rsv_window_dump(root, verbose) \
...
...
@@ -1702,7 +1704,7 @@ ext4_fsblk_t ext4_old_new_blocks(handle_t *handle, struct inode *inode,
sb
=
inode
->
i_sb
;
if
(
!
sb
)
{
*
errp
=
-
ENODEV
;
printk
(
"ext4_new_block: nonexistent device
"
);
printk
(
KERN_ERR
"ext4_new_block: nonexistent superblock
"
);
return
0
;
}
...
...
@@ -1884,8 +1886,8 @@ ext4_fsblk_t ext4_old_new_blocks(handle_t *handle, struct inode *inode,
for
(
i
=
0
;
i
<
num
;
i
++
)
{
if
(
ext4_test_bit
(
grp_alloc_blk
+
i
,
bh2jh
(
bitmap_bh
)
->
b_committed_data
))
{
printk
(
"%s: block was unexpectedly set in
"
"
b_committed_data
\n
"
,
__func__
);
printk
(
KERN_ERR
"%s: block was unexpectedly
"
"set in
b_committed_data
\n
"
,
__func__
);
}
}
}
...
...
@@ -2093,10 +2095,9 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
bitmap_count
+=
x
;
}
brelse
(
bitmap_bh
);
printk
(
"ext4_count_free_blocks: stored = %llu"
", computed = %llu, %llu
\n
"
,
ext4_free_blocks_count
(
es
),
desc_count
,
bitmap_count
);
printk
(
KERN_DEBUG
"ext4_count_free_blocks: stored = %llu"
", computed = %llu, %llu
\n
"
,
ext4_free_blocks_count
(
es
),
desc_count
,
bitmap_count
);
return
bitmap_count
;
#else
desc_count
=
0
;
...
...
fs/ext4/dir.c
浏览文件 @
4776004f
...
...
@@ -400,7 +400,8 @@ static int call_filldir(struct file * filp, void * dirent,
sb
=
inode
->
i_sb
;
if
(
!
fname
)
{
printk
(
"call_filldir: called with null fname?!?
\n
"
);
printk
(
KERN_ERR
"ext4: call_filldir: called with "
"null fname?!?
\n
"
);
return
0
;
}
curr_pos
=
hash2pos
(
fname
->
hash
,
fname
->
minor_hash
);
...
...
fs/ext4/extents.c
浏览文件 @
4776004f
...
...
@@ -440,9 +440,10 @@ ext4_ext_binsearch_idx(struct inode *inode,
for
(
k
=
0
;
k
<
le16_to_cpu
(
eh
->
eh_entries
);
k
++
,
ix
++
)
{
if
(
k
!=
0
&&
le32_to_cpu
(
ix
->
ei_block
)
<=
le32_to_cpu
(
ix
[
-
1
].
ei_block
))
{
printk
(
"k=%d, ix=0x%p, first=0x%p
\n
"
,
k
,
ix
,
EXT_FIRST_INDEX
(
eh
));
printk
(
"%u <= %u
\n
"
,
printk
(
KERN_DEBUG
"k=%d, ix=0x%p, "
"first=0x%p
\n
"
,
k
,
ix
,
EXT_FIRST_INDEX
(
eh
));
printk
(
KERN_DEBUG
"%u <= %u
\n
"
,
le32_to_cpu
(
ix
->
ei_block
),
le32_to_cpu
(
ix
[
-
1
].
ei_block
));
}
...
...
@@ -2142,7 +2143,7 @@ void ext4_ext_init(struct super_block *sb)
*/
if
(
test_opt
(
sb
,
EXTENTS
))
{
printk
(
"EXT4-fs: file extents enabled"
);
printk
(
KERN_INFO
"EXT4-fs: file extents enabled"
);
#ifdef AGGRESSIVE_TEST
printk
(
", aggressive tests"
);
#endif
...
...
fs/ext4/ialloc.c
浏览文件 @
4776004f
...
...
@@ -170,17 +170,18 @@ void ext4_free_inode (handle_t *handle, struct inode * inode)
ext4_group_t
flex_group
;
if
(
atomic_read
(
&
inode
->
i_count
)
>
1
)
{
printk
(
"ext4_free_inode: inode has count=%d
\n
"
,
atomic_read
(
&
inode
->
i_count
));
printk
(
KERN_ERR
"ext4_free_inode: inode has count=%d
\n
"
,
atomic_read
(
&
inode
->
i_count
));
return
;
}
if
(
inode
->
i_nlink
)
{
printk
(
"ext4_free_inode: inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
printk
(
KERN_ERR
"ext4_free_inode: inode has nlink=%d
\n
"
,
inode
->
i_nlink
);
return
;
}
if
(
!
sb
)
{
printk
(
"ext4_free_inode: inode on nonexistent device
\n
"
);
printk
(
KERN_ERR
"ext4_free_inode: inode on "
"nonexistent device
\n
"
);
return
;
}
sbi
=
EXT4_SB
(
sb
);
...
...
@@ -989,8 +990,9 @@ unsigned long ext4_count_free_inodes (struct super_block * sb)
bitmap_count
+=
x
;
}
brelse
(
bitmap_bh
);
printk
(
"ext4_count_free_inodes: stored = %u, computed = %lu, %lu
\n
"
,
le32_to_cpu
(
es
->
s_free_inodes_count
),
desc_count
,
bitmap_count
);
printk
(
KERN_DEBUG
"ext4_count_free_inodes: "
"stored = %u, computed = %lu, %lu
\n
"
,
le32_to_cpu
(
es
->
s_free_inodes_count
),
desc_count
,
bitmap_count
);
return
desc_count
;
#else
desc_count
=
0
;
...
...
fs/ext4/mballoc.c
浏览文件 @
4776004f
...
...
@@ -477,9 +477,10 @@ static void mb_cmp_bitmaps(struct ext4_buddy *e4b, void *bitmap)
b2
=
(
unsigned
char
*
)
bitmap
;
for
(
i
=
0
;
i
<
e4b
->
bd_sb
->
s_blocksize
;
i
++
)
{
if
(
b1
[
i
]
!=
b2
[
i
])
{
printk
(
"corruption in group %lu at byte %u(%u):"
" %x in copy != %x on disk/prealloc
\n
"
,
e4b
->
bd_group
,
i
,
i
*
8
,
b1
[
i
],
b2
[
i
]);
printk
(
KERN_ERR
"corruption in group %lu "
"at byte %u(%u): %x in copy != %x "
"on disk/prealloc
\n
"
,
e4b
->
bd_group
,
i
,
i
*
8
,
b1
[
i
],
b2
[
i
]);
BUG
();
}
}
...
...
@@ -2560,7 +2561,7 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery)
ext4_mb_init_per_dev_proc
(
sb
);
ext4_mb_history_init
(
sb
);
printk
(
"EXT4-fs: mballoc enabled
\n
"
);
printk
(
KERN_INFO
"EXT4-fs: mballoc enabled
\n
"
);
return
0
;
}
...
...
fs/ext4/namei.c
浏览文件 @
4776004f
...
...
@@ -254,12 +254,12 @@ static inline unsigned dx_node_limit (struct inode *dir)
* Debug
*/
#ifdef DX_DEBUG
static
void
dx_show_index
(
char
*
label
,
struct
dx_entry
*
entries
)
static
void
dx_show_index
(
char
*
label
,
struct
dx_entry
*
entries
)
{
int
i
,
n
=
dx_get_count
(
entries
);
printk
(
"%s index "
,
label
);
printk
(
KERN_DEBUG
"%s index "
,
label
);
for
(
i
=
0
;
i
<
n
;
i
++
)
{
printk
(
"%x->%lu "
,
i
?
dx_get_hash
(
entries
+
i
)
:
printk
(
"%x->%lu "
,
i
?
dx_get_hash
(
entries
+
i
)
:
0
,
(
unsigned
long
)
dx_get_block
(
entries
+
i
));
}
printk
(
"
\n
"
);
...
...
@@ -328,8 +328,9 @@ struct stats dx_show_entries(struct dx_hash_info *hinfo, struct inode *dir,
brelse
(
bh
);
}
if
(
bcount
)
printk
(
"%snames %u, fullness %u (%u%%)
\n
"
,
levels
?
""
:
" "
,
names
,
space
/
bcount
,(
space
/
bcount
)
*
100
/
blocksize
);
printk
(
KERN_DEBUG
"%snames %u, fullness %u (%u%%)
\n
"
,
levels
?
""
:
" "
,
names
,
space
/
bcount
,
(
space
/
bcount
)
*
100
/
blocksize
);
return
(
struct
stats
)
{
names
,
space
,
bcount
};
}
#endif
/* DX_DEBUG */
...
...
@@ -635,8 +636,8 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
int
ret
,
err
;
__u32
hashval
;
dxtrace
(
printk
(
"In htree_fill_tree, start hash: %x:%x
\n
"
,
start_hash
,
start_minor_hash
));
dxtrace
(
printk
(
KERN_DEBUG
"In htree_fill_tree, start hash: %x:%x
\n
"
,
start_
hash
,
start_
minor_hash
));
dir
=
dir_file
->
f_path
.
dentry
->
d_inode
;
if
(
!
(
EXT4_I
(
dir
)
->
i_flags
&
EXT4_INDEX_FL
))
{
hinfo
.
hash_version
=
EXT4_SB
(
dir
->
i_sb
)
->
s_def_hash_version
;
...
...
@@ -694,8 +695,8 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
break
;
}
dx_release
(
frames
);
dxtrace
(
printk
(
"Fill tree: returned %d entries, next hash: %x
\n
"
,
count
,
*
next_hash
));
dxtrace
(
printk
(
KERN_DEBUG
"Fill tree: returned %d entries, "
"next hash: %x
\n
"
,
count
,
*
next_hash
));
return
count
;
errout:
dx_release
(
frames
);
...
...
@@ -882,7 +883,8 @@ static struct buffer_head * ext4_find_entry (struct dentry *dentry,
*/
if
(
bh
||
(
err
!=
ERR_BAD_DX_DIR
))
return
bh
;
dxtrace
(
printk
(
"ext4_find_entry: dx failed, falling back
\n
"
));
dxtrace
(
printk
(
KERN_DEBUG
"ext4_find_entry: dx failed, "
"falling back
\n
"
));
}
nblocks
=
dir
->
i_size
>>
EXT4_BLOCK_SIZE_BITS
(
sb
);
start
=
EXT4_I
(
dir
)
->
i_dir_start_lookup
;
...
...
@@ -1025,7 +1027,7 @@ static struct buffer_head * ext4_dx_find_entry(struct dentry *dentry,
*
err
=
-
ENOENT
;
errout:
dxtrace
(
printk
(
"%s not found
\n
"
,
name
));
dxtrace
(
printk
(
KERN_DEBUG
"%s not found
\n
"
,
name
));
dx_release
(
frames
);
return
NULL
;
}
...
...
@@ -1377,7 +1379,7 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
struct
fake_dirent
*
fde
;
blocksize
=
dir
->
i_sb
->
s_blocksize
;
dxtrace
(
printk
(
"Creating index
\n
"
));
dxtrace
(
printk
(
KERN_DEBUG
"Creating index
\n
"
));
retval
=
ext4_journal_get_write_access
(
handle
,
bh
);
if
(
retval
)
{
ext4_std_error
(
dir
->
i_sb
,
retval
);
...
...
@@ -1527,7 +1529,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
}
/* Block full, should compress but for now just split */
dxtrace
(
printk
(
"using %u of %u node entries
\n
"
,
dxtrace
(
printk
(
KERN_DEBUG
"using %u of %u node entries
\n
"
,
dx_get_count
(
entries
),
dx_get_limit
(
entries
)));
/* Need to split index? */
if
(
dx_get_count
(
entries
)
==
dx_get_limit
(
entries
))
{
...
...
@@ -1559,7 +1561,8 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
if
(
levels
)
{
unsigned
icount1
=
icount
/
2
,
icount2
=
icount
-
icount1
;
unsigned
hash2
=
dx_get_hash
(
entries
+
icount1
);
dxtrace
(
printk
(
"Split index %i/%i
\n
"
,
icount1
,
icount2
));
dxtrace
(
printk
(
KERN_DEBUG
"Split index %i/%i
\n
"
,
icount1
,
icount2
));
BUFFER_TRACE
(
frame
->
bh
,
"get_write_access"
);
/* index root */
err
=
ext4_journal_get_write_access
(
handle
,
...
...
@@ -1588,7 +1591,8 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
goto
journal_error
;
brelse
(
bh2
);
}
else
{
dxtrace
(
printk
(
"Creating second level index...
\n
"
));
dxtrace
(
printk
(
KERN_DEBUG
"Creating second level index...
\n
"
));
memcpy
((
char
*
)
entries2
,
(
char
*
)
entries
,
icount
*
sizeof
(
struct
dx_entry
));
dx_set_limit
(
entries2
,
dx_node_limit
(
dir
));
...
...
fs/ext4/super.c
浏览文件 @
4776004f
...
...
@@ -981,7 +981,7 @@ static ext4_fsblk_t get_sb_block(void **data)
/*todo: use simple_strtoll with >32bit ext4 */
sb_block
=
simple_strtoul
(
options
,
&
options
,
0
);
if
(
*
options
&&
*
options
!=
','
)
{
printk
(
"EXT4-fs: Invalid sb specification: %s
\n
"
,
printk
(
KERN_ERR
"EXT4-fs: Invalid sb specification: %s
\n
"
,
(
char
*
)
*
data
);
return
1
;
}
...
...
@@ -1082,7 +1082,8 @@ static int parse_options(char *options, struct super_block *sb,
#else
case
Opt_user_xattr
:
case
Opt_nouser_xattr
:
printk
(
"EXT4 (no)user_xattr options not supported
\n
"
);
printk
(
KERN_ERR
"EXT4 (no)user_xattr options "
"not supported
\n
"
);
break
;
#endif
#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
...
...
@@ -1095,7 +1096,8 @@ static int parse_options(char *options, struct super_block *sb,
#else
case
Opt_acl
:
case
Opt_noacl
:
printk
(
"EXT4 (no)acl options not supported
\n
"
);
printk
(
KERN_ERR
"EXT4 (no)acl options "
"not supported
\n
"
);
break
;
#endif
case
Opt_reservation
:
...
...
@@ -1189,8 +1191,8 @@ static int parse_options(char *options, struct super_block *sb,
sb_any_quota_suspended
(
sb
))
&&
!
sbi
->
s_qf_names
[
qtype
])
{
printk
(
KERN_ERR
"EXT4-fs: Cannot change journaled "
"quota options when quota turned on.
\n
"
);
"EXT4-fs: Cannot change journaled "
"quota options when quota turned on.
\n
"
);
return
0
;
}
qname
=
match_strdup
(
&
args
[
0
]);
...
...
@@ -1473,14 +1475,14 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
EXT4_INODES_PER_GROUP
(
sb
),
sbi
->
s_mount_opt
);
printk
(
KERN_INFO
"EXT4 FS on %s, "
,
sb
->
s_id
);
if
(
EXT4_SB
(
sb
)
->
s_journal
->
j_inode
==
NULL
)
{
char
b
[
BDEVNAME_SIZE
];
printk
(
"
external journal on %s
\n
"
,
bdevname
(
EXT4_SB
(
sb
)
->
s_journal
->
j_dev
,
b
));
printk
(
KERN_INFO
"EXT4 FS on %s,
external journal on %s
\n
"
,
sb
->
s_id
,
bdevname
(
EXT4_SB
(
sb
)
->
s_journal
->
j_dev
,
b
));
}
else
{
printk
(
"internal journal
\n
"
);
printk
(
KERN_INFO
"EXT4 FS on %s, internal journal
\n
"
,
sb
->
s_id
);
}
return
res
;
}
...
...
@@ -2715,6 +2717,11 @@ static int ext4_load_journal(struct super_block *sb,
return
-
EINVAL
;
}
if
(
journal
->
j_flags
&
JBD2_BARRIER
)
printk
(
KERN_INFO
"EXT4-fs: barriers enabled
\n
"
);
else
printk
(
KERN_INFO
"EXT4-fs: barriers disabled
\n
"
);
if
(
!
really_read_only
&&
test_opt
(
sb
,
UPDATE_JOURNAL
))
{
err
=
jbd2_journal_update_format
(
journal
);
if
(
err
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录