]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Windows: define AFS_IHANDLE_PIO_ENV for ihandle pio
authorMichael Meffie <mmeffie@sinenomine.net>
Mon, 25 Apr 2016 15:19:10 +0000 (11:19 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 8 Jun 2018 12:39:51 +0000 (08:39 -0400)
commit37daf101007e92038560913b56ac0330fce3d230
tree244ae0ac0dab5df8e6837382d13158b57840e6a4
parentba18ab004566b82b52882326727fa33a297bd05c
Windows: define AFS_IHANDLE_PIO_ENV for ihandle pio

Support for positional i/o in the ihandle package was added to the
windows platform in commit 50b6a116a1c412d0e6d7442d13d6e92c9dbb35ee
using native windows functions.  That commit also defined HAVE_PIO in
the windows version of the afsconfig.h file. Unfortunately, that
definition of HAVE_PIO is not limited to the ihandle package.

Remove the project-wide HAVE_PIO definition from the windows afsconfig.h
file and define the new AFS_IHANDLE_PIO_ENV symbol when position i/o
support is available in the ihandle package.

Build the fallback ih_pread and ih_pwrite functions (which use lseek)
only when positional i/o is not available in the ihandle package for the
current platform.

Use AFS_IHANDLE_PIO_ENV instead of HAVE_PIO in ih_open() to determine
when it is is safe to share ihandles among threads.

Reviewed-on: https://gerrit.openafs.org/12270
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 759f29cfdfabed4dc5c1b96a0b2b79a3f83c08e3)

Change-Id: Ic64f9e65b10fbe6f7650eff852d5a7e20762ef10
Reviewed-on: https://gerrit.openafs.org/13148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/config/afsconfig-windows.h
src/vol/ihandle.c
src/vol/ihandle.h