Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
Kirill Smelkov
mariadb
Commits
bacf546e
Commit
bacf546e
authored
Oct 30, 2001
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os0file.c Replace some / 256 by >> operations
innobase/os/os0file.c: Replace some / 256 by >> operations
parent
fb531dae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
innobase/os/os0file.c
innobase/os/os0file.c
+13
-14
No files found.
innobase/os/os0file.c
View file @
bacf546e
...
@@ -459,7 +459,7 @@ os_file_get_size(
...
@@ -459,7 +459,7 @@ os_file_get_size(
if
(
sizeof
(
off_t
)
>
4
)
{
if
(
sizeof
(
off_t
)
>
4
)
{
*
size
=
(
ulint
)(
offs
&
0xFFFFFFFF
);
*
size
=
(
ulint
)(
offs
&
0xFFFFFFFF
);
*
size_high
=
(
ulint
)(
(
offs
/
(
256
*
256
))
/
(
256
*
256
)
);
*
size_high
=
(
ulint
)(
offs
>>
32
);
}
else
{
}
else
{
*
size
=
(
ulint
)
offs
;
*
size
=
(
ulint
)
offs
;
*
size_high
=
0
;
*
size_high
=
0
;
...
@@ -491,7 +491,7 @@ os_file_set_size(
...
@@ -491,7 +491,7 @@ os_file_set_size(
byte
*
buf
;
byte
*
buf
;
ulint
i
;
ulint
i
;
ut_a
(
((((
size
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
(
size
==
(
size
&
0xFFFFFFFF
)
);
try_again:
try_again:
/* We use a very big 8 MB buffer in writing because Linux may be
/* We use a very big 8 MB buffer in writing because Linux may be
...
@@ -505,8 +505,8 @@ try_again:
...
@@ -505,8 +505,8 @@ try_again:
}
}
offset
=
0
;
offset
=
0
;
low
=
(
ib_longlong
)
size
+
(((
ib_longlong
)
size_high
)
low
=
(
ib_longlong
)
size
+
(((
ib_longlong
)
size_high
)
<<
32
);
*
256
)
*
256
*
256
*
256
;
while
(
offset
<
low
)
{
while
(
offset
<
low
)
{
if
(
low
-
offset
<
UNIV_PAGE_SIZE
*
512
)
{
if
(
low
-
offset
<
UNIV_PAGE_SIZE
*
512
)
{
n_bytes
=
(
ulint
)(
low
-
offset
);
n_bytes
=
(
ulint
)(
low
-
offset
);
...
@@ -516,7 +516,7 @@ try_again:
...
@@ -516,7 +516,7 @@ try_again:
ret
=
os_file_write
(
name
,
file
,
buf
,
ret
=
os_file_write
(
name
,
file
,
buf
,
(
ulint
)(
offset
&
0xFFFFFFFF
),
(
ulint
)(
offset
&
0xFFFFFFFF
),
(
ulint
)((((
offset
/
256
)
/
256
)
/
256
)
/
256
),
(
ulint
)(
offset
>>
32
),
n_bytes
);
n_bytes
);
if
(
!
ret
)
{
if
(
!
ret
)
{
ut_free
(
buf
);
ut_free
(
buf
);
...
@@ -609,14 +609,14 @@ os_file_pread(
...
@@ -609,14 +609,14 @@ os_file_pread(
{
{
off_t
offs
;
off_t
offs
;
ut_a
((
(((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
((
offset
&
0xFFFFFFFF
)
==
offset
);
/* If off_t is > 4 bytes in size, then we assume we can pass a
/* If off_t is > 4 bytes in size, then we assume we can pass a
64-bit address */
64-bit address */
if
(
sizeof
(
off_t
)
>
4
)
{
if
(
sizeof
(
off_t
)
>
4
)
{
offs
=
(
off_t
)
offset
+
((((
off_t
)
offset_high
)
offs
=
(
off_t
)
offset
+
(((
off_t
)
offset_high
)
<<
32
);
*
256
)
*
256
*
256
*
256
);
}
else
{
}
else
{
offs
=
(
off_t
)
offset
;
offs
=
(
off_t
)
offset
;
...
@@ -675,14 +675,14 @@ os_file_pwrite(
...
@@ -675,14 +675,14 @@ os_file_pwrite(
ssize_t
ret
;
ssize_t
ret
;
off_t
offs
;
off_t
offs
;
ut_a
((
(((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
((
offset
&
0xFFFFFFFF
)
==
offset
);
/* If off_t is > 4 bytes in size, then we assume we can pass a
/* If off_t is > 4 bytes in size, then we assume we can pass a
64-bit address */
64-bit address */
if
(
sizeof
(
off_t
)
>
4
)
{
if
(
sizeof
(
off_t
)
>
4
)
{
offs
=
(
off_t
)
offset
+
((((
off_t
)
offset_high
)
offs
=
(
off_t
)
offset
+
(((
off_t
)
offset_high
)
<<
32
);
*
256
)
*
256
*
256
*
256
);
}
else
{
}
else
{
offs
=
(
off_t
)
offset
;
offs
=
(
off_t
)
offset
;
...
@@ -772,7 +772,7 @@ os_file_read(
...
@@ -772,7 +772,7 @@ os_file_read(
ibool
retry
;
ibool
retry
;
ulint
i
;
ulint
i
;
ut_a
((
(((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
((
offset
&
0xFFFFFFFF
)
==
offset
);
os_n_file_reads
++
;
os_n_file_reads
++
;
...
@@ -856,7 +856,7 @@ os_file_write(
...
@@ -856,7 +856,7 @@ os_file_write(
ibool
retry
;
ibool
retry
;
ulint
i
;
ulint
i
;
ut_a
((
(((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
((
offset
&
0xFFFFFFFF
)
==
offset
);
os_n_file_writes
++
;
os_n_file_writes
++
;
try_again:
try_again:
...
@@ -1466,7 +1466,6 @@ os_aio(
...
@@ -1466,7 +1466,6 @@ os_aio(
ibool
retry
;
ibool
retry
;
ulint
wake_later
;
ulint
wake_later
;
ut_a
(((((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_ad
(
file
);
ut_ad
(
file
);
ut_ad
(
buf
);
ut_ad
(
buf
);
ut_ad
(
n
>
0
);
ut_ad
(
n
>
0
);
...
...
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