diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-01-09 04:04:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:37:16 -0500 |
commit | e0e96ae80d21c6b94e05fbf3af457001a005ce09 (patch) | |
tree | f5c50ceb4dd0cb464cab8ab848e46ba19ff0a976 /source4/ntvfs/posix/pvfs_read.c | |
parent | 2ed11961292c928be5166b1774e05676bbfabce8 (diff) | |
download | samba-e0e96ae80d21c6b94e05fbf3af457001a005ce09.tar.gz samba-e0e96ae80d21c6b94e05fbf3af457001a005ce09.tar.bz2 samba-e0e96ae80d21c6b94e05fbf3af457001a005ce09.zip |
r20624: added AIO read to pvfs backend
(This used to be commit d6e20d6d8c5c207e7f04b0d0523224437b209917)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_read.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_read.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c index c36d8ca2a3..91945dbb0f 100644 --- a/source4/ntvfs/posix/pvfs_read.c +++ b/source4/ntvfs/posix/pvfs_read.c @@ -22,7 +22,7 @@ #include "includes.h" #include "vfs_posix.h" -#include "librpc/gen_ndr/security.h" +#include "lib/events/events.h" /* read from a file @@ -75,6 +75,16 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs, ret = pvfs_stream_read(pvfs, f->handle, rd->readx.out.data, maxcnt, rd->readx.in.offset); } else { +#if HAVE_LINUX_AIO + /* possibly try an aio read */ + if ((req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC) && + (pvfs->flags & PVFS_FLAG_LINUX_AIO)) { + status = pvfs_aio_pread(req, rd, f, maxcnt); + if (NT_STATUS_IS_OK(status)) { + return NT_STATUS_OK; + } + } +#endif ret = pread(f->handle->fd, rd->readx.out.data, maxcnt, |