From 58159672536df128cb21b449865acb011e8c90fc Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Wed, 18 Jan 2012 14:04:28 -0500 Subject: [PATCH] RW Replication: Add basic definitions Add some basic definitions that will be needed to handle RW replicas. A new volume type RWREPL is added. Replicas will share the same volume ID as the RW volume, so the array of volume IDs by volume type is unchanged, as is the VLDB entry format. A new flag bit ITSRWREPL/VLSF_RWREPLICA for serverFlags identifies RW replica sites in VLDB entries. Change-Id: I882b238f34e682ebea782e11dc418ae1340d4546 Reviewed-on: http://gerrit.openafs.org/6676 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- src/vlserver/vldbint.xg | 1 + src/vol/voldefs.h | 4 +++- src/volser/volser.p.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vlserver/vldbint.xg b/src/vlserver/vldbint.xg index 3866d5d51..8e1378fc6 100644 --- a/src/vlserver/vldbint.xg +++ b/src/vlserver/vldbint.xg @@ -195,6 +195,7 @@ const VLOP_DUMP = 0x100; %#define VLSF_BACKVOL 0x08 %#define VLSF_UUID 0x10 %#define VLSF_DONTUSE 0x20 +%#define VLSF_RWREPLICA 0x40 /* Volume is a RW replica */ typedef vldbentry bulkentries<>; typedef nvldbentry nbulkentries<>; diff --git a/src/vol/voldefs.h b/src/vol/voldefs.h index 2199b6992..73f738d94 100644 --- a/src/vol/voldefs.h +++ b/src/vol/voldefs.h @@ -20,12 +20,14 @@ #define readwriteVolume RWVOL #define readonlyVolume ROVOL #define backupVolume BACKVOL +#define rwreplicaVolume RWREPL #define RWVOL 0 #define ROVOL 1 #define BACKVOL 2 +#define RWREPL 3 -#define VOLMAXTYPES 3 /* _current_ max number of types */ +#define VOLMAXTYPES 4 /* _current_ max number of types */ /* the maximum number of volumes in a volume group that we can handle */ #define VOL_VG_MAX_VOLS 20 diff --git a/src/volser/volser.p.h b/src/volser/volser.p.h index 4d8ed084b..6f1f8a1bb 100644 --- a/src/volser/volser.p.h +++ b/src/volser/volser.p.h @@ -35,6 +35,7 @@ #define volser_RW 0 #define volser_RO 1 #define volser_BACK 2 +#define volser_RWREPL 3 #define THOLD(tt) ((tt)->refCount++) @@ -152,6 +153,7 @@ struct partList { /*used by the backup system */ #define ITSROVOL 0x02 #define ITSRWVOL 0x04 #define ITSBACKVOL 0x08 +#define ITSRWREPL 0x10 #define RO_DONTUSE 0x20 #define VLOP_RESTORE 0x100 /*this is bogus, clashes with VLOP_DUMP */ -- 2.39.5