From 85893ac3df0c2cb48776cf1203ec200507b6ce7d Mon Sep 17 00:00:00 2001 From: Marcio Barbosa Date: Mon, 31 Aug 2020 19:56:56 +0000 Subject: [PATCH] Revert "vos: take RO volume offline during convertROtoRW" This reverts commit 32d35db64061e4102281c235cf693341f9de9271. While that commit did fix the mentioned problem, depending on "vos" to set the volume to be converted as "out of service" is not ideal. Instead, this volume should be set as offline by the SAFSVolConvertROtoRWvolume RPC, executed on the volume server. The proper fix for this problem will be introduced by another commit. Change-Id: I0ce5ba793fe3c07e535225191b74eeb402ab5bfd Reviewed-on: https://gerrit.openafs.org/14339 Reviewed-by: Cheyenne Wills Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- src/volser/vsprocs.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 97ce6a0..ffbabdd 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -1342,14 +1342,6 @@ UV_ConvertRO(afs_uint32 server, afs_uint32 partition, afs_uint32 volid, } } - /* volume must be inaccessible during this process */ - code = UV_SetVolume(server, partition, volid, ITOffline, VTOutOfService, 0); - if (code != 0) { - fprintf(STDERR, "Taking RO volume %u offline failed with code %d.\n", - volid, code); - goto error_exit; - } - aconn = UV_Bind(server, AFSCONF_VOLUMEPORT); code = AFSVolConvertROtoRWvolume(aconn, partition, volid); if (code) { @@ -1359,18 +1351,6 @@ UV_ConvertRO(afs_uint32 server, afs_uint32 partition, afs_uint32 volid, PrintError("convertROtoRW ", code); goto error_exit; } - - /* - * Since the inService flag is copied from the RO volume, the new RW copy is - * offline. Change the status of this RW volume to online. - */ - code = UV_SetVolume(server, partition, entry->volumeId[RWVOL], ITOffline, - 0 /* online */, 0); - if (code != 0) { - fprintf(STDERR, "Warning: Attempt to set RW volume %u as online failed " - "with code %d.\n", entry->volumeId[RWVOL], code); - } - /* Update the VLDB to match what we did on disk as much as possible. */ /* If the converted RO was in the VLDB, make it look like the new RW. */ if (roserver) { -- 1.9.4