From: Andrew Deason Date: Thu, 10 Jun 2010 16:51:57 +0000 (-0500) Subject: Do not set inUse for non-fileserver non-DAFS X-Git-Tag: openafs-devel-1_5_75~158 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=dcd3e1fa111d3b6dfeb5965a487285119619f362;p=packages%2Fo%2Fopenafs.git Do not set inUse for non-fileserver non-DAFS Setting inUse in a volume header to anything besides 1 is a DAFS-specific change. For non-DAFS, non-fileserver programs do not touch inUse. Since inUse is not cleared for non-fileserver non-DAFS, make sure not to set it for non-fileserver non-DAFS. Change-Id: I4d50299d4dc4fd8757906ba493d182b386dd9b1b Reviewed-on: http://gerrit.openafs.org/2122 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/vol/volume.c b/src/vol/volume.c index e19487829..b3e29d78d 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -2388,12 +2388,12 @@ VAttachVolumeByName_r(Error * ec, char *partition, char *name, int mode) vp = attach2(ec, volumeId, path, partp, vp, isbusy, mode); if (VCanUseFSSYNC() && vp) { +#ifdef AFS_DEMAND_ATTACH_FS if ((mode == V_VOLUPD) || (VolumeWriteable(vp) && (mode == V_CLONE))) { /* mark volume header as in use so that volser crashes lead to a * salvage attempt */ VUpdateVolume_r(ec, vp, 0); } -#ifdef AFS_DEMAND_ATTACH_FS /* for dafs, we should tell the fileserver, except for V_PEEK * where we know it is not necessary */ if (mode == V_PEEK) { @@ -3279,8 +3279,10 @@ attach2(Error * ec, VolId volumeId, char *path, struct DiskPartition64 *partp, V_offlineMessage(vp)[0] = '\0'; } } else { +#ifdef AFS_DEMAND_ATTACH_FS if ((mode != V_PEEK) && (mode != V_SECRETLY)) V_inUse(vp) = programType; +#endif /* AFS_DEMAND_ATTACH_FS */ V_checkoutMode(vp) = mode; }