summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda/coda_venus.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2010-04-05 20:12:54 +0000
committerrwatson <rwatson@FreeBSD.org>2010-04-05 20:12:54 +0000
commit877d8ac3262677f82adedc171454bdcd90750020 (patch)
tree18ed6a08dc3fb0b1591c2a35a6d3da637afd23b1 /sys/fs/coda/coda_venus.c
parent1a37d38c69954bf75f33e74c84fa092b9469f17a (diff)
downloadFreeBSD-src-877d8ac3262677f82adedc171454bdcd90750020.zip
FreeBSD-src-877d8ac3262677f82adedc171454bdcd90750020.tar.gz
Synchronize Coda kernel module definitions in our coda.h to Coda 6's
coda.h: - CodaFid typdef -> struct CodaFid throughout. - Use unsigned int instead of unsigned long for venus_dirent and other cosmetic fixes. - Introduce cuid_t and cgid_t and use instead of uid_t and gid_t in RPCs. - Synchronize comments and macros. - Use u_int32_t instead of unsigned long for coda_out_hdr. With these changes, a 64-bit Coda kernel module now works with coda6_client, whereas previous userspace and kernel versions of RPCs differed sufficiently to prevent using the file system. This has been verified only with casual testing, but /coda is now usable for at least basic operations on amd64. MFC after: 1 week
Diffstat (limited to 'sys/fs/coda/coda_venus.c')
-rw-r--r--sys/fs/coda/coda_venus.c60
1 files changed, 32 insertions, 28 deletions
diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c
index b5e3b96..9999d3a 100644
--- a/sys/fs/coda/coda_venus.c
+++ b/sys/fs/coda/coda_venus.c
@@ -177,7 +177,7 @@ int coda_kernel_version = CODA_KERNEL_VERSION;
int
venus_root(void *mdp, struct ucred *cred, struct proc *p,
- /*out*/ CodaFid *VFid)
+ /*out*/ struct CodaFid *VFid)
{
DECL_NO_IN(coda_root); /* sets Isize & Osize */
ALLOC_NO_IN(coda_root); /* sets inp & outp */
@@ -194,7 +194,7 @@ venus_root(void *mdp, struct ucred *cred, struct proc *p,
}
int
-venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred,
+venus_open(void *mdp, struct CodaFid *fid, int flag, struct ucred *cred,
struct proc *p, /*out*/ struct vnode **vp)
{
int cflag;
@@ -215,7 +215,7 @@ venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred,
}
int
-venus_close(void *mdp, CodaFid *fid, int flag, struct ucred *cred,
+venus_close(void *mdp, struct CodaFid *fid, int flag, struct ucred *cred,
struct proc *p)
{
int cflag;
@@ -252,7 +252,7 @@ venus_write(void)
* normal files.
*/
int
-venus_ioctl(void *mdp, CodaFid *fid, int com, int flag, caddr_t data,
+venus_ioctl(void *mdp, struct CodaFid *fid, int com, int flag, caddr_t data,
struct ucred *cred, struct proc *p)
{
DECL(coda_ioctl); /* sets Isize & Osize */
@@ -304,7 +304,8 @@ venus_ioctl(void *mdp, CodaFid *fid, int com, int flag, caddr_t data,
}
int
-venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, struct vattr *vap)
+venus_getattr(void *mdp, struct CodaFid *fid, struct ucred *cred,
+ struct vattr *vap)
{
struct proc *p;
DECL(coda_getattr); /* sets Isize & Osize */
@@ -326,7 +327,8 @@ venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, struct vattr *vap)
}
int
-venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, struct ucred *cred)
+venus_setattr(void *mdp, struct CodaFid *fid, struct vattr *vap,
+ struct ucred *cred)
{
struct proc *p;
DECL_NO_OUT(coda_setattr); /* sets Isize & Osize */
@@ -347,8 +349,8 @@ venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, struct ucred *cred)
}
int
-venus_access(void *mdp, CodaFid *fid, accmode_t accmode, struct ucred *cred,
- struct proc *p)
+venus_access(void *mdp, struct CodaFid *fid, accmode_t accmode,
+ struct ucred *cred, struct proc *p)
{
DECL_NO_OUT(coda_access); /* sets Isize & Osize */
ALLOC_NO_OUT(coda_access); /* sets inp & outp */
@@ -374,8 +376,8 @@ venus_access(void *mdp, CodaFid *fid, accmode_t accmode, struct ucred *cred,
}
int
-venus_readlink(void *mdp, CodaFid *fid, struct ucred *cred, struct proc *p,
- /*out*/ char **str, int *len)
+venus_readlink(void *mdp, struct CodaFid *fid, struct ucred *cred,
+ struct proc *p, /*out*/ char **str, int *len)
{
DECL(coda_readlink); /* sets Isize & Osize */
coda_readlink_size += CODA_MAXPATHLEN;
@@ -400,7 +402,7 @@ venus_readlink(void *mdp, CodaFid *fid, struct ucred *cred, struct proc *p,
}
int
-venus_fsync(void *mdp, CodaFid *fid, struct proc *p)
+venus_fsync(void *mdp, struct CodaFid *fid, struct proc *p)
{
DECL_NO_OUT(coda_fsync); /* sets Isize & Osize */
ALLOC_NO_OUT(coda_fsync); /* sets inp & outp */
@@ -420,8 +422,9 @@ venus_fsync(void *mdp, CodaFid *fid, struct proc *p)
}
int
-venus_lookup(void *mdp, CodaFid *fid, const char *nm, int len,
- struct ucred *cred, struct proc *p, /*out*/ CodaFid *VFid, int *vtype)
+venus_lookup(void *mdp, struct CodaFid *fid, const char *nm, int len,
+ struct ucred *cred, struct proc *p, /*out*/ struct CodaFid *VFid,
+ int *vtype)
{
DECL(coda_lookup); /* sets Isize & Osize */
coda_lookup_size += len + 1;
@@ -457,9 +460,9 @@ venus_lookup(void *mdp, CodaFid *fid, const char *nm, int len,
}
int
-venus_create(void *mdp, CodaFid *fid, const char *nm, int len, int exclusive,
- int mode, struct vattr *va, struct ucred *cred, struct proc *p,
- /*out*/ CodaFid *VFid, struct vattr *attr)
+venus_create(void *mdp, struct CodaFid *fid, const char *nm, int len,
+ int exclusive, int mode, struct vattr *va, struct ucred *cred,
+ struct proc *p, /*out*/ struct CodaFid *VFid, struct vattr *attr)
{
DECL(coda_create); /* sets Isize & Osize */
coda_create_size += len + 1;
@@ -488,7 +491,7 @@ venus_create(void *mdp, CodaFid *fid, const char *nm, int len, int exclusive,
}
int
-venus_remove(void *mdp, CodaFid *fid, const char *nm, int len,
+venus_remove(void *mdp, struct CodaFid *fid, const char *nm, int len,
struct ucred *cred, struct proc *p)
{
DECL_NO_OUT(coda_remove); /* sets Isize & Osize */
@@ -511,8 +514,8 @@ venus_remove(void *mdp, CodaFid *fid, const char *nm, int len,
}
int
-venus_link(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, int len,
- struct ucred *cred, struct proc *p)
+venus_link(void *mdp, struct CodaFid *fid, struct CodaFid *tfid,
+ const char *nm, int len, struct ucred *cred, struct proc *p)
{
DECL_NO_OUT(coda_link); /* sets Isize & Osize */
coda_link_size += len + 1;
@@ -535,8 +538,9 @@ venus_link(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, int len,
}
int
-venus_rename(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, int len,
- const char *tnm, int tlen, struct ucred *cred, struct proc *p)
+venus_rename(void *mdp, struct CodaFid *fid, struct CodaFid *tfid,
+ const char *nm, int len, const char *tnm, int tlen, struct ucred *cred,
+ struct proc *p)
{
DECL_NO_OUT(coda_rename); /* sets Isize & Osize */
coda_rename_size += len + 1 + tlen + 1;
@@ -562,9 +566,9 @@ venus_rename(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, int len,
}
int
-venus_mkdir(void *mdp, CodaFid *fid, const char *nm, int len,
+venus_mkdir(void *mdp, struct CodaFid *fid, const char *nm, int len,
struct vattr *va, struct ucred *cred, struct proc *p,
- /*out*/ CodaFid *VFid, struct vattr *ova)
+ /*out*/ struct CodaFid *VFid, struct vattr *ova)
{
DECL(coda_mkdir); /* sets Isize & Osize */
coda_mkdir_size += len + 1;
@@ -591,7 +595,7 @@ venus_mkdir(void *mdp, CodaFid *fid, const char *nm, int len,
}
int
-venus_rmdir(void *mdp, CodaFid *fid, const char *nm, int len,
+venus_rmdir(void *mdp, struct CodaFid *fid, const char *nm, int len,
struct ucred *cred, struct proc *p)
{
DECL_NO_OUT(coda_rmdir); /* sets Isize & Osize */
@@ -614,7 +618,7 @@ venus_rmdir(void *mdp, CodaFid *fid, const char *nm, int len,
}
int
-venus_symlink(void *mdp, CodaFid *fid, const char *lnm, int llen,
+venus_symlink(void *mdp, struct CodaFid *fid, const char *lnm, int llen,
const char *nm, int len, struct vattr *va, struct ucred *cred,
struct proc *p)
{
@@ -645,7 +649,7 @@ venus_symlink(void *mdp, CodaFid *fid, const char *lnm, int llen,
* XXX: Unused.
*/
int
-venus_readdir(void *mdp, CodaFid *fid, int count, int offset,
+venus_readdir(void *mdp, struct CodaFid *fid, int count, int offset,
struct ucred *cred, struct proc *p, /*out*/ char *buffer, int *len)
{
DECL(coda_readdir); /* sets Isize & Osize */
@@ -672,8 +676,8 @@ venus_readdir(void *mdp, CodaFid *fid, int count, int offset,
}
int
-venus_fhtovp(void *mdp, CodaFid *fid, struct ucred *cred, struct proc *p,
- /*out*/ CodaFid *VFid, int *vtype)
+venus_fhtovp(void *mdp, struct CodaFid *fid, struct ucred *cred,
+ struct proc *p, /*out*/ struct CodaFid *VFid, int *vtype)
{
DECL(coda_vget); /* sets Isize & Osize */
ALLOC(coda_vget); /* sets inp & outp */
OpenPOWER on IntegriCloud