Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
de50e16f
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
de50e16f
编写于
9年前
作者:
D
Dave Chinner
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'xfs-misc-fixes-for-4.2-3' into for-next
上级
3d238b7e
f66bf042
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
77 addition
and
91 deletion
+77
-91
fs/xfs/libxfs/xfs_ialloc.h
fs/xfs/libxfs/xfs_ialloc.h
+1
-2
fs/xfs/libxfs/xfs_inode_buf.c
fs/xfs/libxfs/xfs_inode_buf.c
+3
-5
fs/xfs/xfs_attr_inactive.c
fs/xfs/xfs_attr_inactive.c
+8
-2
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.c
+3
-3
fs/xfs/xfs_buf.h
fs/xfs/xfs_buf.h
+1
-1
fs/xfs/xfs_error.c
fs/xfs/xfs_error.c
+2
-2
fs/xfs/xfs_error.h
fs/xfs/xfs_error.h
+2
-2
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_extfree_item.c
+1
-1
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.c
+1
-1
fs/xfs/xfs_linux.h
fs/xfs/xfs_linux.h
+0
-14
fs/xfs/xfs_log.c
fs/xfs/xfs_log.c
+19
-21
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_log_priv.h
+1
-1
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_log_recover.c
+31
-32
fs/xfs/xfs_symlink.c
fs/xfs/xfs_symlink.c
+1
-1
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_ail.c
+3
-3
未找到文件。
fs/xfs/libxfs/xfs_ialloc.h
浏览文件 @
de50e16f
...
...
@@ -51,8 +51,7 @@ xfs_icluster_size_fsb(
static
inline
struct
xfs_dinode
*
xfs_make_iptr
(
struct
xfs_mount
*
mp
,
struct
xfs_buf
*
b
,
int
o
)
{
return
(
struct
xfs_dinode
*
)
(
xfs_buf_offset
(
b
,
o
<<
(
mp
)
->
m_sb
.
sb_inodelog
));
return
xfs_buf_offset
(
b
,
o
<<
(
mp
)
->
m_sb
.
sb_inodelog
);
}
/*
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/libxfs/xfs_inode_buf.c
浏览文件 @
de50e16f
...
...
@@ -46,8 +46,7 @@ xfs_inobp_check(
j
=
mp
->
m_inode_cluster_size
>>
mp
->
m_sb
.
sb_inodelog
;
for
(
i
=
0
;
i
<
j
;
i
++
)
{
dip
=
(
xfs_dinode_t
*
)
xfs_buf_offset
(
bp
,
i
*
mp
->
m_sb
.
sb_inodesize
);
dip
=
xfs_buf_offset
(
bp
,
i
*
mp
->
m_sb
.
sb_inodesize
);
if
(
!
dip
->
di_next_unlinked
)
{
xfs_alert
(
mp
,
"Detected bogus zero next_unlinked field in inode %d buffer 0x%llx."
,
...
...
@@ -86,8 +85,7 @@ xfs_inode_buf_verify(
int
di_ok
;
xfs_dinode_t
*
dip
;
dip
=
(
struct
xfs_dinode
*
)
xfs_buf_offset
(
bp
,
(
i
<<
mp
->
m_sb
.
sb_inodelog
));
dip
=
xfs_buf_offset
(
bp
,
(
i
<<
mp
->
m_sb
.
sb_inodelog
));
di_ok
=
dip
->
di_magic
==
cpu_to_be16
(
XFS_DINODE_MAGIC
)
&&
XFS_DINODE_GOOD_VERSION
(
dip
->
di_version
);
if
(
unlikely
(
XFS_TEST_ERROR
(
!
di_ok
,
mp
,
...
...
@@ -186,7 +184,7 @@ xfs_imap_to_bp(
}
*
bpp
=
bp
;
*
dipp
=
(
struct
xfs_dinode
*
)
xfs_buf_offset
(
bp
,
imap
->
im_boffset
);
*
dipp
=
xfs_buf_offset
(
bp
,
imap
->
im_boffset
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_attr_inactive.c
浏览文件 @
de50e16f
...
...
@@ -433,8 +433,14 @@ xfs_attr_inactive(
*/
xfs_trans_ijoin
(
trans
,
dp
,
0
);
/* invalidate and truncate the attribute fork extents */
if
(
dp
->
i_d
.
di_aformat
!=
XFS_DINODE_FMT_LOCAL
)
{
/*
* Invalidate and truncate the attribute fork extents. Make sure the
* fork actually has attributes as otherwise the invalidation has no
* blocks to read and returns an error. In this case, just do the fork
* removal below.
*/
if
(
xfs_inode_hasattr
(
dp
)
&&
dp
->
i_d
.
di_aformat
!=
XFS_DINODE_FMT_LOCAL
)
{
error
=
xfs_attr3_root_inactive
(
&
trans
,
dp
);
if
(
error
)
goto
out_cancel
;
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_buf.c
浏览文件 @
de50e16f
...
...
@@ -1419,9 +1419,9 @@ xfs_buf_submit_wait(
return
error
;
}
xfs_caddr_t
void
*
xfs_buf_offset
(
xfs_buf_t
*
bp
,
struct
xfs_buf
*
bp
,
size_t
offset
)
{
struct
page
*
page
;
...
...
@@ -1431,7 +1431,7 @@ xfs_buf_offset(
offset
+=
bp
->
b_offset
;
page
=
bp
->
b_pages
[
offset
>>
PAGE_SHIFT
];
return
(
xfs_caddr_t
)
page_address
(
page
)
+
(
offset
&
(
PAGE_SIZE
-
1
));
return
page_address
(
page
)
+
(
offset
&
(
PAGE_SIZE
-
1
));
}
/*
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_buf.h
浏览文件 @
de50e16f
...
...
@@ -299,7 +299,7 @@ extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, void *,
xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO)
/* Buffer Utility Routines */
extern
xfs_caddr_t
xfs_buf_offset
(
xfs_buf_t
*
,
size_t
);
extern
void
*
xfs_buf_offset
(
struct
xfs_buf
*
,
size_t
);
/* Delayed Write Buffer Routines */
extern
bool
xfs_buf_delwri_queue
(
struct
xfs_buf
*
,
struct
list_head
*
);
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_error.c
浏览文件 @
de50e16f
...
...
@@ -127,7 +127,7 @@ xfs_error_report(
struct
xfs_mount
*
mp
,
const
char
*
filename
,
int
linenum
,
inst_t
*
ra
)
void
*
ra
)
{
if
(
level
<=
xfs_error_level
)
{
xfs_alert_tag
(
mp
,
XFS_PTAG_ERROR_REPORT
,
...
...
@@ -146,7 +146,7 @@ xfs_corruption_error(
void
*
p
,
const
char
*
filename
,
int
linenum
,
inst_t
*
ra
)
void
*
ra
)
{
if
(
level
<=
xfs_error_level
)
xfs_hex_dump
(
p
,
64
);
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_error.h
浏览文件 @
de50e16f
...
...
@@ -21,10 +21,10 @@
struct
xfs_mount
;
extern
void
xfs_error_report
(
const
char
*
tag
,
int
level
,
struct
xfs_mount
*
mp
,
const
char
*
filename
,
int
linenum
,
inst_t
*
ra
);
const
char
*
filename
,
int
linenum
,
void
*
ra
);
extern
void
xfs_corruption_error
(
const
char
*
tag
,
int
level
,
struct
xfs_mount
*
mp
,
void
*
p
,
const
char
*
filename
,
int
linenum
,
inst_t
*
ra
);
int
linenum
,
void
*
ra
);
extern
void
xfs_verifier_error
(
struct
xfs_buf
*
bp
);
#define XFS_ERROR_REPORT(e, lvl, mp) \
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_extfree_item.c
浏览文件 @
de50e16f
...
...
@@ -239,7 +239,7 @@ xfs_efi_init(
xfs_log_item_init
(
mp
,
&
efip
->
efi_item
,
XFS_LI_EFI
,
&
xfs_efi_item_ops
);
efip
->
efi_format
.
efi_nextents
=
nextents
;
efip
->
efi_format
.
efi_id
=
(
__psint_t
)(
void
*
)
efip
;
efip
->
efi_format
.
efi_id
=
(
uintptr_t
)(
void
*
)
efip
;
atomic_set
(
&
efip
->
efi_next_extent
,
0
);
atomic_set
(
&
efip
->
efi_refcount
,
2
);
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_inode.c
浏览文件 @
de50e16f
...
...
@@ -3392,7 +3392,7 @@ xfs_iflush_int(
ASSERT
(
ip
->
i_d
.
di_version
>
1
);
/* set *dip = inode's place in the buffer */
dip
=
(
xfs_dinode_t
*
)
xfs_buf_offset
(
bp
,
ip
->
i_imap
.
im_boffset
);
dip
=
xfs_buf_offset
(
bp
,
ip
->
i_imap
.
im_boffset
);
if
(
XFS_TEST_ERROR
(
dip
->
di_magic
!=
cpu_to_be16
(
XFS_DINODE_MAGIC
),
mp
,
XFS_ERRTAG_IFLUSH_1
,
XFS_RANDOM_IFLUSH_1
))
{
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_linux.h
浏览文件 @
de50e16f
...
...
@@ -32,26 +32,12 @@ typedef unsigned int __uint32_t;
typedef
signed
long
long
int
__int64_t
;
typedef
unsigned
long
long
int
__uint64_t
;
typedef
__uint32_t
inst_t
;
/* an instruction */
typedef
__s64
xfs_off_t
;
/* <file offset> type */
typedef
unsigned
long
long
xfs_ino_t
;
/* <inode> type */
typedef
__s64
xfs_daddr_t
;
/* <disk address> type */
typedef
char
*
xfs_caddr_t
;
/* <core address> type */
typedef
__u32
xfs_dev_t
;
typedef
__u32
xfs_nlink_t
;
/* __psint_t is the same size as a pointer */
#if (BITS_PER_LONG == 32)
typedef
__int32_t
__psint_t
;
typedef
__uint32_t
__psunsigned_t
;
#elif (BITS_PER_LONG == 64)
typedef
__int64_t
__psint_t
;
typedef
__uint64_t
__psunsigned_t
;
#else
#error BITS_PER_LONG must be 32 or 64
#endif
#include "xfs_types.h"
#include "kmem.h"
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_log.c
浏览文件 @
de50e16f
...
...
@@ -109,7 +109,7 @@ xlog_ungrant_log_space(
STATIC
void
xlog_verify_dest_ptr
(
struct
xlog
*
log
,
char
*
ptr
);
void
*
ptr
);
STATIC
void
xlog_verify_grant_tail
(
struct
xlog
*
log
);
...
...
@@ -1444,7 +1444,7 @@ xlog_alloc_log(
iclog
->
ic_bp
=
bp
;
iclog
->
ic_data
=
bp
->
b_addr
;
#ifdef DEBUG
log
->
l_iclog_bak
[
i
]
=
(
xfs_caddr_t
)
&
(
iclog
->
ic_header
)
;
log
->
l_iclog_bak
[
i
]
=
&
iclog
->
ic_header
;
#endif
head
=
&
iclog
->
ic_header
;
memset
(
head
,
0
,
sizeof
(
xlog_rec_header_t
));
...
...
@@ -1599,7 +1599,7 @@ xlog_pack_data(
int
i
,
j
,
k
;
int
size
=
iclog
->
ic_offset
+
roundoff
;
__be32
cycle_lsn
;
xfs_caddr_t
dp
;
char
*
dp
;
cycle_lsn
=
CYCLE_LSN_DISK
(
iclog
->
ic_header
.
h_lsn
);
...
...
@@ -3661,7 +3661,7 @@ xlog_ticket_alloc(
void
xlog_verify_dest_ptr
(
struct
xlog
*
log
,
char
*
ptr
)
void
*
ptr
)
{
int
i
;
int
good_ptr
=
0
;
...
...
@@ -3764,9 +3764,8 @@ xlog_verify_iclog(
xlog_op_header_t
*
ophead
;
xlog_in_core_t
*
icptr
;
xlog_in_core_2_t
*
xhdr
;
xfs_caddr_t
ptr
;
xfs_caddr_t
base_ptr
;
__psint_t
field_offset
;
void
*
base_ptr
,
*
ptr
,
*
p
;
ptrdiff_t
field_offset
;
__uint8_t
clientid
;
int
len
,
i
,
j
,
k
,
op_len
;
int
idx
;
...
...
@@ -3785,9 +3784,9 @@ xlog_verify_iclog(
if
(
iclog
->
ic_header
.
h_magicno
!=
cpu_to_be32
(
XLOG_HEADER_MAGIC_NUM
))
xfs_emerg
(
log
->
l_mp
,
"%s: invalid magic num"
,
__func__
);
ptr
=
(
xfs_caddr_t
)
&
iclog
->
ic_header
;
for
(
ptr
+=
BBSIZE
;
ptr
<
((
xfs_caddr_t
)
&
iclog
->
ic_header
)
+
count
;
ptr
+=
BBSIZE
)
{
base_ptr
=
ptr
=
&
iclog
->
ic_header
;
p
=
&
iclog
->
ic_header
;
for
(
ptr
+=
BBSIZE
;
ptr
<
base_ptr
+
count
;
ptr
+=
BBSIZE
)
{
if
(
*
(
__be32
*
)
ptr
==
cpu_to_be32
(
XLOG_HEADER_MAGIC_NUM
))
xfs_emerg
(
log
->
l_mp
,
"%s: unexpected magic num"
,
__func__
);
...
...
@@ -3795,20 +3794,19 @@ xlog_verify_iclog(
/* check fields */
len
=
be32_to_cpu
(
iclog
->
ic_header
.
h_num_logops
);
ptr
=
iclog
->
ic_datap
;
base_ptr
=
ptr
;
ophead
=
(
xlog_op_header_t
*
)
ptr
;
base_ptr
=
ptr
=
iclog
->
ic_datap
;
ophead
=
ptr
;
xhdr
=
iclog
->
ic_data
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
ophead
=
(
xlog_op_header_t
*
)
ptr
;
ophead
=
ptr
;
/* clientid is only 1 byte */
field_offset
=
(
__psint_t
)
((
xfs_caddr_t
)
&
(
ophead
->
oh_clientid
)
-
base_ptr
)
;
p
=
&
ophead
->
oh_clientid
;
field_offset
=
p
-
base_ptr
;
if
(
!
syncing
||
(
field_offset
&
0x1ff
))
{
clientid
=
ophead
->
oh_clientid
;
}
else
{
idx
=
BTOBBT
((
xfs_caddr_t
)
&
(
ophead
->
oh_clientid
)
-
iclog
->
ic_datap
);
idx
=
BTOBBT
((
char
*
)
&
ophead
->
oh_clientid
-
iclog
->
ic_datap
);
if
(
idx
>=
(
XLOG_HEADER_CYCLE_SIZE
/
BBSIZE
))
{
j
=
idx
/
(
XLOG_HEADER_CYCLE_SIZE
/
BBSIZE
);
k
=
idx
%
(
XLOG_HEADER_CYCLE_SIZE
/
BBSIZE
);
...
...
@@ -3826,13 +3824,13 @@ xlog_verify_iclog(
(
unsigned
long
)
field_offset
);
/* check length */
field_offset
=
(
__psint_t
)
((
xfs_caddr_t
)
&
(
ophead
->
oh_len
)
-
base_ptr
)
;
p
=
&
ophead
->
oh_len
;
field_offset
=
p
-
base_ptr
;
if
(
!
syncing
||
(
field_offset
&
0x1ff
))
{
op_len
=
be32_to_cpu
(
ophead
->
oh_len
);
}
else
{
idx
=
BTOBBT
((
__psint
_t
)
&
ophead
->
oh_len
-
(
__psint
_t
)
iclog
->
ic_datap
);
idx
=
BTOBBT
((
uintptr
_t
)
&
ophead
->
oh_len
-
(
uintptr
_t
)
iclog
->
ic_datap
);
if
(
idx
>=
(
XLOG_HEADER_CYCLE_SIZE
/
BBSIZE
))
{
j
=
idx
/
(
XLOG_HEADER_CYCLE_SIZE
/
BBSIZE
);
k
=
idx
%
(
XLOG_HEADER_CYCLE_SIZE
/
BBSIZE
);
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_log_priv.h
浏览文件 @
de50e16f
...
...
@@ -409,7 +409,7 @@ struct xlog {
/* The following field are used for debugging; need to hold icloglock */
#ifdef DEBUG
char
*
l_iclog_bak
[
XLOG_MAX_ICLOGS
];
void
*
l_iclog_bak
[
XLOG_MAX_ICLOGS
];
#endif
};
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_log_recover.c
浏览文件 @
de50e16f
...
...
@@ -147,7 +147,7 @@ xlog_put_bp(
* Return the address of the start of the given block number's data
* in a log buffer. The buffer covers a log sector-aligned region.
*/
STATIC
xfs_caddr_t
STATIC
char
*
xlog_align
(
struct
xlog
*
log
,
xfs_daddr_t
blk_no
,
...
...
@@ -203,7 +203,7 @@ xlog_bread(
xfs_daddr_t
blk_no
,
int
nbblks
,
struct
xfs_buf
*
bp
,
xfs_caddr_t
*
offset
)
char
*
*
offset
)
{
int
error
;
...
...
@@ -225,9 +225,9 @@ xlog_bread_offset(
xfs_daddr_t
blk_no
,
/* block to read from */
int
nbblks
,
/* blocks to read */
struct
xfs_buf
*
bp
,
xfs_caddr_t
offset
)
char
*
offset
)
{
xfs_caddr_t
orig_offset
=
bp
->
b_addr
;
char
*
orig_offset
=
bp
->
b_addr
;
int
orig_len
=
BBTOB
(
bp
->
b_length
);
int
error
,
error2
;
...
...
@@ -396,7 +396,7 @@ xlog_find_cycle_start(
xfs_daddr_t
*
last_blk
,
uint
cycle
)
{
xfs_caddr_t
offset
;
char
*
offset
;
xfs_daddr_t
mid_blk
;
xfs_daddr_t
end_blk
;
uint
mid_cycle
;
...
...
@@ -443,7 +443,7 @@ xlog_find_verify_cycle(
uint
cycle
;
xfs_buf_t
*
bp
;
xfs_daddr_t
bufblks
;
xfs_caddr_t
buf
=
NULL
;
char
*
buf
=
NULL
;
int
error
=
0
;
/*
...
...
@@ -509,7 +509,7 @@ xlog_find_verify_log_record(
{
xfs_daddr_t
i
;
xfs_buf_t
*
bp
;
xfs_caddr_t
offset
=
NULL
;
char
*
offset
=
NULL
;
xlog_rec_header_t
*
head
=
NULL
;
int
error
=
0
;
int
smallmem
=
0
;
...
...
@@ -616,7 +616,7 @@ xlog_find_head(
xfs_daddr_t
*
return_head_blk
)
{
xfs_buf_t
*
bp
;
xfs_caddr_t
offset
;
char
*
offset
;
xfs_daddr_t
new_blk
,
first_blk
,
start_blk
,
last_blk
,
head_blk
;
int
num_scan_bblks
;
uint
first_half_cycle
,
last_half_cycle
;
...
...
@@ -891,7 +891,7 @@ xlog_find_tail(
{
xlog_rec_header_t
*
rhead
;
xlog_op_header_t
*
op_head
;
xfs_caddr_t
offset
=
NULL
;
char
*
offset
=
NULL
;
xfs_buf_t
*
bp
;
int
error
,
i
,
found
;
xfs_daddr_t
umount_data_blk
;
...
...
@@ -1099,7 +1099,7 @@ xlog_find_zeroed(
xfs_daddr_t
*
blk_no
)
{
xfs_buf_t
*
bp
;
xfs_caddr_t
offset
;
char
*
offset
;
uint
first_cycle
,
last_cycle
;
xfs_daddr_t
new_blk
,
last_blk
,
start_blk
;
xfs_daddr_t
num_scan_bblks
;
...
...
@@ -1199,7 +1199,7 @@ xlog_find_zeroed(
STATIC
void
xlog_add_record
(
struct
xlog
*
log
,
xfs_caddr_t
buf
,
char
*
buf
,
int
cycle
,
int
block
,
int
tail_cycle
,
...
...
@@ -1227,7 +1227,7 @@ xlog_write_log_records(
int
tail_cycle
,
int
tail_block
)
{
xfs_caddr_t
offset
;
char
*
offset
;
xfs_buf_t
*
bp
;
int
balign
,
ealign
;
int
sectbb
=
log
->
l_sectBBsize
;
...
...
@@ -1789,8 +1789,7 @@ xlog_recover_do_inode_buffer(
return
-
EFSCORRUPTED
;
}
buffer_nextp
=
(
xfs_agino_t
*
)
xfs_buf_offset
(
bp
,
next_unlinked_offset
);
buffer_nextp
=
xfs_buf_offset
(
bp
,
next_unlinked_offset
);
*
buffer_nextp
=
*
logged_nextp
;
/*
...
...
@@ -1798,7 +1797,7 @@ xlog_recover_do_inode_buffer(
* have to leave the inode in a consistent state for whoever
* reads it next....
*/
xfs_dinode_calc_crc
(
mp
,
(
struct
xfs_dinode
*
)
xfs_dinode_calc_crc
(
mp
,
xfs_buf_offset
(
bp
,
i
*
mp
->
m_sb
.
sb_inodesize
));
}
...
...
@@ -2503,8 +2502,8 @@ xlog_recover_inode_pass2(
xfs_buf_t
*
bp
;
xfs_dinode_t
*
dip
;
int
len
;
xfs_caddr_t
src
;
xfs_caddr_t
dest
;
char
*
src
;
char
*
dest
;
int
error
;
int
attr_index
;
uint
fields
;
...
...
@@ -2546,7 +2545,7 @@ xlog_recover_inode_pass2(
goto
out_release
;
}
ASSERT
(
in_f
->
ilf_fields
&
XFS_ILOG_CORE
);
dip
=
(
xfs_dinode_t
*
)
xfs_buf_offset
(
bp
,
in_f
->
ilf_boffset
);
dip
=
xfs_buf_offset
(
bp
,
in_f
->
ilf_boffset
);
/*
* Make sure the place we're flushing out to really looks
...
...
@@ -2885,7 +2884,7 @@ xlog_recover_dquot_pass2(
return
error
;
ASSERT
(
bp
);
ddq
=
(
xfs_disk_dquot_t
*
)
xfs_buf_offset
(
bp
,
dq_f
->
qlf_boffset
);
ddq
=
xfs_buf_offset
(
bp
,
dq_f
->
qlf_boffset
);
/*
* If the dquot has an LSN in it, recover the dquot only if it's less
...
...
@@ -3374,17 +3373,17 @@ STATIC int
xlog_recover_add_to_cont_trans
(
struct
xlog
*
log
,
struct
xlog_recover
*
trans
,
xfs_caddr_t
dp
,
char
*
dp
,
int
len
)
{
xlog_recover_item_t
*
item
;
xfs_caddr_t
ptr
,
old_ptr
;
char
*
ptr
,
*
old_ptr
;
int
old_len
;
if
(
list_empty
(
&
trans
->
r_itemq
))
{
/* finish copying rest of trans header */
xlog_recover_add_item
(
&
trans
->
r_itemq
);
ptr
=
(
xfs_caddr_t
)
&
trans
->
r_theader
+
ptr
=
(
char
*
)
&
trans
->
r_theader
+
sizeof
(
xfs_trans_header_t
)
-
len
;
memcpy
(
ptr
,
dp
,
len
);
return
0
;
...
...
@@ -3420,12 +3419,12 @@ STATIC int
xlog_recover_add_to_trans
(
struct
xlog
*
log
,
struct
xlog_recover
*
trans
,
xfs_caddr_t
dp
,
char
*
dp
,
int
len
)
{
xfs_inode_log_format_t
*
in_f
;
/* any will do */
xlog_recover_item_t
*
item
;
xfs_caddr_t
ptr
;
char
*
ptr
;
if
(
!
len
)
return
0
;
...
...
@@ -3514,7 +3513,7 @@ STATIC int
xlog_recovery_process_trans
(
struct
xlog
*
log
,
struct
xlog_recover
*
trans
,
xfs_caddr_t
dp
,
char
*
dp
,
unsigned
int
len
,
unsigned
int
flags
,
int
pass
)
...
...
@@ -3621,8 +3620,8 @@ xlog_recover_process_ophdr(
struct
hlist_head
rhash
[],
struct
xlog_rec_header
*
rhead
,
struct
xlog_op_header
*
ohead
,
xfs_caddr_t
dp
,
xfs_caddr_t
end
,
char
*
dp
,
char
*
end
,
int
pass
)
{
struct
xlog_recover
*
trans
;
...
...
@@ -3671,11 +3670,11 @@ xlog_recover_process_data(
struct
xlog
*
log
,
struct
hlist_head
rhash
[],
struct
xlog_rec_header
*
rhead
,
xfs_caddr_t
dp
,
char
*
dp
,
int
pass
)
{
struct
xlog_op_header
*
ohead
;
xfs_caddr_t
end
;
char
*
end
;
int
num_logops
;
int
error
;
...
...
@@ -4020,7 +4019,7 @@ xlog_recover_process_iunlinks(
STATIC
int
xlog_unpack_data_crc
(
struct
xlog_rec_header
*
rhead
,
xfs_caddr_t
dp
,
char
*
dp
,
struct
xlog
*
log
)
{
__le32
crc
;
...
...
@@ -4050,7 +4049,7 @@ xlog_unpack_data_crc(
STATIC
int
xlog_unpack_data
(
struct
xlog_rec_header
*
rhead
,
xfs_caddr_t
dp
,
char
*
dp
,
struct
xlog
*
log
)
{
int
i
,
j
,
k
;
...
...
@@ -4132,7 +4131,7 @@ xlog_do_recovery_pass(
{
xlog_rec_header_t
*
rhead
;
xfs_daddr_t
blk_no
;
xfs_caddr_t
offset
;
char
*
offset
;
xfs_buf_t
*
hbp
,
*
dbp
;
int
error
=
0
,
h_size
;
int
bblks
,
split_bblks
;
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_symlink.c
浏览文件 @
de50e16f
...
...
@@ -104,7 +104,7 @@ xfs_readlink_bmap(
cur_chunk
+=
sizeof
(
struct
xfs_dsymlink_hdr
);
}
memcpy
(
link
+
offset
,
bp
->
b_addr
,
byte_cnt
);
memcpy
(
link
+
offset
,
cur_chunk
,
byte_cnt
);
pathlen
-=
byte_cnt
;
offset
+=
byte_cnt
;
...
...
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_trans_ail.c
浏览文件 @
de50e16f
...
...
@@ -159,7 +159,7 @@ xfs_trans_ail_cursor_next(
{
struct
xfs_log_item
*
lip
=
cur
->
item
;
if
((
__psint
_t
)
lip
&
1
)
if
((
uintptr
_t
)
lip
&
1
)
lip
=
xfs_ail_min
(
ailp
);
if
(
lip
)
cur
->
item
=
xfs_ail_next
(
ailp
,
lip
);
...
...
@@ -196,7 +196,7 @@ xfs_trans_ail_cursor_clear(
list_for_each_entry
(
cur
,
&
ailp
->
xa_cursors
,
list
)
{
if
(
cur
->
item
==
lip
)
cur
->
item
=
(
struct
xfs_log_item
*
)
((
__psint
_t
)
cur
->
item
|
1
);
((
uintptr
_t
)
cur
->
item
|
1
);
}
}
...
...
@@ -287,7 +287,7 @@ xfs_ail_splice(
* find the place in the AIL where the items belong.
*/
lip
=
cur
?
cur
->
item
:
NULL
;
if
(
!
lip
||
(
__psint_t
)
lip
&
1
)
if
(
!
lip
||
(
uintptr_t
)
lip
&
1
)
lip
=
__xfs_trans_ail_cursor_last
(
ailp
,
lsn
);
/*
...
...
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部