[AFS3-std] RxOSD claim on 2 structure members

Dan Hyde Dan Hyde <drh@umich.edu>
Thu, 11 Jun 2009 14:54:57 -0400


> David Boyes <dboyes@sinenomine.net> writes:
> 
> > If you stick things in unused/undocumented areas in widely used
> > control blocks/disk areas, you should be prepared to adapt to future
> > changes on your own. That's been the deal for as long as I've ever
> > seen, and I don't see what makes this any different.
> 
> That's fine for portions of the protocol where we don't know of any
> existing widespread use.  We concur that should mark those as reserved
> now, publicize that as well as we can, and then feel free to use them.
> 
> If we know of existing widespread use, that's a different matter.  It
> might not be if we'd had an active AFS standardization process that
> those users should have come to and didn't, but we had no
> standardization process apart from what Jeff was maintaining on grand
> (which I don't believe covers this area).  I don't think it's okay to
> punish people for not following a non-existent process.  We're the ones
> who didn't provide a way for them to reserve a field, so we should take
> the lumps and be the ones to provide a backward-compatible way forward.

I tried to speak up earlier this week on this subject, but had some
trouble with my mail.

I have committed to documenting the requirements we at umich have with
shadow volumes.  I will do that so others can look at our changes and
see both the design changes, and then at the patches (so they can see
if they match up).

That said, we have made both on-disk changes to the volume header, and
changes to the volintInfo structure.  The on-disk changes are needed to
identify shadow volumes; the volintInfo is less important, but we'll
need an rpc of some kind which can pass this information.  I chose
spare3 because spare2 seemed to be in use; we use it as volIsShadow.

Here's a portion of our shadow changes, against OpenAFS-1.4.10:

diff -u vol/volume.h openafs-1.4.10.patched/src/vol/volume.h
--- vol/volume.h	2008-09-04 14:17:23.000000000 -0400
+++ openafs-1.4.10.patched/src/vol/volume.h	2009-04-24 13:52:08.000000000 -0400
@@ -225,7 +225,8 @@
 #define DONT_SALVAGE	0xE5
 #endif				/* ALPHA_DUX40_ENV */
     byte dontSalvage;		/* If this is on, then don't bother salvaging this volume */
-    byte reserveb3;
+    byte volIsShadow;		/* If this is on, this volume is a shadow of another volume.  Used
+				 * to make sure we don't accidentially populate the VLDB */
 
     bit32 reserved1[6];
 
diff -u volser/volint.xg openafs-1.4.10.patched/src/volser/volint.xg
--- volser/volint.xg	2008-08-16 15:15:49.000000000 -0400
+++ openafs-1.4.10.patched/src/volser/volint.xg	2009-04-24 13:52:08.000000000 -0400
@@ -114,7 +116,7 @@
     afs_int32 spare0;		/* Used to hold the minquota value */
     afs_int32 spare1;		/* Used to hold the weekuse value */
     afs_int32 spare2;
-    afs_int32 spare3;
+    afs_int32 spare3;		/* Used to hold the unsigned char volIsShadow */
 };
 
 /*