From 406c474b85e237c5d4703cc14ab88937251f2215 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 16 Jul 2008 05:15:57 +0000 Subject: [PATCH] DEVEL15-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) --- src/volser/volprocs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 12bf69332..279af06d0 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -843,6 +843,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); -- 2.39.5