From: Derrick Brashear Date: Wed, 16 Jul 2008 05:16:25 +0000 (+0000) Subject: STABLE14-volser-reclone-bring-online-before-giveback-20080716 X-Git-Tag: openafs-stable-1_4_8pre1~39 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=67af5e52686286a591d503e1de91d3d6ef9672e7;p=packages%2Fo%2Fopenafs.git STABLE14-volser-reclone-bring-online-before-giveback-20080716 LICENSE IPL10 FIXES 107258 when giving back a volume after reclone, make it inService to avoid a race between callers and the SetFlags RPC (cherry picked from commit b4ce530d365e97342a92f4a8d59de12b0570c699) --- diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 37c0972b3..918d63ae3 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -821,6 +821,11 @@ VolReClone(struct rx_call *acid, afs_int32 atrans, afs_int32 cloneId) LogError(error); goto fail; } + /* VUpdateVolume succeeded. Mark it in service so there's no window + * between FSYNC_VOL_ON and VolSetFlags where it's offline with no + * specialStatus; this is a reclone and this volume started online + */ + V_inService(clonevp) = 1; VDetachVolume(&error, clonevp); /* allow file server to get it's hands on it */ clonevp = NULL; VUpdateVolume(&error, originalvp);