Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
0c755de0
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
163
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0c755de0
编写于
3月 17, 2011
作者:
J
Jan Kara
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for_next' into for_linus
上级
e8a80c6f
d7433142
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
13 deletion
+23
-13
fs/ext3/balloc.c
fs/ext3/balloc.c
+12
-9
fs/ext3/namei.c
fs/ext3/namei.c
+1
-1
fs/ext3/super.c
fs/ext3/super.c
+7
-0
fs/jbd/journal.c
fs/jbd/journal.c
+1
-1
fs/jbd2/journal.c
fs/jbd2/journal.c
+1
-1
fs/quota/quota_v2.c
fs/quota/quota_v2.c
+1
-1
未找到文件。
fs/ext3/balloc.c
浏览文件 @
0c755de0
...
...
@@ -1991,6 +1991,7 @@ ext3_grpblk_t ext3_trim_all_free(struct super_block *sb, unsigned int group,
spin_unlock
(
sb_bgl_lock
(
sbi
,
group
));
percpu_counter_sub
(
&
sbi
->
s_freeblocks_counter
,
next
-
start
);
free_blocks
-=
next
-
start
;
/* Do not issue a TRIM on extents smaller than minblocks */
if
((
next
-
start
)
<
minblocks
)
goto
free_extent
;
...
...
@@ -2040,7 +2041,7 @@ ext3_grpblk_t ext3_trim_all_free(struct super_block *sb, unsigned int group,
cond_resched
();
/* No more suitable extents */
if
(
(
free_blocks
-
count
)
<
minblocks
)
if
(
free_blocks
<
minblocks
)
break
;
}
...
...
@@ -2090,7 +2091,8 @@ int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range)
ext3_fsblk_t
max_blks
=
le32_to_cpu
(
es
->
s_blocks_count
);
int
ret
=
0
;
start
=
range
->
start
>>
sb
->
s_blocksize_bits
;
start
=
(
range
->
start
>>
sb
->
s_blocksize_bits
)
+
le32_to_cpu
(
es
->
s_first_data_block
);
len
=
range
->
len
>>
sb
->
s_blocksize_bits
;
minlen
=
range
->
minlen
>>
sb
->
s_blocksize_bits
;
trimmed
=
0
;
...
...
@@ -2099,10 +2101,6 @@ int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range)
return
-
EINVAL
;
if
(
start
>=
max_blks
)
goto
out
;
if
(
start
<
le32_to_cpu
(
es
->
s_first_data_block
))
{
len
-=
le32_to_cpu
(
es
->
s_first_data_block
)
-
start
;
start
=
le32_to_cpu
(
es
->
s_first_data_block
);
}
if
(
start
+
len
>
max_blks
)
len
=
max_blks
-
start
;
...
...
@@ -2129,10 +2127,15 @@ int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range)
if
(
free_blocks
<
minlen
)
continue
;
if
(
len
>=
EXT3_BLOCKS_PER_GROUP
(
sb
))
len
-=
(
EXT3_BLOCKS_PER_GROUP
(
sb
)
-
first_block
);
else
/*
* For all the groups except the last one, last block will
* always be EXT3_BLOCKS_PER_GROUP(sb), so we only need to
* change it for the last group in which case first_block +
* len < EXT3_BLOCKS_PER_GROUP(sb).
*/
if
(
first_block
+
len
<
EXT3_BLOCKS_PER_GROUP
(
sb
))
last_block
=
first_block
+
len
;
len
-=
last_block
-
first_block
;
ret
=
ext3_trim_all_free
(
sb
,
group
,
first_block
,
last_block
,
minlen
);
...
...
fs/ext3/namei.c
浏览文件 @
0c755de0
...
...
@@ -1540,8 +1540,8 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry,
goto
cleanup
;
node2
=
(
struct
dx_node
*
)(
bh2
->
b_data
);
entries2
=
node2
->
entries
;
memset
(
&
node2
->
fake
,
0
,
sizeof
(
struct
fake_dirent
));
node2
->
fake
.
rec_len
=
ext3_rec_len_to_disk
(
sb
->
s_blocksize
);
node2
->
fake
.
inode
=
0
;
BUFFER_TRACE
(
frame
->
bh
,
"get_write_access"
);
err
=
ext3_journal_get_write_access
(
handle
,
frame
->
bh
);
if
(
err
)
...
...
fs/ext3/super.c
浏览文件 @
0c755de0
...
...
@@ -1464,6 +1464,13 @@ static void ext3_orphan_cleanup (struct super_block * sb,
return
;
}
/* Check if feature set allows readwrite operations */
if
(
EXT3_HAS_RO_COMPAT_FEATURE
(
sb
,
~
EXT3_FEATURE_RO_COMPAT_SUPP
))
{
ext3_msg
(
sb
,
KERN_INFO
,
"Skipping orphan cleanup due to "
"unknown ROCOMPAT features"
);
return
;
}
if
(
EXT3_SB
(
sb
)
->
s_mount_state
&
EXT3_ERROR_FS
)
{
if
(
es
->
s_last_orphan
)
jbd_debug
(
1
,
"Errors on filesystem, "
...
...
fs/jbd/journal.c
浏览文件 @
0c755de0
...
...
@@ -839,7 +839,7 @@ journal_t * journal_init_inode (struct inode *inode)
err
=
journal_bmap
(
journal
,
0
,
&
blocknr
);
/* If that failed, give up */
if
(
err
)
{
printk
(
KERN_ERR
"%s: Cann
n
ot locate journal superblock
\n
"
,
printk
(
KERN_ERR
"%s: Cannot locate journal superblock
\n
"
,
__func__
);
goto
out_err
;
}
...
...
fs/jbd2/journal.c
浏览文件 @
0c755de0
...
...
@@ -991,7 +991,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode)
err
=
jbd2_journal_bmap
(
journal
,
0
,
&
blocknr
);
/* If that failed, give up */
if
(
err
)
{
printk
(
KERN_ERR
"%s: Cann
n
ot locate journal superblock
\n
"
,
printk
(
KERN_ERR
"%s: Cannot locate journal superblock
\n
"
,
__func__
);
goto
out_err
;
}
...
...
fs/quota/quota_v2.c
浏览文件 @
0c755de0
...
...
@@ -112,7 +112,7 @@ static int v2_read_file_info(struct super_block *sb, int type)
if
(
!
info
->
dqi_priv
)
{
printk
(
KERN_WARNING
"Not enough memory for quota information structure.
\n
"
);
return
-
1
;
return
-
ENOMEM
;
}
qinfo
=
info
->
dqi_priv
;
if
(
version
==
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录