Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
95f5f88f
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看板
提交
95f5f88f
编写于
6年前
作者:
M
Mike Marshall
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
orangefs: formatting cleanups
Signed-off-by:
N
Mike Marshall
<
hubcap@omnibond.com
>
上级
f6a4b4c9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
55 addition
and
39 deletion
+55
-39
fs/orangefs/devorangefs-req.c
fs/orangefs/devorangefs-req.c
+10
-7
fs/orangefs/file.c
fs/orangefs/file.c
+1
-1
fs/orangefs/inode.c
fs/orangefs/inode.c
+26
-18
fs/orangefs/orangefs-bufmap.c
fs/orangefs/orangefs-bufmap.c
+2
-2
fs/orangefs/orangefs-utils.c
fs/orangefs/orangefs-utils.c
+11
-7
fs/orangefs/super.c
fs/orangefs/super.c
+5
-4
未找到文件。
fs/orangefs/devorangefs-req.c
浏览文件 @
95f5f88f
...
...
@@ -281,14 +281,17 @@ static ssize_t orangefs_devreq_read(struct file *file,
ret
=
copy_to_user
(
buf
,
&
proto_ver
,
sizeof
(
__s32
));
if
(
ret
!=
0
)
goto
error
;
ret
=
copy_to_user
(
buf
+
sizeof
(
__s32
),
&
magic
,
sizeof
(
__s32
));
ret
=
copy_to_user
(
buf
+
sizeof
(
__s32
),
&
magic
,
sizeof
(
__s32
));
if
(
ret
!=
0
)
goto
error
;
ret
=
copy_to_user
(
buf
+
2
*
sizeof
(
__s32
),
&
cur_op
->
tag
,
sizeof
(
__u64
));
ret
=
copy_to_user
(
buf
+
2
*
sizeof
(
__s32
),
&
cur_op
->
tag
,
sizeof
(
__u64
));
if
(
ret
!=
0
)
goto
error
;
ret
=
copy_to_user
(
buf
+
2
*
sizeof
(
__s32
)
+
sizeof
(
__u64
),
&
cur_op
->
upcall
,
sizeof
(
struct
orangefs_upcall_s
));
ret
=
copy_to_user
(
buf
+
2
*
sizeof
(
__s32
)
+
sizeof
(
__u64
),
&
cur_op
->
upcall
,
sizeof
(
struct
orangefs_upcall_s
));
if
(
ret
!=
0
)
goto
error
;
...
...
@@ -381,7 +384,7 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
(
unsigned
int
)
MAX_DEV_REQ_DOWNSIZE
);
return
-
EFAULT
;
}
if
(
!
copy_from_iter_full
(
&
head
,
head_size
,
iter
))
{
gossip_err
(
"%s: failed to copy head.
\n
"
,
__func__
);
return
-
EFAULT
;
...
...
@@ -426,7 +429,7 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
goto
wakeup
;
/*
* We've successfully peeled off the head and the downcall.
* We've successfully peeled off the head and the downcall.
* Something has gone awry if total doesn't equal the
* sum of head_size, downcall_size and trailer_size.
*/
...
...
@@ -477,7 +480,7 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
wakeup:
/*
* Return to vfs waitqueue, and back to service_operation
* through wait_for_matching_downcall.
* through wait_for_matching_downcall.
*/
spin_lock
(
&
op
->
lock
);
if
(
unlikely
(
op_is_cancel
(
op
)))
{
...
...
This diff is collapsed.
Click to expand it.
fs/orangefs/file.c
浏览文件 @
95f5f88f
...
...
@@ -162,7 +162,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
else
ret
=
0
;
break
;
/*
/*
* If the op was in progress when the interrupt
* occurred, then the client-core was able to
* trigger the write.
...
...
This diff is collapsed.
Click to expand it.
fs/orangefs/inode.c
浏览文件 @
95f5f88f
...
...
@@ -181,16 +181,15 @@ static int orangefs_setattr_size(struct inode *inode, struct iattr *iattr)
new_op
->
upcall
.
req
.
truncate
.
refn
=
orangefs_inode
->
refn
;
new_op
->
upcall
.
req
.
truncate
.
size
=
(
__s64
)
iattr
->
ia_size
;
ret
=
service_operation
(
new_op
,
__func__
,
get_interruptible_flag
(
inode
));
ret
=
service_operation
(
new_op
,
__func__
,
get_interruptible_flag
(
inode
));
/*
* the truncate has no downcall members to retrieve, but
* the status value tells us if it went through ok or not
*/
gossip_debug
(
GOSSIP_INODE_DEBUG
,
"orangefs: orangefs_truncate got return value of %d
\n
"
,
ret
);
gossip_debug
(
GOSSIP_INODE_DEBUG
,
"%s: ret:%d:
\n
"
,
__func__
,
ret
);
op_release
(
new_op
);
...
...
@@ -212,8 +211,9 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)
struct
inode
*
inode
=
dentry
->
d_inode
;
gossip_debug
(
GOSSIP_INODE_DEBUG
,
"orangefs_setattr: called on %pd
\n
"
,
dentry
);
"%s: called on %pd
\n
"
,
__func__
,
dentry
);
ret
=
setattr_prepare
(
dentry
,
iattr
);
if
(
ret
)
...
...
@@ -230,15 +230,16 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)
ret
=
orangefs_inode_setattr
(
inode
,
iattr
);
gossip_debug
(
GOSSIP_INODE_DEBUG
,
"orangefs_setattr: inode_setattr returned %d
\n
"
,
ret
);
"%s: orangefs_inode_setattr returned %d
\n
"
,
__func__
,
ret
);
if
(
!
ret
&&
(
iattr
->
ia_valid
&
ATTR_MODE
))
/* change mod on a file that has ACLs */
ret
=
posix_acl_chmod
(
inode
,
inode
->
i_mode
);
out:
gossip_debug
(
GOSSIP_INODE_DEBUG
,
"
orangefs_setattr: returning %d
\n
"
,
ret
);
gossip_debug
(
GOSSIP_INODE_DEBUG
,
"
%s: ret:%d:
\n
"
,
__func__
,
ret
);
return
ret
;
}
...
...
@@ -312,7 +313,7 @@ int orangefs_update_time(struct inode *inode, struct timespec *time, int flags)
return
orangefs_inode_setattr
(
inode
,
&
iattr
);
}
/* ORANGE
D
S2 implementation of VFS inode operations for files */
/* ORANGE
F
S2 implementation of VFS inode operations for files */
static
const
struct
inode_operations
orangefs_file_inode_operations
=
{
.
get_acl
=
orangefs_get_acl
,
.
set_acl
=
orangefs_set_acl
,
...
...
@@ -350,8 +351,8 @@ static int orangefs_init_iops(struct inode *inode)
}
/*
* Given a
ORANGEFS object identifier (fsid, handle), convert it into a ino_t type
* that will be used as a hash-index from where the handle will
* Given a
n ORANGEFS object identifier (fsid, handle), convert it into
*
a ino_t type
that will be used as a hash-index from where the handle will
* be searched for in the VFS hash table of inodes.
*/
static
inline
ino_t
orangefs_handle_hash
(
struct
orangefs_object_kref
*
ref
)
...
...
@@ -381,8 +382,10 @@ static int orangefs_test_inode(struct inode *inode, void *data)
struct
orangefs_inode_s
*
orangefs_inode
=
NULL
;
orangefs_inode
=
ORANGEFS_I
(
inode
);
return
(
!
ORANGEFS_khandle_cmp
(
&
(
orangefs_inode
->
refn
.
khandle
),
&
(
ref
->
khandle
))
&&
orangefs_inode
->
refn
.
fs_id
==
ref
->
fs_id
);
/* test handles and fs_ids... */
return
(
!
ORANGEFS_khandle_cmp
(
&
(
orangefs_inode
->
refn
.
khandle
),
&
(
ref
->
khandle
))
&&
orangefs_inode
->
refn
.
fs_id
==
ref
->
fs_id
);
}
/*
...
...
@@ -390,16 +393,21 @@ static int orangefs_test_inode(struct inode *inode, void *data)
* file handle.
*
* @sb: the file system super block instance.
* @ref: The ORANGEFS object for which we are trying to locate an inode
structure
.
* @ref: The ORANGEFS object for which we are trying to locate an inode.
*/
struct
inode
*
orangefs_iget
(
struct
super_block
*
sb
,
struct
orangefs_object_kref
*
ref
)
struct
inode
*
orangefs_iget
(
struct
super_block
*
sb
,
struct
orangefs_object_kref
*
ref
)
{
struct
inode
*
inode
=
NULL
;
unsigned
long
hash
;
int
error
;
hash
=
orangefs_handle_hash
(
ref
);
inode
=
iget5_locked
(
sb
,
hash
,
orangefs_test_inode
,
orangefs_set_inode
,
ref
);
inode
=
iget5_locked
(
sb
,
hash
,
orangefs_test_inode
,
orangefs_set_inode
,
ref
);
if
(
!
inode
||
!
(
inode
->
i_state
&
I_NEW
))
return
inode
;
...
...
This diff is collapsed.
Click to expand it.
fs/orangefs/orangefs-bufmap.c
浏览文件 @
95f5f88f
...
...
@@ -184,7 +184,7 @@ orangefs_bufmap_free(struct orangefs_bufmap *bufmap)
}
/*
* XXX: Can the size and shift change while the caller gives up the
* XXX: Can the size and shift change while the caller gives up the
* XXX: lock between calling this and doing something useful?
*/
...
...
@@ -496,7 +496,7 @@ void orangefs_readdir_index_put(int buffer_index)
}
/*
* we've been handed an iovec, we need to copy it to
* we've been handed an iovec, we need to copy it to
* the shared memory descriptor at "buffer_index".
*/
int
orangefs_bufmap_copy_from_iovec
(
struct
iov_iter
*
iter
,
...
...
This diff is collapsed.
Click to expand it.
fs/orangefs/orangefs-utils.c
浏览文件 @
95f5f88f
...
...
@@ -183,9 +183,9 @@ static inline int copy_attributes_from_inode(struct inode *inode,
attrs
->
mask
|=
ORANGEFS_ATTR_SYS_CTIME
;
/*
* ORANGEFS cannot set size with a setattr operation.
Probably not likely
*
to be requested through the VFS, but just in case, don't worry abou
t
* ATTR_SIZE
* ORANGEFS cannot set size with a setattr operation.
Probably not
*
likely to be requested through the VFS, but just in case, don'
t
*
worry about
ATTR_SIZE
*/
if
(
iattr
->
ia_valid
&
ATTR_MODE
)
{
...
...
@@ -200,14 +200,16 @@ static inline int copy_attributes_from_inode(struct inode *inode,
tmp_mode
-=
S_ISVTX
;
}
else
{
gossip_debug
(
GOSSIP_UTILS_DEBUG
,
"User attempted to set sticky bit on non-root directory; returning EINVAL.
\n
"
);
"%s: setting sticky bit not supported.
\n
"
,
__func__
);
return
-
EINVAL
;
}
}
if
(
tmp_mode
&
(
S_ISUID
))
{
gossip_debug
(
GOSSIP_UTILS_DEBUG
,
"Attempting to set setuid bit (not supported); returning EINVAL.
\n
"
);
"%s: setting setuid bit not supported.
\n
"
,
__func__
);
return
-
EINVAL
;
}
...
...
@@ -521,7 +523,9 @@ int orangefs_normalize_to_errno(__s32 error_code)
error_code
=
-
ETIMEDOUT
;
}
else
{
/* assume a default error code */
gossip_err
(
"orangefs: warning: got error code without errno equivalent: %d.
\n
"
,
error_code
);
gossip_err
(
"%s: bad error code :%d:.
\n
"
,
__func__
,
error_code
);
error_code
=
-
EINVAL
;
}
...
...
@@ -538,7 +542,7 @@ int orangefs_normalize_to_errno(__s32 error_code)
* there is a bug somewhere.
*/
}
else
{
gossip_err
(
"
orangefs: orangefs_normalize_to_errno: got error code which is not from ORANGEFS.
\n
"
);
gossip_err
(
"
%s: unknown error code.
\n
"
,
__func__
);
error_code
=
-
EINVAL
;
}
return
error_code
;
...
...
This diff is collapsed.
Click to expand it.
fs/orangefs/super.c
浏览文件 @
95f5f88f
...
...
@@ -156,9 +156,10 @@ static int orangefs_statfs(struct dentry *dentry, struct kstatfs *buf)
sb
=
dentry
->
d_sb
;
gossip_debug
(
GOSSIP_SUPER_DEBUG
,
"orangefs_statfs: called on sb %p (fs_id is %d)
\n
"
,
sb
,
(
int
)(
ORANGEFS_SB
(
sb
)
->
fs_id
));
"%s: called on sb %p (fs_id is %d)
\n
"
,
__func__
,
sb
,
(
int
)(
ORANGEFS_SB
(
sb
)
->
fs_id
));
new_op
=
op_alloc
(
ORANGEFS_VFS_OP_STATFS
);
if
(
!
new_op
)
...
...
@@ -198,7 +199,7 @@ static int orangefs_statfs(struct dentry *dentry, struct kstatfs *buf)
out_op_release:
op_release
(
new_op
);
gossip_debug
(
GOSSIP_SUPER_DEBUG
,
"
orangefs_statfs: returning %d
\n
"
,
ret
);
gossip_debug
(
GOSSIP_SUPER_DEBUG
,
"
%s: returning %d
\n
"
,
__func__
,
ret
);
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部