Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ SQUID_DEFINE_BOOL(USE_DISKIO,$enable_disk_io,[DiskIO modules are expected to be
dnl Some autoconf.h defines we might enable later...
AC_ARG_WITH(pthreads,AS_HELP_STRING([--without-pthreads],[Disable POSIX Threads]))
AC_ARG_WITH(aio, AS_HELP_STRING([--without-aio],[Do not use POSIX AIO. Default: auto-detect]))
AC_ARG_WITH(oio, AS_HELP_STRING([--without-oio],[Do not use Windows Overlapped I/O. Default: auto-detect]))
ENABLE_WIN32_AIOPS=0
squid_opt_use_aio=
squid_opt_use_diskthreads=
Expand All @@ -503,6 +504,7 @@ AH_TEMPLATE(HAVE_DISKIO_MODULE_DISKDAEMON, [Whether DiskDaemon Disk I/O module i
AH_TEMPLATE(HAVE_DISKIO_MODULE_DISKTHREADS, [Whether DiskThreads Disk I/O module is built])
AH_TEMPLATE(HAVE_DISKIO_MODULE_IPCIO, [Whether IpcIo Disk I/O module is built])
AH_TEMPLATE(HAVE_DISKIO_MODULE_MMAPPED, [Whether Mmapped Disk I/O module is built])
AH_TEMPLATE(HAVE_DISKIO_MODULE_OIO, [Whether Windows OIO Disk I/O module is built])
for module in $squid_disk_module_candidates none; do
# maybe not needed
AS_IF([test "x$module" = "xnone"],[continue])
Expand All @@ -523,15 +525,8 @@ for module in $squid_disk_module_candidates none; do
AC_MSG_NOTICE([Native POSIX AIO support detected.])
squid_opt_use_aio="yes"
],[
dnl Windows does things differently. We provide wrappers.
dnl TODO: Windows really needs its own DiskIO module or its Overlaped IO
AS_IF([test "$squid_host_os" = "mingw"],[
squid_opt_use_aio="yes"
AC_MSG_NOTICE([Windows being built. Maybe-enable POSIX AIO.])
],[
squid_opt_use_aio="no"
AC_MSG_NOTICE([Native POSIX AIO support not detected. AIO automatically disabled.])
])
squid_opt_use_aio="no"
AC_MSG_NOTICE([Native POSIX AIO support not detected. AIO automatically disabled.])
])
],[
AC_MSG_NOTICE([POSIX AIO support manually disabled.])
Expand All @@ -541,12 +536,7 @@ for module in $squid_disk_module_candidates none; do
AS_IF([test "x$squid_opt_use_aio" = "xyes"],[
DISK_MODULES="$DISK_MODULES AIO"
AC_DEFINE([HAVE_DISKIO_MODULE_AIO],1,[POSIX AIO Disk I/O module is built])
AS_IF([test "$squid_host_os" = "mingw"],[
ENABLE_WIN32_AIO=1
AC_MSG_NOTICE([Replacing AIO DiskIO module with: Windows overlapped I/O support])
],[
AC_MSG_NOTICE([Enabling AIO DiskIO module])
])
AC_MSG_NOTICE([Enabling AIO DiskIO module])
],[
AC_MSG_NOTICE([AIO DiskIO Module disabled. Missing POSIX AIO support.])
squid_disk_module_candidates_AIO=no
Expand Down Expand Up @@ -675,6 +665,24 @@ for module in $squid_disk_module_candidates none; do
])
],

[OIO],[
dnl Check for Windows Overlapped I/O availability
AS_IF([test "x$with_oio" = "xno"],[
dnl nothing to do
],[test "$squid_host_os" != "mingw" -a "x$with_oio" = "xyes"],[
AC_MSG_ERROR([DiskIO module OIO is only available on MinGW])
],[test "$squid_host_os" != "mingw"],[
with_oio="no"
])
AS_IF([test "x$with_oio" != "xno"],[
DISK_MODULES="$DISK_MODULES OIO"
AC_DEFINE([HAVE_DISKIO_MODULE_OIO],1,[Windows OIO Disk I/O module is built])
],[
AC_MSG_NOTICE([DiskIO Module OIO disabled. Missing Windows Overlapped I/O support.])
squid_disk_module_candidates_OIO=no
])
],

[
AC_MSG_NOTICE([Enabling $module DiskIO module])
DISK_LIBS="$DISK_LIBS lib${module}.la"
Expand All @@ -686,14 +694,14 @@ AC_SUBST(DISK_MODULES)
AC_SUBST(DISK_LIBS)
AM_CONDITIONAL(ENABLE_DISKIO_AIO, test "x$squid_disk_module_candidates_AIO" = "xyes")
AC_SUBST(AIOLIB)
AM_CONDITIONAL(ENABLE_WIN32_AIO, test "x$squid_disk_module_candidates_AIO" = "xyes" -a "x$ENABLE_WIN32_AIO" = "x1")
AM_CONDITIONAL(ENABLE_DISKIO_BLOCKING, test "x$squid_disk_module_candidates_Blocking" = "xyes")
AM_CONDITIONAL(ENABLE_DISKIO_DISKDAEMON, test "x$squid_disk_module_candidates_DiskDaemon" = "xyes")
AM_CONDITIONAL(ENABLE_DISKIO_DISKTHREADS, test "x$squid_disk_module_candidates_DiskThreads" = "xyes")
AC_SUBST(LIBPTHREADS)
AM_CONDITIONAL(ENABLE_WIN32_AIOPS, test "x$squid_disk_module_candidates_DiskThreads" = "xyes" -a "x$ENABLE_WIN32_AIOPS" = "x1")
AM_CONDITIONAL(ENABLE_DISKIO_IPCIO, test "x$squid_disk_module_candidates_IpcIo" = "xyes")
AM_CONDITIONAL(ENABLE_DISKIO_MMAPPED, test "x$squid_disk_module_candidates_Mmapped" = "xyes")
AM_CONDITIONAL(ENABLE_DISKIO_OIO, test "x$squid_disk_module_candidates_OIO" = "xyes")

dnl Check what Storage formats are wanted.
dnl This version will error out with a message saying why if a required DiskIO is missing.
Expand Down Expand Up @@ -2570,6 +2578,7 @@ AC_CONFIG_FILES([
src/DiskIO/DiskThreads/Makefile
src/DiskIO/IpcIo/Makefile
src/DiskIO/Mmapped/Makefile
src/DiskIO/OIO/Makefile
src/error/Makefile
src/eui/Makefile
src/format/Makefile
Expand Down
1 change: 0 additions & 1 deletion doc/debug-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ section 79 Squid-side Disk I/O functions.
section 79 Storage Manager UFS Interface
section 80 WCCP Support
section 81 Store HEAP Removal Policies
section 81 aio_xxx() POSIX emulation on Windows
section 82 External ACL
section 82 External ACL Helpers
section 83 SSL accelerator support
Expand Down
9 changes: 8 additions & 1 deletion doc/release-notes/release-8.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ This section gives an account of those changes in three categories:
<sect1>New options<label id="newoptions">
<p>
<descrip>
<p>No new options in this version.
<tag>--without-oio</tag>
<p>Controls automatic detection of Windows Overlapped I/O.

</descrip>

Expand All @@ -159,6 +160,12 @@ This section gives an account of those changes in three categories:
<p>Removed <em>SMB_LM</em> helper, in favour of the <em>ntlm_auth</em>
alternative offered by the Samba project.

<tag>--enable-disk-io</tag>
<p>New module <em>OIO</em> to enable Windows Overlapped I/O support.
Requires MinGW build environment.
<p>The <em>AIO</em> module for POSIX Asynchronous I/O support
no longer auto-replaces with Windows Overlapped I/O.

<tag>--enable-external-acl-helpers=</tag>
<p>Removed <em>LM_Group</em> helper. The LM protocol is
insecure and no longer supported on the market since 2008.
Expand Down
11 changes: 0 additions & 11 deletions src/DiskIO/AIO/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,3 @@ libAIO_la_SOURCES = \
AIODiskIOStrategy.cc \
AIODiskIOStrategy.h \
async_io.h

if ENABLE_WIN32_AIO
libAIO_la_SOURCES += \
aio_win32.cc \
aio_win32.h
else
EXTRA_DIST = \
aio_win32.cc \
aio_win32.h
endif

Loading
Loading