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
d4342702
Commit
d4342702
authored
Dec 30, 2016
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead references to NO_FALLOCATE.
parent
cbf80b0d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
66 deletions
+38
-66
storage/innobase/fil/fil0fil.cc
storage/innobase/fil/fil0fil.cc
+18
-31
storage/innobase/fsp/fsp0space.cc
storage/innobase/fsp/fsp0space.cc
+5
-11
storage/innobase/fsp/fsp0sysspace.cc
storage/innobase/fsp/fsp0sysspace.cc
+8
-12
storage/innobase/include/fil0fil.h
storage/innobase/include/fil0fil.h
+2
-2
storage/innobase/srv/srv0start.cc
storage/innobase/srv/srv0start.cc
+5
-10
No files found.
storage/innobase/fil/fil0fil.cc
View file @
d4342702
...
...
@@ -484,7 +484,7 @@ fil_space_is_flushed(
return
(
true
);
}
#if
!defined(NO_FALLOCATE) && defined(UNIV_LINUX)
#if
def UNIV_LINUX
#include <sys/ioctl.h>
/** FusionIO atomic write control info */
...
...
@@ -511,7 +511,7 @@ fil_fusionio_enable_atomic_write(os_file_t file)
return
(
false
);
}
#endif
/*
!NO_FALLOCATE &&
UNIV_LINUX */
#endif
/* UNIV_LINUX */
/** Append a file to the chain of files of a space.
@param[in] name file name of a file that is not open
...
...
@@ -3520,11 +3520,10 @@ fil_ibd_create(
return
(
DB_ERROR
);
}
bool
atomic_write
;
#if !defined(NO_FALLOCATE) && defined(UNIV_LINUX)
if
(
fil_fusionio_enable_atomic_write
(
file
))
{
#ifdef UNIV_LINUX
const
bool
atomic_write
=
fil_fusionio_enable_atomic_write
(
file
);
if
(
atomic_write
)
{
/* This is required by FusionIO HW/Firmware */
int
ret
=
posix_fallocate
(
file
,
0
,
size
*
UNIV_PAGE_SIZE
);
...
...
@@ -3547,21 +3546,14 @@ fil_ibd_create(
}
else
{
success
=
true
;
}
atomic_write
=
true
;
}
else
{
atomic_write
=
false
;
}
else
#else
const
bool
atomic_write
=
false
;
#endif
/* UNIV_LINUX */
{
success
=
os_file_set_size
(
path
,
file
,
size
*
UNIV_PAGE_SIZE
,
srv_read_only_mode
);
}
#else
atomic_write
=
false
;
success
=
os_file_set_size
(
path
,
file
,
size
*
UNIV_PAGE_SIZE
,
srv_read_only_mode
);
#endif
/* !NO_FALLOCATE && UNIV_LINUX */
if
(
!
success
)
{
os_file_close
(
file
);
...
...
@@ -3913,18 +3905,13 @@ fil_ibd_open(
df_dict
.
close
();
}
bool
atomic_write
;
#if !defined(NO_FALLOCATE) && defined(UNIV_LINUX)
if
(
!
srv_use_doublewrite_buf
&&
df_default
.
is_open
())
{
atomic_write
=
fil_fusionio_enable_atomic_write
(
df_default
.
handle
());
}
else
{
atomic_write
=
false
;
}
#ifdef UNIV_LINUX
const
bool
atomic_write
=
!
srv_use_doublewrite_buf
&&
df_default
.
is_open
()
&&
fil_fusionio_enable_atomic_write
(
df_default
.
handle
());
#else
atomic_write
=
false
;
#endif
/*
!NO_FALLOCATE &&
UNIV_LINUX */
const
bool
atomic_write
=
false
;
#endif
/* UNIV_LINUX */
/* We have now checked all possible tablespace locations and
have a count of how many unique files we found. If things are
...
...
@@ -5052,7 +5039,7 @@ fil_space_extend(
ut_ad
(
len
>
0
);
const
char
*
name
=
node
->
name
==
NULL
?
space
->
name
:
node
->
name
;
#if
!defined(NO_FALLOCATE) && defined(UNIV_LINUX)
#if
def UNIV_LINUX
/* This is required by FusionIO HW/Firmware */
int
ret
=
posix_fallocate
(
node
->
handle
,
node_start
,
len
);
...
...
@@ -5077,7 +5064,7 @@ fil_space_extend(
err
=
DB_IO_ERROR
;
}
#endif
/* NO_FALLOCATE || !UNIV_LINUX */
#endif
if
(
!
node
->
atomic_write
||
err
==
DB_IO_ERROR
)
{
...
...
storage/innobase/fsp/fsp0space.cc
View file @
d4342702
...
...
@@ -122,18 +122,12 @@ Tablespace::open_or_create(bool is_temp)
break
;
}
bool
atomic_write
;
#if !defined(NO_FALLOCATE) && defined(UNIV_LINUX)
if
(
!
srv_use_doublewrite_buf
)
{
atomic_write
=
fil_fusionio_enable_atomic_write
(
it
->
m_handle
);
}
else
{
atomic_write
=
false
;
}
#ifdef UNIV_LINUX
const
bool
atomic_write
=
fil_fusionio_enable_atomic_write
(
it
->
m_handle
);
#else
atomic_write
=
false
;
#endif
/* !NO_FALLOCATE && UNIV_LINUX */
const
bool
atomic_write
=
false
;
#endif
/* We can close the handle now and open the tablespace
the proper way. */
...
...
storage/innobase/fsp/fsp0sysspace.cc
View file @
d4342702
...
...
@@ -909,28 +909,24 @@ SysTablespace::open_or_create(
return
(
err
);
}
#if
!defined(NO_FALLOCATE) && defined(UNIV_LINUX)
#if
def UNIV_LINUX
/* Note: This should really be per node and not per
tablespace because a tablespace can contain multiple
files (nodes). The implication is that all files of
the tablespace should be on the same medium. */
if
(
fil_fusionio_enable_atomic_write
(
it
->
m_handle
))
{
it
->
m_atomic_write
=
fil_fusionio_enable_atomic_write
(
it
->
m_handle
);
if
(
srv_use_doublewrite_buf
)
{
ib
::
info
()
<<
"FusionIO atomic IO enabled,"
" disabling the double write buffer"
;
if
(
it
->
m_atomic_write
&&
srv_use_doublewrite_buf
)
{
ib
::
info
()
<<
"FusionIO atomic IO enabled,"
" disabling the double write buffer"
;
srv_use_doublewrite_buf
=
false
;
}
it
->
m_atomic_write
=
true
;
}
else
{
it
->
m_atomic_write
=
false
;
srv_use_doublewrite_buf
=
false
;
}
#else
it
->
m_atomic_write
=
false
;
#endif
/* !NO_FALLOCATE && UNIV_LINUX*/
#endif
}
if
(
!
create_new_db
&&
flush_lsn
)
{
...
...
storage/innobase/include/fil0fil.h
View file @
d4342702
...
...
@@ -1799,14 +1799,14 @@ fil_names_clear(
lsn_t
lsn
,
bool
do_write
);
#if
!defined(NO_FALLOCATE) && defined(UNIV_LINUX)
#if
def UNIV_LINUX
/**
Try and enable FusionIO atomic writes.
@param[in] file OS file handle
@return true if successful */
bool
fil_fusionio_enable_atomic_write
(
os_file_t
file
);
#endif
/*
!NO_FALLOCATE &&
UNIV_LINUX */
#endif
/* UNIV_LINUX */
/** Note that the file system where the file resides doesn't support PUNCH HOLE
@param[in,out] node Node to set */
...
...
storage/innobase/srv/srv0start.cc
View file @
d4342702
...
...
@@ -681,17 +681,12 @@ srv_undo_tablespace_open(
os_offset_t
size
;
fil_space_t
*
space
;
bool
atomic_write
;
#if !defined(NO_FALLOCATE) && defined(UNIV_LINUX)
if
(
!
srv_use_doublewrite_buf
)
{
atomic_write
=
fil_fusionio_enable_atomic_write
(
fh
);
}
else
{
atomic_write
=
false
;
}
#ifdef UNIV_LINUX
const
bool
atomic_write
=
!
srv_use_doublewrite_buf
&&
fil_fusionio_enable_atomic_write
(
fh
);
#else
atomic_write
=
false
;
#endif
/* !NO_FALLOCATE && UNIV_LINUX */
const
bool
atomic_write
=
false
;
#endif
size
=
os_file_get_size
(
fh
);
ut_a
(
size
!=
(
os_offset_t
)
-
1
);
...
...
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