From 3166cba243e6e69f52fedfe81ea4d407eb6553e1 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 6 Feb 2014 14:27:12 -0600 Subject: [PATCH] ihandle: Make _ONCLOSE the sync behavior default The _DELAYED behavior has had serious problems in the past, so change the default to be _ONCLOSE instead. This is a 1.6-only change. On master, the _DELAYED option does not exist at all, and the _ONCLOSE behavior was made the default when this option was introduced in master, in commit eb5190eb4a7cd95166866a89e0a8f3a69bbc6e8f. Change-Id: I01a50e1d829c141c38fbbbaba2c6d2d5a371b130 Reviewed-on: http://gerrit.openafs.org/10809 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand --- doc/man-pages/pod8/fragments/fileserver-options.pod | 13 +++++++------ src/vol/ihandle.c | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/man-pages/pod8/fragments/fileserver-options.pod b/doc/man-pages/pod8/fragments/fileserver-options.pod index 89cad7da0..813e825cd 100644 --- a/doc/man-pages/pod8/fragments/fileserver-options.pod +++ b/doc/man-pages/pod8/fragments/fileserver-options.pod @@ -316,7 +316,7 @@ or may not be acceptable. This option dictates specifically what the fileserver does when it wants to perform a "sync". There are several options; pass one of these as the argument to -sync. The -default is C. +default is C. =over 4 @@ -356,13 +356,12 @@ the same behavior as with the C option. This option is currently not recommended, since in the past the code implementing this option has caused rare data corruption during normal -operation. However, it is currently the default option to allow consistent -behavior from previous OpenAFS releases. +operation. This was the only behavior allowed in OpenAFS releases starting from 1.4.5 up -to and including 1.6.2. It is the default starting in OpenAFS 1.6.3. This -option will be removed in a future version of OpenAFS, and the default behavior -will likely change to the C behavior. +to and including 1.6.2. It was the default starting from OpenAFS 1.6.3 up to +and including OpenAFS 1.6.6. This option will be removed in a future version of +OpenAFS. =item onclose @@ -378,6 +377,8 @@ Effectively this option is the same as C while a volume is attached and actively being used, but if a volume is detached, there is an additional guarantee for the data's consistency. +This option is the default starting with OpenAFS 1.6.7. + =item never This causes all syncs to never do anything. This is the fastest option, with diff --git a/src/vol/ihandle.c b/src/vol/ihandle.c index 01426e050..f1e0ae4fc 100644 --- a/src/vol/ihandle.c +++ b/src/vol/ihandle.c @@ -115,7 +115,7 @@ void ih_PkgDefaults(void) * is called */ vol_io_params.fd_max_cachesize = FD_MAX_CACHESIZE; - vol_io_params.sync_behavior = IH_SYNC_DELAYED; + vol_io_params.sync_behavior = IH_SYNC_ONCLOSE; } int -- 2.39.5