Add direct i/o for Solaris, via the directio() syscall.
This commit is contained in:
parent
64a5bab856
commit
48801a41a7
|
@ -217,10 +217,15 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags )
|
|||
cFile::Rewind();
|
||||
|
||||
#ifdef F_NOCACHE
|
||||
if (flags & OPEN_DIRECT)
|
||||
if ((flags & OPEN_DIRECT) && (flags & OPEN_SCANNING))
|
||||
fcntl(fh, F_NOCACHE, 1);
|
||||
#endif
|
||||
|
||||
#ifdef __sun
|
||||
if ((flags & OPEN_DIRECT) && (flags & OPEN_SCANNING))
|
||||
directio(fh, DIRECTIO_ON);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_POSIX_FADVISE
|
||||
if (flags & OPEN_SCANNING) {
|
||||
posix_fadvise(fh,0,0, POSIX_FADV_SEQUENTIAL);
|
||||
|
|
Loading…
Reference in New Issue