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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7f38949c
Commit
7f38949c
authored
Oct 30, 2001
by
heikki@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os0file.c Replace some / 256 by >> operations
parent
dc900914
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 @
7f38949c
...
...
@@ -459,7 +459,7 @@ os_file_get_size(
if
(
sizeof
(
off_t
)
>
4
)
{
*
size
=
(
ulint
)(
offs
&
0xFFFFFFFF
);
*
size_high
=
(
ulint
)(
(
offs
/
(
256
*
256
))
/
(
256
*
256
)
);
*
size_high
=
(
ulint
)(
offs
>>
32
);
}
else
{
*
size
=
(
ulint
)
offs
;
*
size_high
=
0
;
...
...
@@ -491,7 +491,7 @@ os_file_set_size(
byte
*
buf
;
ulint
i
;
ut_a
(
((((
size
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
(
size
==
(
size
&
0xFFFFFFFF
)
);
try_again:
/* We use a very big 8 MB buffer in writing because Linux may be
...
...
@@ -505,8 +505,8 @@ os_file_set_size(
}
offset
=
0
;
low
=
(
ib_longlong
)
size
+
(((
ib_longlong
)
size_high
)
*
256
)
*
256
*
256
*
256
;
low
=
(
ib_longlong
)
size
+
(((
ib_longlong
)
size_high
)
<<
32
);
while
(
offset
<
low
)
{
if
(
low
-
offset
<
UNIV_PAGE_SIZE
*
512
)
{
n_bytes
=
(
ulint
)(
low
-
offset
);
...
...
@@ -516,7 +516,7 @@ os_file_set_size(
ret
=
os_file_write
(
name
,
file
,
buf
,
(
ulint
)(
offset
&
0xFFFFFFFF
),
(
ulint
)((((
offset
/
256
)
/
256
)
/
256
)
/
256
),
(
ulint
)(
offset
>>
32
),
n_bytes
);
if
(
!
ret
)
{
ut_free
(
buf
);
...
...
@@ -609,14 +609,14 @@ os_file_pread(
{
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
64-bit address */
if
(
sizeof
(
off_t
)
>
4
)
{
offs
=
(
off_t
)
offset
+
((((
off_t
)
offset_high
)
*
256
)
*
256
*
256
*
256
);
offs
=
(
off_t
)
offset
+
(((
off_t
)
offset_high
)
<<
32
);
}
else
{
offs
=
(
off_t
)
offset
;
...
...
@@ -675,14 +675,14 @@ os_file_pwrite(
ssize_t
ret
;
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
64-bit address */
if
(
sizeof
(
off_t
)
>
4
)
{
offs
=
(
off_t
)
offset
+
((((
off_t
)
offset_high
)
*
256
)
*
256
*
256
*
256
);
offs
=
(
off_t
)
offset
+
(((
off_t
)
offset_high
)
<<
32
);
}
else
{
offs
=
(
off_t
)
offset
;
...
...
@@ -772,7 +772,7 @@ os_file_read(
ibool
retry
;
ulint
i
;
ut_a
((
(((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
((
offset
&
0xFFFFFFFF
)
==
offset
);
os_n_file_reads
++
;
...
...
@@ -856,7 +856,7 @@ os_file_write(
ibool
retry
;
ulint
i
;
ut_a
((
(((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_a
((
offset
&
0xFFFFFFFF
)
==
offset
);
os_n_file_writes
++
;
try_again:
...
...
@@ -1466,7 +1466,6 @@ os_aio(
ibool
retry
;
ulint
wake_later
;
ut_a
(((((
offset
/
256
)
/
256
)
/
256
)
/
256
)
==
0
);
ut_ad
(
file
);
ut_ad
(
buf
);
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