Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
1611e861
Commit
1611e861
authored
Jun 19, 2003
by
Nathan Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Fix some remaining unaligned access issues on 64 bit platforms.
SGI Modid: 2.5.x-xfs:slinx:143601a
parent
3dd61759
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.c
+10
-18
No files found.
fs/xfs/xfs_inode.c
View file @
1611e861
...
...
@@ -96,11 +96,12 @@ xfs_validate_extents(
xfs_exntfmt_t
fmt
)
{
xfs_bmbt_irec_t
irec
;
int
i
;
xfs_bmbt_rec_t
rec
;
int
i
;
for
(
i
=
0
;
i
<
nrecs
;
i
++
)
{
memcpy
(
&
rec
,
ep
,
sizeof
(
rec
));
rec
.
l0
=
get_unaligned
((
__uint64_t
*
)
&
ep
->
l0
);
rec
.
l1
=
get_unaligned
((
__uint64_t
*
)
&
ep
->
l1
);
if
(
disk
)
xfs_bmbt_disk_get_all
(
&
rec
,
&
irec
);
else
...
...
@@ -691,21 +692,16 @@ xfs_iformat_extents(
ifp
->
if_bytes
=
size
;
ifp
->
if_real_bytes
=
real_size
;
if
(
size
)
{
xfs_validate_extents
(
(
xfs_bmbt_rec_t
*
)
XFS_DFORK_PTR_ARCH
(
dip
,
whichfork
,
ARCH_CONVERT
),
nex
,
1
,
XFS_EXTFMT_INODE
(
ip
));
dp
=
(
xfs_bmbt_rec_t
*
)
XFS_DFORK_PTR_ARCH
(
dip
,
whichfork
,
ARCH_CONVERT
);
dp
=
(
xfs_bmbt_rec_t
*
)
XFS_DFORK_PTR_ARCH
(
dip
,
whichfork
,
ARCH_CONVERT
);
xfs_validate_extents
(
dp
,
nex
,
1
,
XFS_EXTFMT_INODE
(
ip
));
ep
=
ifp
->
if_u1
.
if_extents
;
#if ARCH_CONVERT != ARCH_NOCONVERT
for
(
i
=
0
;
i
<
nex
;
i
++
,
ep
++
,
dp
++
)
{
ep
->
l0
=
INT_GET
(
get_unaligned
((
u64
*
)
&
dp
->
l0
),
ep
->
l0
=
INT_GET
(
get_unaligned
((
__uint64_t
*
)
&
dp
->
l0
),
ARCH_CONVERT
);
ep
->
l1
=
INT_GET
(
get_unaligned
((
u64
*
)
&
dp
->
l1
),
ep
->
l1
=
INT_GET
(
get_unaligned
((
__uint64_t
*
)
&
dp
->
l1
),
ARCH_CONVERT
);
}
#else
memcpy
(
ep
,
dp
,
size
);
#endif
xfs_bmap_trace_exlist
(
"xfs_iformat_extents"
,
ip
,
nex
,
whichfork
);
if
(
whichfork
!=
XFS_DATA_FORK
||
...
...
@@ -2733,15 +2729,11 @@ xfs_iextents_copy(
continue
;
}
#if ARCH_CONVERT != ARCH_NOCONVERT
/* Translate to on disk format */
put_unaligned
(
INT_GET
(
ep
->
l0
,
ARCH_CONVERT
),
(
u64
*
)
&
dest_ep
->
l0
);
(
__uint64_t
*
)
&
dest_ep
->
l0
);
put_unaligned
(
INT_GET
(
ep
->
l1
,
ARCH_CONVERT
),
(
u64
*
)
&
dest_ep
->
l1
);
#else
*
dest_ep
=
*
ep
;
#endif
(
__uint64_t
*
)
&
dest_ep
->
l1
);
dest_ep
++
;
ep
++
;
copied
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment