vlserver: --enable-ubik-read-while-write configure option

Commit a0f416e350 unconditionally turned
on the new ubik_BeginTransReadAnyWrite functionality for the vlserver,
which allows us to read data from ubik during a conflicting ubik write
lock.

This feature is not ready for production use. Make it a build time
option, marked as experimental, until more testing can be done.

Change-Id: If64702e7a7ed2340066df5faf82ce8b0875fc610
Reviewed-on: https://gerrit.openafs.org/12240
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
Michael Meffie 2016-04-04 12:35:11 -04:00 committed by Benjamin Kaduk
parent cd52915b3e
commit c5b52c8159
3 changed files with 15 additions and 2 deletions

View File

@ -111,6 +111,11 @@ AC_ARG_ENABLE([pthreaded-ubik],
enabled)])],
[],
[enable_pthreaded_ubik="yes"])
AC_ARG_ENABLE([ubik-read-while-write],
[AS_HELP_STRING([--enable-ubik-read-while-write],
[enable vlserver read from db cache during write locks (EXPERIMENTAL)])],
[],
[enable_ubik_read_while_write="no"])
dnl Kernel module build options.
AC_ARG_WITH([linux-kernel-headers],
@ -1409,6 +1414,10 @@ else
fi
AC_SUBST(USE_UNIX_SOCKETS)
if test "$enable_ubik_read_while_write" = "yes"; then
AC_DEFINE(UBIK_READ_WHILE_WRITE, 1, [define if you want to enable ubik read while write])
fi
if test "$enable_namei_fileserver" = "yes"; then
AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
VFSCK=""

View File

@ -69,6 +69,7 @@ options:
ptserver supergroups : ${enable_supergroups}
pthreaded ubik : ${enable_pthreaded_ubik}
install kauth : ${INSTALL_KAUTH}
ubik read while write : ${enable_ubik_read_while_write}
build:
scout/afsmonitor : ${summary_build_scout}
pam : ${HAVE_PAM}

View File

@ -206,8 +206,11 @@ Init_VLdbase(struct vl_ctx *ctx,
code = ubik_BeginTrans(VL_dbase, UBIK_WRITETRANS, &ctx->trans);
wl = 1;
} else if (locktype == LOCKREAD) {
code =
ubik_BeginTransReadAnyWrite(VL_dbase, UBIK_READTRANS, &ctx->trans);
#ifdef UBIK_READ_WHILE_WRITE
code = ubik_BeginTransReadAnyWrite(VL_dbase, UBIK_READTRANS, &ctx->trans);
#else
code = ubik_BeginTransReadAny(VL_dbase, UBIK_READTRANS, &ctx->trans);
#endif
wl = 0;
} else {
code = ubik_BeginTrans(VL_dbase, UBIK_WRITETRANS, &ctx->trans);