Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a87bafc5
Commit
a87bafc5
authored
Aug 20, 2021
by
Luke Deller
Committed by
Alexandre Julliard
Aug 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Implement file access hints using posix_fadvise.
Signed-off-by:
Luke Deller
<
luke@deller.id.au
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7d54682f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
0 deletions
+18
-0
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
config.h.in
include/config.h.in
+3
-0
fd.c
server/fd.c
+13
-0
No files found.
configure
View file @
a87bafc5
...
...
@@ -18010,6 +18010,7 @@ for ac_func in \
pipe2
\
poll
\
port_create
\
posix_fadvise
\
prctl
\
pread
\
proc_pidinfo
\
...
...
configure.ac
View file @
a87bafc5
...
...
@@ -2186,6 +2186,7 @@ AC_CHECK_FUNCS(\
pipe2 \
poll \
port_create \
posix_fadvise \
prctl \
pread \
proc_pidinfo \
...
...
include/config.h.in
View file @
a87bafc5
...
...
@@ -513,6 +513,9 @@
/* Define to 1 if you have the <port.h> header file. */
#undef HAVE_PORT_H
/* Define to 1 if you have the `posix_fadvise' function. */
#undef HAVE_POSIX_FADVISE
/* Define to 1 if you have the `prctl' function. */
#undef HAVE_PRCTL
...
...
server/fd.c
View file @
a87bafc5
...
...
@@ -2026,6 +2026,19 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
free
(
closed_fd
);
fd
->
cacheable
=
1
;
}
#ifdef HAVE_POSIX_FADVISE
switch
(
options
&
(
FILE_SEQUENTIAL_ONLY
|
FILE_RANDOM_ACCESS
))
{
case
FILE_SEQUENTIAL_ONLY
:
posix_fadvise
(
fd
->
unix_fd
,
0
,
0
,
POSIX_FADV_SEQUENTIAL
);
break
;
case
FILE_RANDOM_ACCESS
:
posix_fadvise
(
fd
->
unix_fd
,
0
,
0
,
POSIX_FADV_RANDOM
);
break
;
}
#endif
if
(
root_fd
!=
-
1
)
fchdir
(
server_dir_fd
);
/* go back to the server dir */
return
fd
;
...
...
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