Refactor handling of input files
commit98c1dbcd75bd2b7452771ff051b6bd564db64775
authorOlly Betts <olly@survex.com>
Fri, 2 Nov 2018 03:48:04 +0000 (2 16:48 +1300)
committerOlly Betts <olly@survex.com>
Fri, 2 Nov 2018 04:32:32 +0000 (2 17:32 +1300)
tree3b66a4fefc0c6e2224bc534995e69e3ad23e73f0
parent44d9fe89f07e640cff73caacde9ae42d9cbeebe2
Refactor handling of input files

We now try much harder to avoid opening input file more than once by
reusing the file descriptor in more cases.

We no longer call posix_fadvise() with POSIX_FADV_NOREUSE under Linux,
since it's still not implemented there.

We now only call posix_fadvise() with POSIX_FADV_DONTNEED under Linux,
and we do it right before we close the file descriptor.

(cherry picked from commit 67717d56f346af445a7df3781438e11a42ab504e)
xapian-applications/omega/diritor.cc
xapian-applications/omega/diritor.h
xapian-applications/omega/index_file.cc
xapian-applications/omega/loadfile.cc
xapian-applications/omega/loadfile.h
xapian-applications/omega/md5wrap.cc
xapian-applications/omega/md5wrap.h