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
38dfc862
Commit
38dfc862
authored
Aug 27, 2007
by
pekka@sama.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#30646 fsync on close only if file is open for write
parent
0532a625
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+8
-1
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
+2
-0
No files found.
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
38dfc862
...
...
@@ -99,6 +99,7 @@ AsyncFile::AsyncFile(SimulatedBlock& fs) :
{
m_page_ptr
.
setNull
();
m_current_request
=
m_last_request
=
0
;
m_open_flags
=
0
;
}
void
...
...
@@ -328,6 +329,7 @@ void AsyncFile::openReq(Request* request)
{
m_auto_sync_freq
=
0
;
m_write_wo_sync
=
0
;
m_open_flags
=
request
->
par
.
open
.
flags
;
// for open.flags, see signal FSOPENREQ
#ifdef NDB_WIN32
...
...
@@ -954,7 +956,12 @@ AsyncFile::writevReq( Request * request)
void
AsyncFile
::
closeReq
(
Request
*
request
)
{
syncReq
(
request
);
if
(
m_open_flags
&
(
FsOpenReq
::
OM_WRITEONLY
|
FsOpenReq
::
OM_READWRITE
|
FsOpenReq
::
OM_APPEND
))
{
syncReq
(
request
);
}
#ifdef NDB_WIN32
if
(
!
CloseHandle
(
hFile
))
{
request
->
error
=
GetLastError
();
...
...
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
View file @
38dfc862
...
...
@@ -224,6 +224,8 @@ private:
#else
int
theFd
;
#endif
Uint32
m_open_flags
;
// OM_ flags from request to open file
MemoryChannel
<
Request
>
*
theReportTo
;
MemoryChannel
<
Request
>*
theMemoryChannelPtr
;
...
...
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