Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
2da5c4b0
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看板
提交
2da5c4b0
编写于
11月 03, 2015
作者:
D
Dave Chinner
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'xfs-misc-fixes-for-4.4-2' into for-next
上级
fcd8a399
fc0561ce
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
101 addition
and
16 deletion
+101
-16
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_format.h
+6
-2
fs/xfs/xfs_acl.c
fs/xfs/xfs_acl.c
+8
-5
fs/xfs/xfs_acl.h
fs/xfs/xfs_acl.h
+3
-0
fs/xfs/xfs_file.c
fs/xfs/xfs_file.c
+16
-5
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.c
+2
-0
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_inode_item.c
+1
-0
fs/xfs/xfs_inode_item.h
fs/xfs/xfs_inode_item.h
+1
-0
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_ioctl.c
+13
-2
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.c
+10
-0
fs/xfs/xfs_mount.h
fs/xfs/xfs_mount.h
+1
-0
fs/xfs/xfs_super.c
fs/xfs/xfs_super.c
+1
-0
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_ail.c
+1
-0
fs/xfs/xfs_trans_inode.c
fs/xfs/xfs_trans_inode.c
+9
-0
fs/xfs/xfs_xattr.c
fs/xfs/xfs_xattr.c
+29
-2
未找到文件。
fs/xfs/libxfs/xfs_format.h
浏览文件 @
2da5c4b0
...
...
@@ -1495,9 +1495,13 @@ struct xfs_acl {
sizeof(struct xfs_acl_entry) \
: 25)
#define XFS_ACL_
MAX_SIZE(mp
) \
#define XFS_ACL_
SIZE(cnt
) \
(sizeof(struct xfs_acl) + \
sizeof(struct xfs_acl_entry) * XFS_ACL_MAX_ENTRIES((mp)))
sizeof(struct xfs_acl_entry) * cnt)
#define XFS_ACL_MAX_SIZE(mp) \
XFS_ACL_SIZE(XFS_ACL_MAX_ENTRIES((mp)))
/* On-disk XFS extended attribute names */
#define SGI_ACL_FILE "SGI_ACL_FILE"
...
...
fs/xfs/xfs_acl.c
浏览文件 @
2da5c4b0
...
...
@@ -37,16 +37,19 @@
STATIC
struct
posix_acl
*
xfs_acl_from_disk
(
struct
xfs_acl
*
aclp
,
int
max_entries
)
const
struct
xfs_acl
*
aclp
,
int
len
,
int
max_entries
)
{
struct
posix_acl_entry
*
acl_e
;
struct
posix_acl
*
acl
;
struct
xfs_acl_entry
*
ace
;
const
struct
xfs_acl_entry
*
ace
;
unsigned
int
count
,
i
;
if
(
len
<
sizeof
(
*
aclp
))
return
ERR_PTR
(
-
EFSCORRUPTED
);
count
=
be32_to_cpu
(
aclp
->
acl_cnt
);
if
(
count
>
max_entries
)
if
(
count
>
max_entries
||
XFS_ACL_SIZE
(
count
)
!=
len
)
return
ERR_PTR
(
-
EFSCORRUPTED
);
acl
=
posix_acl_alloc
(
count
,
GFP_KERNEL
);
...
...
@@ -163,7 +166,7 @@ xfs_get_acl(struct inode *inode, int type)
goto
out
;
}
acl
=
xfs_acl_from_disk
(
xfs_acl
,
XFS_ACL_MAX_ENTRIES
(
ip
->
i_mount
));
acl
=
xfs_acl_from_disk
(
xfs_acl
,
len
,
XFS_ACL_MAX_ENTRIES
(
ip
->
i_mount
));
if
(
IS_ERR
(
acl
))
goto
out
;
...
...
fs/xfs/xfs_acl.h
浏览文件 @
2da5c4b0
...
...
@@ -36,4 +36,7 @@ static inline struct posix_acl *xfs_get_acl(struct inode *inode, int type)
# define posix_acl_access_exists(inode) 0
# define posix_acl_default_exists(inode) 0
#endif
/* CONFIG_XFS_POSIX_ACL */
extern
void
xfs_forget_acl
(
struct
inode
*
inode
,
const
char
*
name
,
int
xflags
);
#endif
/* __XFS_ACL_H__ */
fs/xfs/xfs_file.c
浏览文件 @
2da5c4b0
...
...
@@ -242,19 +242,30 @@ xfs_file_fsync(
}
/*
* All metadata updates are logged, which means that we just have
* to flush the log up to the latest LSN that touched the inode.
* All metadata updates are logged, which means that we just have to
* flush the log up to the latest LSN that touched the inode. If we have
* concurrent fsync/fdatasync() calls, we need them to all block on the
* log force before we clear the ili_fsync_fields field. This ensures
* that we don't get a racing sync operation that does not wait for the
* metadata to hit the journal before returning. If we race with
* clearing the ili_fsync_fields, then all that will happen is the log
* force will do nothing as the lsn will already be on disk. We can't
* race with setting ili_fsync_fields because that is done under
* XFS_ILOCK_EXCL, and that can't happen because we hold the lock shared
* until after the ili_fsync_fields is cleared.
*/
xfs_ilock
(
ip
,
XFS_ILOCK_SHARED
);
if
(
xfs_ipincount
(
ip
))
{
if
(
!
datasync
||
(
ip
->
i_itemp
->
ili_fields
&
~
XFS_ILOG_TIMESTAMP
))
(
ip
->
i_itemp
->
ili_f
sync_f
ields
&
~
XFS_ILOG_TIMESTAMP
))
lsn
=
ip
->
i_itemp
->
ili_last_lsn
;
}
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
if
(
lsn
)
if
(
lsn
)
{
error
=
_xfs_log_force_lsn
(
mp
,
lsn
,
XFS_LOG_SYNC
,
&
log_flushed
);
ip
->
i_itemp
->
ili_fsync_fields
=
0
;
}
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
/*
* If we only have a single device, and the log force about was
...
...
fs/xfs/xfs_inode.c
浏览文件 @
2da5c4b0
...
...
@@ -2365,6 +2365,7 @@ xfs_ifree_cluster(
iip
->
ili_last_fields
=
iip
->
ili_fields
;
iip
->
ili_fields
=
0
;
iip
->
ili_fsync_fields
=
0
;
iip
->
ili_logged
=
1
;
xfs_trans_ail_copy_lsn
(
mp
->
m_ail
,
&
iip
->
ili_flush_lsn
,
&
iip
->
ili_item
.
li_lsn
);
...
...
@@ -3560,6 +3561,7 @@ xfs_iflush_int(
*/
iip
->
ili_last_fields
=
iip
->
ili_fields
;
iip
->
ili_fields
=
0
;
iip
->
ili_fsync_fields
=
0
;
iip
->
ili_logged
=
1
;
xfs_trans_ail_copy_lsn
(
mp
->
m_ail
,
&
iip
->
ili_flush_lsn
,
...
...
fs/xfs/xfs_inode_item.c
浏览文件 @
2da5c4b0
...
...
@@ -719,6 +719,7 @@ xfs_iflush_abort(
* attempted.
*/
iip
->
ili_fields
=
0
;
iip
->
ili_fsync_fields
=
0
;
}
/*
* Release the inode's flush lock since we're done with it.
...
...
fs/xfs/xfs_inode_item.h
浏览文件 @
2da5c4b0
...
...
@@ -34,6 +34,7 @@ typedef struct xfs_inode_log_item {
unsigned
short
ili_logged
;
/* flushed logged data */
unsigned
int
ili_last_fields
;
/* fields when flushed */
unsigned
int
ili_fields
;
/* fields to be logged */
unsigned
int
ili_fsync_fields
;
/* logged since last fsync */
}
xfs_inode_log_item_t
;
static
inline
int
xfs_inode_clean
(
xfs_inode_t
*
ip
)
...
...
fs/xfs/xfs_ioctl.c
浏览文件 @
2da5c4b0
...
...
@@ -40,6 +40,7 @@
#include "xfs_symlink.h"
#include "xfs_trans.h"
#include "xfs_pnfs.h"
#include "xfs_acl.h"
#include <linux/capability.h>
#include <linux/dcache.h>
...
...
@@ -482,6 +483,7 @@ xfs_attrmulti_attr_set(
__uint32_t
flags
)
{
unsigned
char
*
kbuf
;
int
error
;
if
(
IS_IMMUTABLE
(
inode
)
||
IS_APPEND
(
inode
))
return
-
EPERM
;
...
...
@@ -492,7 +494,11 @@ xfs_attrmulti_attr_set(
if
(
IS_ERR
(
kbuf
))
return
PTR_ERR
(
kbuf
);
return
xfs_attr_set
(
XFS_I
(
inode
),
name
,
kbuf
,
len
,
flags
);
error
=
xfs_attr_set
(
XFS_I
(
inode
),
name
,
kbuf
,
len
,
flags
);
if
(
!
error
)
xfs_forget_acl
(
inode
,
name
,
flags
);
kfree
(
kbuf
);
return
error
;
}
int
...
...
@@ -501,9 +507,14 @@ xfs_attrmulti_attr_remove(
unsigned
char
*
name
,
__uint32_t
flags
)
{
int
error
;
if
(
IS_IMMUTABLE
(
inode
)
||
IS_APPEND
(
inode
))
return
-
EPERM
;
return
xfs_attr_remove
(
XFS_I
(
inode
),
name
,
flags
);
error
=
xfs_attr_remove
(
XFS_I
(
inode
),
name
,
flags
);
if
(
!
error
)
xfs_forget_acl
(
inode
,
name
,
flags
);
return
error
;
}
STATIC
int
...
...
fs/xfs/xfs_mount.c
浏览文件 @
2da5c4b0
...
...
@@ -47,6 +47,16 @@ static DEFINE_MUTEX(xfs_uuid_table_mutex);
static
int
xfs_uuid_table_size
;
static
uuid_t
*
xfs_uuid_table
;
void
xfs_uuid_table_free
(
void
)
{
if
(
xfs_uuid_table_size
==
0
)
return
;
kmem_free
(
xfs_uuid_table
);
xfs_uuid_table
=
NULL
;
xfs_uuid_table_size
=
0
;
}
/*
* See if the UUID is unique among mounted XFS filesystems.
* Mount fails if UUID is nil or a FS with the same UUID is already mounted.
...
...
fs/xfs/xfs_mount.h
浏览文件 @
2da5c4b0
...
...
@@ -313,6 +313,7 @@ typedef struct xfs_perag {
int
pagb_count
;
/* pagb slots in use */
}
xfs_perag_t
;
extern
void
xfs_uuid_table_free
(
void
);
extern
int
xfs_log_sbcount
(
xfs_mount_t
*
);
extern
__uint64_t
xfs_default_resblks
(
xfs_mount_t
*
mp
);
extern
int
xfs_mountfs
(
xfs_mount_t
*
mp
);
...
...
fs/xfs/xfs_super.c
浏览文件 @
2da5c4b0
...
...
@@ -1925,6 +1925,7 @@ exit_xfs_fs(void)
xfs_mru_cache_uninit
();
xfs_destroy_workqueues
();
xfs_destroy_zones
();
xfs_uuid_table_free
();
}
module_init
(
init_xfs_fs
);
...
...
fs/xfs/xfs_trans_ail.c
浏览文件 @
2da5c4b0
...
...
@@ -497,6 +497,7 @@ xfsaild(
long
tout
=
0
;
/* milliseconds */
current
->
flags
|=
PF_MEMALLOC
;
set_freezable
();
while
(
!
kthread_should_stop
())
{
if
(
tout
&&
tout
<=
20
)
...
...
fs/xfs/xfs_trans_inode.c
浏览文件 @
2da5c4b0
...
...
@@ -107,6 +107,15 @@ xfs_trans_log_inode(
ASSERT
(
ip
->
i_itemp
!=
NULL
);
ASSERT
(
xfs_isilocked
(
ip
,
XFS_ILOCK_EXCL
));
/*
* Record the specific change for fdatasync optimisation. This
* allows fdatasync to skip log forces for inodes that are only
* timestamp dirty. We do this before the change count so that
* the core being logged in this case does not impact on fdatasync
* behaviour.
*/
ip
->
i_itemp
->
ili_fsync_fields
|=
flags
;
/*
* First time we log the inode in a transaction, bump the inode change
* counter if it is configured for this to occur. We don't use
...
...
fs/xfs/xfs_xattr.c
浏览文件 @
2da5c4b0
...
...
@@ -53,11 +53,34 @@ xfs_xattr_get(struct dentry *dentry, const char *name,
return
asize
;
}
void
xfs_forget_acl
(
struct
inode
*
inode
,
const
char
*
name
,
int
xflags
)
{
/*
* Invalidate any cached ACLs if the user has bypassed the ACL
* interface. We don't validate the content whatsoever so it is caller
* responsibility to provide data in valid format and ensure i_mode is
* consistent.
*/
if
(
xflags
&
ATTR_ROOT
)
{
#ifdef CONFIG_XFS_POSIX_ACL
if
(
!
strcmp
(
name
,
SGI_ACL_FILE
))
forget_cached_acl
(
inode
,
ACL_TYPE_ACCESS
);
else
if
(
!
strcmp
(
name
,
SGI_ACL_DEFAULT
))
forget_cached_acl
(
inode
,
ACL_TYPE_DEFAULT
);
#endif
}
}
static
int
xfs_xattr_set
(
struct
dentry
*
dentry
,
const
char
*
name
,
const
void
*
value
,
size_t
size
,
int
flags
,
int
xflags
)
{
struct
xfs_inode
*
ip
=
XFS_I
(
d_inode
(
dentry
));
struct
xfs_inode
*
ip
=
XFS_I
(
d_inode
(
dentry
));
int
error
;
if
(
strcmp
(
name
,
""
)
==
0
)
return
-
EINVAL
;
...
...
@@ -70,8 +93,12 @@ xfs_xattr_set(struct dentry *dentry, const char *name, const void *value,
if
(
!
value
)
return
xfs_attr_remove
(
ip
,
(
unsigned
char
*
)
name
,
xflags
);
return
xfs_attr_set
(
ip
,
(
unsigned
char
*
)
name
,
error
=
xfs_attr_set
(
ip
,
(
unsigned
char
*
)
name
,
(
void
*
)
value
,
size
,
xflags
);
if
(
!
error
)
xfs_forget_acl
(
d_inode
(
dentry
),
name
,
xflags
);
return
error
;
}
static
const
struct
xattr_handler
xfs_xattr_user_handler
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录