From 92c7925b12d7b99e4ff044bc053330e77336a21a Mon Sep 17 00:00:00 2001 From: Steven Jenkins Date: Mon, 19 Jan 2009 18:09:06 +0000 Subject: [PATCH] rename-residency-from-mrafs-to-osd-20090119 LICENSE IPL10 FIXES 124130 rename mrafs commands into their equivalent osd versions; structures etc are the same. --- src/afs/afs_pioctl.c | 22 +++++++++++----------- src/config/vioc.h | 5 +++-- src/fsint/afsint.xg | 10 +++++----- src/viced/afsfileprocs.c | 18 ++++++++++++++---- 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 597dd61..6a0cd0e 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -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; } diff --git a/src/config/vioc.h b/src/config/vioc.h index 58ac92a..b3b4a73 100644 --- a/src/config/vioc.h +++ b/src/config/vioc.h @@ -87,8 +87,9 @@ #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 */ diff --git a/src/fsint/afsint.xg b/src/fsint/afsint.xg index f659163..709f392 100644 --- a/src/fsint/afsint.xg +++ b/src/fsint/afsint.xg @@ -389,7 +389,7 @@ struct AccessHistoryOld { afs_uint32 Residency4; }; -struct ResidencyCmdInputs { +struct FsCmdInputs { afs_int32 command; struct AFSFid fid; afs_int64 int64s[MAXCMDINT64S]; @@ -397,7 +397,7 @@ struct ResidencyCmdInputs { char chars[MAXCMDCHARS]; }; -struct ResidencyCmdOutputs { +struct FsCmdOutputs { afs_int32 code; struct AFSFetchStatus status; afs_int64 int64s[MAXCMDINT64S]; @@ -656,10 +656,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( diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index d2f418b..104ff73 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -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 -- 1.9.4