DEVEL15-rename-residency-from-mrafs-to-osd-20090119
authorSteven Jenkins <steven@endpoint.com>
Mon, 19 Jan 2009 18:09:19 +0000 (18:09 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 19 Jan 2009 18:09:19 +0000 (18:09 +0000)
LICENSE IPL10
FIXES 124130

rename mrafs commands into their equivalent osd versions; structures etc are the
 same.

(cherry picked from commit 92c7925b12d7b99e4ff044bc053330e77336a21a)

src/afs/afs_pioctl.c
src/config/venus.h
src/fsint/afsint.xg
src/viced/afsfileprocs.c

index 1fddc27..8fa09cd 100644 (file)
@@ -114,7 +114,7 @@ DECL_PIOCTL(PFlushMount);
 DECL_PIOCTL(PRxStatProc);
 DECL_PIOCTL(PRxStatPeer);
 DECL_PIOCTL(PPrefetchFromTape);
-DECL_PIOCTL(PResidencyCmd);
+DECL_PIOCTL(PFsCmd);
 DECL_PIOCTL(PCallBackAddr);
 DECL_PIOCTL(PDiscon);
 DECL_PIOCTL(PNFSNukeCreds);
@@ -219,7 +219,7 @@ static pioctlFunction VpioctlSw[] = {
        PBogus,                 /* 64 -- arla: force cache check */
        PBogus,                 /* 65 -- arla: break callback */
        PPrefetchFromTape,      /* 66 -- MR-AFS: prefetch file from tape */
-       PResidencyCmd,          /* 67 -- MR-AFS: generic commnd interface */
+       PFsCmd,                 /* 67 -- RXOSD: generic commnd interface */
        PBogus,                 /* 68 -- arla: fetch stats */
        PGetVnodeXStatus2,      /* 69 - get caller access and some vcache status */
 };
@@ -4431,21 +4431,21 @@ DECL_PIOCTL(PPrefetchFromTape)
     return code;
 }
 
-DECL_PIOCTL(PResidencyCmd)
+DECL_PIOCTL(PFsCmd)
 {
     register afs_int32 code;
     struct conn *tc;
     struct vcache *tvc;
-    struct ResidencyCmdInputs *Inputs;
-    struct ResidencyCmdOutputs *Outputs;
+    struct FsCmdInputs *Inputs;
+    struct FsCmdOutputs *Outputs;
     struct VenusFid tfid;
     struct AFSFid *Fid;
 
-    Inputs = (struct ResidencyCmdInputs *)ain;
-    Outputs = (struct ResidencyCmdOutputs *)aout;
+    Inputs = (struct FsCmdInputs *)ain;
+    Outputs = (struct FsCmdOutputs *)aout;
     if (!avc)
        return EINVAL;
-    if (!ain || ainSize != sizeof(struct ResidencyCmdInputs))
+    if (!ain || ainSize != sizeof(struct FsCmdInputs))
        return EINVAL;
 
     Fid = &Inputs->fid;
@@ -4469,8 +4469,8 @@ DECL_PIOCTL(PResidencyCmd)
            if (tc) {
                RX_AFS_GUNLOCK();
                code =
-                   RXAFS_ResidencyCmd(tc->id, Fid, Inputs,
-                                      (struct ResidencyCmdOutputs *)aout);
+                   RXAFS_FsCmd(tc->id, Fid, Inputs, 
+                                       (struct FsCmdOutputs *)aout);
                RX_AFS_GLOCK();
            } else
                code = -1;
@@ -4494,7 +4494,7 @@ DECL_PIOCTL(PResidencyCmd)
     afs_PutVCache(tvc);
 
     if (!code) {
-       *aoutSize = sizeof(struct ResidencyCmdOutputs);
+       *aoutSize = sizeof(struct FsCmdOutputs);
     }
     return code;
 }
index 894fc52..3a0b92e 100644 (file)
@@ -172,8 +172,8 @@ struct cm_initparams {
 #define VIOC_RXSTAT_PEER       _VICEIOCTL(54)  /* Control peer RX stats */
 #define VIOC_GETRXKCRYPT        _VICEIOCTL(55) /* Set rxkad enc flag */
 #define VIOC_SETRXKCRYPT        _VICEIOCTL(56) /* Set rxkad enc flag */
-#define VIOC_PREFETCHTAPE       _VICEIOCTL(66) /* MR-AFS prefetch from tape */
-#define VIOC_RESIDENCY_CMD      _VICEIOCTL(67) /* generic MR-AFS cmds */
+#define VIOC_PREFETCHTAPE       _VICEIOCTL(66) /* osd prefetch from tape */
+#define VIOC_FS_CMD            _VICEIOCTL(67)  /* fs extensions for osd etc. */
 #define VIOC_STATISTICS         _VICEIOCTL(68) /* arla: fetch statistics */
 #define VIOC_GETVCXSTATUS2      _VICEIOCTL(69)  /* vcache statistics */
 
index b2b12d7..05bd223 100644 (file)
@@ -393,7 +393,7 @@ struct AccessHistoryOld {
     afs_uint32 Residency4;
 };
 
-struct ResidencyCmdInputs {
+struct FsCmdInputs {
     afs_int32  command;
     struct AFSFid fid;
     afs_int64  int64s[MAXCMDINT64S];
@@ -401,7 +401,7 @@ struct ResidencyCmdInputs {
     char       chars[MAXCMDCHARS];
 };
 
-struct ResidencyCmdOutputs {
+struct FsCmdOutputs {
     afs_int32  code;
     struct AFSFetchStatus status;
     afs_int64  int64s[MAXCMDINT64S];
@@ -660,10 +660,10 @@ DFSSymlink(
   AFSVolSync *Sync
 ) = 163;
 
-ResidencyCmd(
+FsCmd(
   IN AFSFid *Fid,
-  IN struct ResidencyCmdInputs *Inputs,
-  OUT struct ResidencyCmdOutputs *Outputs
+  IN struct FsCmdInputs *Inputs,
+  OUT struct FsCmdOutputs *Outputs
 ) = 220;
 
 InlineBulkStatus(
index d2f418b..104ff73 100644 (file)
@@ -1938,11 +1938,21 @@ SRXAFS_DFSSymlink(struct rx_call *acall, struct AFSFid *DirFid, char *Name,
 }
 
 afs_int32
-SRXAFS_ResidencyCmd(struct rx_call * acall, struct AFSFid * Fid,
-                   struct ResidencyCmdInputs * Inputs,
-                   struct ResidencyCmdOutputs * Outputs)
+SRXAFS_FsCmd(struct rx_call * acall, struct AFSFid * Fid,
+                   struct FsCmdInputs * Inputs,
+                   struct FsCmdOutputs * Outputs)
 {
-    return EINVAL;
+    afs_int32 code = 0;
+    struct AFSCallBack callback;
+    struct AFSVolSync sync;
+
+    switch (Inputs->command) {
+    default:
+        code = EINVAL;
+    }
+    ViceLog(1,("FsCmd: cmd = %d, code=%d\n", 
+                       Inputs->command, Outputs->code));
+    return code;
 }
 
 #ifdef AFS_NT40_ENV