Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
13c72075
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
13c72075
编写于
7月 04, 2017
作者:
M
Miklos Szeredi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ovl: move impure to ovl_inode
Signed-off-by:
N
Miklos Szeredi
<
mszeredi@redhat.com
>
上级
cf31c463
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
17 deletion
+26
-17
fs/overlayfs/inode.c
fs/overlayfs/inode.c
+4
-0
fs/overlayfs/namei.c
fs/overlayfs/namei.c
+0
-4
fs/overlayfs/overlayfs.h
fs/overlayfs/overlayfs.h
+6
-1
fs/overlayfs/ovl_entry.h
fs/overlayfs/ovl_entry.h
+1
-1
fs/overlayfs/super.c
fs/overlayfs/super.c
+3
-1
fs/overlayfs/util.c
fs/overlayfs/util.c
+12
-10
未找到文件。
fs/overlayfs/inode.c
浏览文件 @
13c72075
...
...
@@ -490,6 +490,10 @@ struct inode *ovl_get_inode(struct dentry *dentry, struct dentry *upperdentry)
}
ovl_fill_inode
(
inode
,
realinode
->
i_mode
,
realinode
->
i_rdev
);
ovl_inode_init
(
inode
,
upperdentry
,
lowerdentry
);
if
(
upperdentry
&&
ovl_is_impuredir
(
upperdentry
))
ovl_set_flag
(
OVL_IMPURE
,
inode
);
if
(
inode
->
i_state
&
I_NEW
)
unlock_new_inode
(
inode
);
out:
...
...
fs/overlayfs/namei.c
浏览文件 @
13c72075
...
...
@@ -341,7 +341,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
unsigned
int
ctr
=
0
;
struct
inode
*
inode
=
NULL
;
bool
upperopaque
=
false
;
bool
upperimpure
=
false
;
char
*
upperredirect
=
NULL
;
struct
dentry
*
this
;
unsigned
int
i
;
...
...
@@ -386,8 +385,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
poe
=
roe
;
}
upperopaque
=
d
.
opaque
;
if
(
upperdentry
&&
d
.
is_dir
)
upperimpure
=
ovl_is_impuredir
(
upperdentry
);
}
if
(
!
d
.
stop
&&
poe
->
numlower
)
{
...
...
@@ -434,7 +431,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
goto
out_put
;
oe
->
opaque
=
upperopaque
;
oe
->
impure
=
upperimpure
;
memcpy
(
oe
->
lowerstack
,
stack
,
sizeof
(
struct
path
)
*
ctr
);
dentry
->
d_fsdata
=
oe
;
...
...
fs/overlayfs/overlayfs.h
浏览文件 @
13c72075
...
...
@@ -26,6 +26,10 @@ enum ovl_path_type {
#define OVL_XATTR_ORIGIN OVL_XATTR_PREFIX "origin"
#define OVL_XATTR_IMPURE OVL_XATTR_PREFIX "impure"
enum
ovl_flag
{
OVL_IMPURE
,
};
/*
* The tuple (fh,uuid) is a universal unique identifier for a copy up origin,
* where:
...
...
@@ -195,7 +199,6 @@ struct inode *ovl_inode_real(struct inode *inode);
struct
ovl_dir_cache
*
ovl_dir_cache
(
struct
dentry
*
dentry
);
void
ovl_set_dir_cache
(
struct
dentry
*
dentry
,
struct
ovl_dir_cache
*
cache
);
bool
ovl_dentry_is_opaque
(
struct
dentry
*
dentry
);
bool
ovl_dentry_is_impure
(
struct
dentry
*
dentry
);
bool
ovl_dentry_is_whiteout
(
struct
dentry
*
dentry
);
void
ovl_dentry_set_opaque
(
struct
dentry
*
dentry
);
bool
ovl_redirect_dir
(
struct
super_block
*
sb
);
...
...
@@ -215,6 +218,8 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry,
const
char
*
name
,
const
void
*
value
,
size_t
size
,
int
xerr
);
int
ovl_set_impure
(
struct
dentry
*
dentry
,
struct
dentry
*
upperdentry
);
void
ovl_set_flag
(
unsigned
long
flag
,
struct
inode
*
inode
);
bool
ovl_test_flag
(
unsigned
long
flag
,
struct
inode
*
inode
);
static
inline
bool
ovl_is_impuredir
(
struct
dentry
*
dentry
)
{
...
...
fs/overlayfs/ovl_entry.h
浏览文件 @
13c72075
...
...
@@ -41,7 +41,6 @@ struct ovl_entry {
struct
{
u64
version
;
bool
opaque
;
bool
impure
;
bool
copying
;
};
struct
rcu_head
rcu
;
...
...
@@ -54,6 +53,7 @@ struct ovl_entry *ovl_alloc_entry(unsigned int numlower);
struct
ovl_inode
{
const
char
*
redirect
;
unsigned
long
flags
;
struct
inode
vfs_inode
;
struct
dentry
*
__upperdentry
;
struct
inode
*
lower
;
...
...
fs/overlayfs/super.c
浏览文件 @
13c72075
...
...
@@ -170,6 +170,7 @@ static struct inode *ovl_alloc_inode(struct super_block *sb)
struct
ovl_inode
*
oi
=
kmem_cache_alloc
(
ovl_inode_cachep
,
GFP_KERNEL
);
oi
->
redirect
=
NULL
;
oi
->
flags
=
0
;
oi
->
__upperdentry
=
NULL
;
oi
->
lower
=
NULL
;
...
...
@@ -1004,7 +1005,8 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
kfree
(
lowertmp
);
if
(
upperpath
.
dentry
)
{
oe
->
impure
=
ovl_is_impuredir
(
upperpath
.
dentry
);
if
(
ovl_is_impuredir
(
upperpath
.
dentry
))
ovl_set_flag
(
OVL_IMPURE
,
d_inode
(
root_dentry
));
}
for
(
i
=
0
;
i
<
numlower
;
i
++
)
{
oe
->
lowerstack
[
i
].
dentry
=
stack
[
i
].
dentry
;
...
...
fs/overlayfs/util.c
浏览文件 @
13c72075
...
...
@@ -178,13 +178,6 @@ bool ovl_dentry_is_opaque(struct dentry *dentry)
return
oe
->
opaque
;
}
bool
ovl_dentry_is_impure
(
struct
dentry
*
dentry
)
{
struct
ovl_entry
*
oe
=
dentry
->
d_fsdata
;
return
oe
->
impure
;
}
bool
ovl_dentry_is_whiteout
(
struct
dentry
*
dentry
)
{
return
!
dentry
->
d_inode
&&
ovl_dentry_is_opaque
(
dentry
);
...
...
@@ -344,9 +337,8 @@ int ovl_check_setxattr(struct dentry *dentry, struct dentry *upperdentry,
int
ovl_set_impure
(
struct
dentry
*
dentry
,
struct
dentry
*
upperdentry
)
{
int
err
;
struct
ovl_entry
*
oe
=
dentry
->
d_fsdata
;
if
(
o
e
->
impure
)
if
(
o
vl_test_flag
(
OVL_IMPURE
,
d_inode
(
dentry
))
)
return
0
;
/*
...
...
@@ -356,7 +348,17 @@ int ovl_set_impure(struct dentry *dentry, struct dentry *upperdentry)
err
=
ovl_check_setxattr
(
dentry
,
upperdentry
,
OVL_XATTR_IMPURE
,
"y"
,
1
,
0
);
if
(
!
err
)
o
e
->
impure
=
true
;
o
vl_set_flag
(
OVL_IMPURE
,
d_inode
(
dentry
))
;
return
err
;
}
void
ovl_set_flag
(
unsigned
long
flag
,
struct
inode
*
inode
)
{
set_bit
(
flag
,
&
OVL_I
(
inode
)
->
flags
);
}
bool
ovl_test_flag
(
unsigned
long
flag
,
struct
inode
*
inode
)
{
return
test_bit
(
flag
,
&
OVL_I
(
inode
)
->
flags
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录