]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
RW Replication: Add basic definitions
authorMarc Dionne <marc.c.dionne@gmail.com>
Wed, 18 Jan 2012 19:04:28 +0000 (14:04 -0500)
committerDerrick Brashear <shadow@dementix.org>
Tue, 7 Feb 2012 14:43:12 +0000 (06:43 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/vlserver/vldbint.xg
src/vol/voldefs.h
src/volser/volser.p.h

index 3866d5d513eb7e493ddaffb13ff68c26dc313827..8e1378fc6a02f7f2e8a790036497607a23bdc9d6 100644 (file)
@@ -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<>;
index 2199b6992184de46d8312163a4067b5d6bc20730..73f738d945dd81a10c4ec58563658c69eae93140 100644 (file)
 #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
index 4d8ed084bf6069b65c543b364662ace6da254147..6f1f8a1bb3970af7ff1c97f40bfe0f7e418c0550 100644 (file)
@@ -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 */