From dcd3e1fa111d3b6dfeb5965a487285119619f362 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 10 Jun 2010 11:51:57 -0500 Subject: [PATCH] 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 --- src/vol/volume.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vol/volume.c b/src/vol/volume.c index e194878..b3e29d7 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; } -- 1.9.4