Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
92fee66d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
92fee66d
编写于
7月 25, 2007
作者:
C
Chris Mason
提交者:
David Woodhouse
7月 25, 2007
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: deal with api changes in 2.6.23-rc1
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
618e21d5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
26 deletion
+33
-26
fs/btrfs/file.c
fs/btrfs/file.c
+7
-2
fs/btrfs/inode.c
fs/btrfs/inode.c
+26
-24
未找到文件。
fs/btrfs/file.c
浏览文件 @
92fee66d
...
...
@@ -30,6 +30,7 @@
#include <linux/writeback.h>
#include <linux/statfs.h>
#include <linux/compat.h>
#include <linux/version.h>
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
...
...
@@ -713,8 +714,12 @@ static int btrfs_sync_file(struct file *file,
}
static
struct
vm_operations_struct
btrfs_file_vm_ops
=
{
.
nopage
=
filemap_nopage
,
.
populate
=
filemap_populate
,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
.
nopage
=
filemap_nopage
,
.
populate
=
filemap_populate
,
#else
.
fault
=
filemap_fault
,
#endif
.
page_mkwrite
=
btrfs_page_mkwrite
,
};
...
...
fs/btrfs/inode.c
浏览文件 @
92fee66d
...
...
@@ -31,6 +31,7 @@
#include <linux/statfs.h>
#include <linux/compat.h>
#include <linux/bit_spinlock.h>
#include <linux/version.h>
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
...
...
@@ -2323,42 +2324,43 @@ void btrfs_destroy_cachep(void)
kmem_cache_destroy
(
btrfs_path_cachep
);
}
static
struct
kmem_cache
*
cache_create
(
const
char
*
name
,
size_t
size
,
unsigned
long
extra_flags
,
void
(
*
ctor
)(
void
*
,
struct
kmem_cache
*
,
unsigned
long
))
{
return
kmem_cache_create
(
name
,
size
,
0
,
(
SLAB_RECLAIM_ACCOUNT
|
SLAB_MEM_SPREAD
|
extra_flags
),
ctor
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
,
NULL
#endif
);
}
int
btrfs_init_cachep
(
void
)
{
btrfs_inode_cachep
=
kmem_cache_create
(
"btrfs_inode_cache"
,
sizeof
(
struct
btrfs_inode
),
0
,
(
SLAB_RECLAIM_ACCOUNT
|
SLAB_MEM_SPREAD
),
init_once
,
NULL
);
btrfs_inode_cachep
=
cache_create
(
"btrfs_inode_cache"
,
sizeof
(
struct
btrfs_inode
),
0
,
init_once
);
if
(
!
btrfs_inode_cachep
)
goto
fail
;
btrfs_trans_handle_cachep
=
kmem_
cache_create
(
"btrfs_trans_handle_cache"
,
btrfs_trans_handle_cachep
=
cache_create
(
"btrfs_trans_handle_cache"
,
sizeof
(
struct
btrfs_trans_handle
),
0
,
(
SLAB_RECLAIM_ACCOUNT
|
SLAB_MEM_SPREAD
),
NULL
,
NULL
);
0
,
NULL
);
if
(
!
btrfs_trans_handle_cachep
)
goto
fail
;
btrfs_transaction_cachep
=
kmem_
cache_create
(
"btrfs_transaction_cache"
,
btrfs_transaction_cachep
=
cache_create
(
"btrfs_transaction_cache"
,
sizeof
(
struct
btrfs_transaction
),
0
,
(
SLAB_RECLAIM_ACCOUNT
|
SLAB_MEM_SPREAD
),
NULL
,
NULL
);
0
,
NULL
);
if
(
!
btrfs_transaction_cachep
)
goto
fail
;
btrfs_path_cachep
=
kmem_cache_create
(
"btrfs_path_cache"
,
sizeof
(
struct
btrfs_transaction
),
0
,
(
SLAB_RECLAIM_ACCOUNT
|
SLAB_MEM_SPREAD
),
NULL
,
NULL
);
btrfs_path_cachep
=
cache_create
(
"btrfs_path_cache"
,
sizeof
(
struct
btrfs_transaction
),
0
,
NULL
);
if
(
!
btrfs_path_cachep
)
goto
fail
;
btrfs_bit_radix_cachep
=
kmem_cache_create
(
"btrfs_radix"
,
256
,
0
,
(
SLAB_RECLAIM_ACCOUNT
|
SLAB_MEM_SPREAD
|
SLAB_DESTROY_BY_RCU
),
NULL
,
NULL
);
btrfs_bit_radix_cachep
=
cache_create
(
"btrfs_radix"
,
256
,
SLAB_DESTROY_BY_RCU
,
NULL
);
if
(
!
btrfs_bit_radix_cachep
)
goto
fail
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录