Commit 01a4efd9 authored by Jan Harkes's avatar Jan Harkes Committed by Linus Torvalds

[PATCH] Coda updates [4/5]

The ViceFid structure is really a Coda server datatype and the kernel
really shouldn't have to know its internal structure. Replace all
instances with struct CodaFid with opaque members.
parent 449fe968
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <linux/coda_fs_i.h> #include <linux/coda_fs_i.h>
#include <linux/coda_psdev.h> #include <linux/coda_psdev.h>
inline int coda_fideq(ViceFid *fid1, ViceFid *fid2) inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2)
{ {
return memcmp(fid1, fid2, sizeof(*fid1)) == 0; return memcmp(fid1, fid2, sizeof(*fid1)) == 0;
} }
...@@ -43,13 +43,13 @@ static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr) ...@@ -43,13 +43,13 @@ static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr)
static int coda_test_inode(struct inode *inode, void *data) static int coda_test_inode(struct inode *inode, void *data)
{ {
ViceFid *fid = (ViceFid *)data; struct CodaFid *fid = (struct CodaFid *)data;
return coda_fideq(&(ITOC(inode)->c_fid), fid); return coda_fideq(&(ITOC(inode)->c_fid), fid);
} }
static int coda_set_inode(struct inode *inode, void *data) static int coda_set_inode(struct inode *inode, void *data)
{ {
ViceFid *fid = (ViceFid *)data; struct CodaFid *fid = (struct CodaFid *)data;
ITOC(inode)->c_fid = *fid; ITOC(inode)->c_fid = *fid;
return 0; return 0;
} }
...@@ -59,7 +59,7 @@ static int coda_fail_inode(struct inode *inode, void *data) ...@@ -59,7 +59,7 @@ static int coda_fail_inode(struct inode *inode, void *data)
return -1; return -1;
} }
struct inode * coda_iget(struct super_block * sb, ViceFid * fid, struct inode * coda_iget(struct super_block * sb, struct CodaFid * fid,
struct coda_vattr * attr) struct coda_vattr * attr)
{ {
struct inode *inode; struct inode *inode;
...@@ -90,7 +90,7 @@ struct inode * coda_iget(struct super_block * sb, ViceFid * fid, ...@@ -90,7 +90,7 @@ struct inode * coda_iget(struct super_block * sb, ViceFid * fid,
- link the two up if this is needed - link the two up if this is needed
- fill in the attributes - fill in the attributes
*/ */
int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb) int coda_cnode_make(struct inode **inode, struct CodaFid *fid, struct super_block *sb)
{ {
struct coda_vattr attr; struct coda_vattr attr;
int error; int error;
...@@ -111,8 +111,8 @@ int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb) ...@@ -111,8 +111,8 @@ int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb)
} }
void coda_replace_fid(struct inode *inode, struct ViceFid *oldfid, void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid,
struct ViceFid *newfid) struct CodaFid *newfid)
{ {
struct coda_inode_info *cii; struct coda_inode_info *cii;
unsigned long hash = coda_f2i(newfid); unsigned long hash = coda_f2i(newfid);
...@@ -131,7 +131,7 @@ void coda_replace_fid(struct inode *inode, struct ViceFid *oldfid, ...@@ -131,7 +131,7 @@ void coda_replace_fid(struct inode *inode, struct ViceFid *oldfid,
} }
/* convert a fid to an inode. */ /* convert a fid to an inode. */
struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb) struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb)
{ {
struct inode *inode; struct inode *inode;
unsigned long hash = coda_f2i(fid); unsigned long hash = coda_f2i(fid);
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
int coda_fake_statfs; int coda_fake_statfs;
/* print a fid */ /* print a fid */
char * coda_f2s(ViceFid *f) char * coda_f2s(struct CodaFid *f)
{ {
static char s[60]; static char s[60];
sprintf(s, "(%-#x.%-#x.%-#x)", f->Volume, f->Vnode, f->Unique); sprintf(s, "(%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2]);
return s; return s;
} }
......
...@@ -93,7 +93,7 @@ struct file_operations coda_dir_operations = { ...@@ -93,7 +93,7 @@ struct file_operations coda_dir_operations = {
static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, struct nameidata *nd) static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, struct nameidata *nd)
{ {
struct inode *res_inode = NULL; struct inode *res_inode = NULL;
struct ViceFid resfid = {0,0,0}; struct CodaFid resfid = { { 0, } };
int dropme = 0; /* to indicate entry should not be cached */ int dropme = 0; /* to indicate entry should not be cached */
int type = 0; int type = 0;
int error = 0; int error = 0;
...@@ -196,7 +196,7 @@ static int coda_create(struct inode *dir, struct dentry *de, int mode, struct na ...@@ -196,7 +196,7 @@ static int coda_create(struct inode *dir, struct dentry *de, int mode, struct na
const char *name=de->d_name.name; const char *name=de->d_name.name;
int length=de->d_name.len; int length=de->d_name.len;
struct inode *inode; struct inode *inode;
struct ViceFid newfid; struct CodaFid newfid;
struct coda_vattr attrs; struct coda_vattr attrs;
lock_kernel(); lock_kernel();
...@@ -236,7 +236,7 @@ static int coda_mknod(struct inode *dir, struct dentry *de, int mode, dev_t rdev ...@@ -236,7 +236,7 @@ static int coda_mknod(struct inode *dir, struct dentry *de, int mode, dev_t rdev
const char *name=de->d_name.name; const char *name=de->d_name.name;
int length=de->d_name.len; int length=de->d_name.len;
struct inode *inode; struct inode *inode;
struct ViceFid newfid; struct CodaFid newfid;
struct coda_vattr attrs; struct coda_vattr attrs;
if ( coda_hasmknod == 0 ) if ( coda_hasmknod == 0 )
...@@ -283,7 +283,7 @@ static int coda_mkdir(struct inode *dir, struct dentry *de, int mode) ...@@ -283,7 +283,7 @@ static int coda_mkdir(struct inode *dir, struct dentry *de, int mode)
const char *name = de->d_name.name; const char *name = de->d_name.name;
int len = de->d_name.len; int len = de->d_name.len;
int error; int error;
struct ViceFid newfid; struct CodaFid newfid;
lock_kernel(); lock_kernel();
coda_vfs_stat.mkdir++; coda_vfs_stat.mkdir++;
......
...@@ -44,7 +44,7 @@ static struct inode *coda_alloc_inode(struct super_block *sb) ...@@ -44,7 +44,7 @@ static struct inode *coda_alloc_inode(struct super_block *sb)
ei = (struct coda_inode_info *)kmem_cache_alloc(coda_inode_cachep, SLAB_KERNEL); ei = (struct coda_inode_info *)kmem_cache_alloc(coda_inode_cachep, SLAB_KERNEL);
if (!ei) if (!ei)
return NULL; return NULL;
memset(&ei->c_fid, 0, sizeof(struct ViceFid)); memset(&ei->c_fid, 0, sizeof(struct CodaFid));
ei->c_flags = 0; ei->c_flags = 0;
ei->c_uid = 0; ei->c_uid = 0;
ei->c_cached_perm = 0; ei->c_cached_perm = 0;
...@@ -138,7 +138,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -138,7 +138,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
struct inode *root = 0; struct inode *root = 0;
struct coda_sb_info *sbi = NULL; struct coda_sb_info *sbi = NULL;
struct venus_comm *vc = NULL; struct venus_comm *vc = NULL;
ViceFid fid; struct CodaFid fid;
int error; int error;
int idx; int idx;
......
...@@ -75,7 +75,7 @@ do {\ ...@@ -75,7 +75,7 @@ do {\
/* the upcalls */ /* the upcalls */
int venus_rootfid(struct super_block *sb, ViceFid *fidp) int venus_rootfid(struct super_block *sb, struct CodaFid *fidp)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -89,14 +89,14 @@ int venus_rootfid(struct super_block *sb, ViceFid *fidp) ...@@ -89,14 +89,14 @@ int venus_rootfid(struct super_block *sb, ViceFid *fidp)
if (error) { if (error) {
printk("coda_get_rootfid: error %d\n", error); printk("coda_get_rootfid: error %d\n", error);
} else { } else {
*fidp = (ViceFid) outp->coda_root.VFid; *fidp = outp->coda_root.VFid;
} }
CODA_FREE(inp, insize); CODA_FREE(inp, insize);
return error; return error;
} }
int venus_getattr(struct super_block *sb, struct ViceFid *fid, int venus_getattr(struct super_block *sb, struct CodaFid *fid,
struct coda_vattr *attr) struct coda_vattr *attr)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -115,7 +115,7 @@ int venus_getattr(struct super_block *sb, struct ViceFid *fid, ...@@ -115,7 +115,7 @@ int venus_getattr(struct super_block *sb, struct ViceFid *fid,
return error; return error;
} }
int venus_setattr(struct super_block *sb, struct ViceFid *fid, int venus_setattr(struct super_block *sb, struct CodaFid *fid,
struct coda_vattr *vattr) struct coda_vattr *vattr)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -134,9 +134,9 @@ int venus_setattr(struct super_block *sb, struct ViceFid *fid, ...@@ -134,9 +134,9 @@ int venus_setattr(struct super_block *sb, struct ViceFid *fid,
return error; return error;
} }
int venus_lookup(struct super_block *sb, struct ViceFid *fid, int venus_lookup(struct super_block *sb, struct CodaFid *fid,
const char *name, int length, int * type, const char *name, int length, int * type,
struct ViceFid *resfid) struct CodaFid *resfid)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -163,7 +163,7 @@ int venus_lookup(struct super_block *sb, struct ViceFid *fid, ...@@ -163,7 +163,7 @@ int venus_lookup(struct super_block *sb, struct ViceFid *fid,
return error; return error;
} }
int venus_store(struct super_block *sb, struct ViceFid *fid, int flags, int venus_store(struct super_block *sb, struct CodaFid *fid, int flags,
vuid_t uid) vuid_t uid)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -186,7 +186,7 @@ int venus_store(struct super_block *sb, struct ViceFid *fid, int flags, ...@@ -186,7 +186,7 @@ int venus_store(struct super_block *sb, struct ViceFid *fid, int flags,
return error; return error;
} }
int venus_release(struct super_block *sb, struct ViceFid *fid, int flags) int venus_release(struct super_block *sb, struct CodaFid *fid, int flags)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -204,7 +204,7 @@ int venus_release(struct super_block *sb, struct ViceFid *fid, int flags) ...@@ -204,7 +204,7 @@ int venus_release(struct super_block *sb, struct ViceFid *fid, int flags)
return error; return error;
} }
int venus_close(struct super_block *sb, struct ViceFid *fid, int flags, int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
vuid_t uid) vuid_t uid)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -227,7 +227,7 @@ int venus_close(struct super_block *sb, struct ViceFid *fid, int flags, ...@@ -227,7 +227,7 @@ int venus_close(struct super_block *sb, struct ViceFid *fid, int flags,
return error; return error;
} }
int venus_open(struct super_block *sb, struct ViceFid *fid, int venus_open(struct super_block *sb, struct CodaFid *fid,
int flags, struct file **fh) int flags, struct file **fh)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -248,9 +248,9 @@ int venus_open(struct super_block *sb, struct ViceFid *fid, ...@@ -248,9 +248,9 @@ int venus_open(struct super_block *sb, struct ViceFid *fid,
return error; return error;
} }
int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid, int venus_mkdir(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length, const char *name, int length,
struct ViceFid *newfid, struct coda_vattr *attrs) struct CodaFid *newfid, struct coda_vattr *attrs)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -278,8 +278,8 @@ int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid, ...@@ -278,8 +278,8 @@ int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid,
} }
int venus_rename(struct super_block *sb, struct ViceFid *old_fid, int venus_rename(struct super_block *sb, struct CodaFid *old_fid,
struct ViceFid *new_fid, size_t old_length, struct CodaFid *new_fid, size_t old_length,
size_t new_length, const char *old_name, size_t new_length, const char *old_name,
const char *new_name) const char *new_name)
{ {
...@@ -315,9 +315,9 @@ int venus_rename(struct super_block *sb, struct ViceFid *old_fid, ...@@ -315,9 +315,9 @@ int venus_rename(struct super_block *sb, struct ViceFid *old_fid,
return error; return error;
} }
int venus_create(struct super_block *sb, struct ViceFid *dirfid, int venus_create(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length, int excl, int mode, dev_t rdev, const char *name, int length, int excl, int mode, dev_t rdev,
struct ViceFid *newfid, struct coda_vattr *attrs) struct CodaFid *newfid, struct coda_vattr *attrs)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -348,7 +348,7 @@ int venus_create(struct super_block *sb, struct ViceFid *dirfid, ...@@ -348,7 +348,7 @@ int venus_create(struct super_block *sb, struct ViceFid *dirfid,
return error; return error;
} }
int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid, int venus_rmdir(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length) const char *name, int length)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -371,7 +371,7 @@ int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid, ...@@ -371,7 +371,7 @@ int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid,
return error; return error;
} }
int venus_remove(struct super_block *sb, struct ViceFid *dirfid, int venus_remove(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length) const char *name, int length)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -393,7 +393,7 @@ int venus_remove(struct super_block *sb, struct ViceFid *dirfid, ...@@ -393,7 +393,7 @@ int venus_remove(struct super_block *sb, struct ViceFid *dirfid,
return error; return error;
} }
int venus_readlink(struct super_block *sb, struct ViceFid *fid, int venus_readlink(struct super_block *sb, struct CodaFid *fid,
char *buffer, int *length) char *buffer, int *length)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -426,8 +426,8 @@ int venus_readlink(struct super_block *sb, struct ViceFid *fid, ...@@ -426,8 +426,8 @@ int venus_readlink(struct super_block *sb, struct ViceFid *fid,
int venus_link(struct super_block *sb, struct ViceFid *fid, int venus_link(struct super_block *sb, struct CodaFid *fid,
struct ViceFid *dirfid, const char *name, int len ) struct CodaFid *dirfid, const char *name, int len )
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -452,7 +452,7 @@ int venus_link(struct super_block *sb, struct ViceFid *fid, ...@@ -452,7 +452,7 @@ int venus_link(struct super_block *sb, struct ViceFid *fid,
return error; return error;
} }
int venus_symlink(struct super_block *sb, struct ViceFid *fid, int venus_symlink(struct super_block *sb, struct CodaFid *fid,
const char *name, int len, const char *name, int len,
const char *symname, int symlen) const char *symname, int symlen)
{ {
...@@ -487,7 +487,7 @@ int venus_symlink(struct super_block *sb, struct ViceFid *fid, ...@@ -487,7 +487,7 @@ int venus_symlink(struct super_block *sb, struct ViceFid *fid,
return error; return error;
} }
int venus_fsync(struct super_block *sb, struct ViceFid *fid) int venus_fsync(struct super_block *sb, struct CodaFid *fid)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -504,7 +504,7 @@ int venus_fsync(struct super_block *sb, struct ViceFid *fid) ...@@ -504,7 +504,7 @@ int venus_fsync(struct super_block *sb, struct ViceFid *fid)
return error; return error;
} }
int venus_access(struct super_block *sb, struct ViceFid *fid, int mask) int venus_access(struct super_block *sb, struct CodaFid *fid, int mask)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
...@@ -523,7 +523,7 @@ int venus_access(struct super_block *sb, struct ViceFid *fid, int mask) ...@@ -523,7 +523,7 @@ int venus_access(struct super_block *sb, struct ViceFid *fid, int mask)
} }
int venus_pioctl(struct super_block *sb, struct ViceFid *fid, int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
unsigned int cmd, struct PioctlData *data) unsigned int cmd, struct PioctlData *data)
{ {
union inputArgs *inp; union inputArgs *inp;
...@@ -813,7 +813,7 @@ static int coda_upcall(struct coda_sb_info *sbi, ...@@ -813,7 +813,7 @@ static int coda_upcall(struct coda_sb_info *sbi,
* The last allows Venus to replace local fids with global ones * The last allows Venus to replace local fids with global ones
* during reintegration. * during reintegration.
* *
* CODA_REPLACE -- replace one ViceFid with another throughout the name cache */ * CODA_REPLACE -- replace one CodaFid with another throughout the name cache */
int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
{ {
...@@ -837,7 +837,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -837,7 +837,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_ZAPDIR : { case CODA_ZAPDIR : {
struct inode *inode; struct inode *inode;
ViceFid *fid = &out->coda_zapdir.CodaFid; struct CodaFid *fid = &out->coda_zapdir.CodaFid;
inode = coda_fid_to_inode(fid, sb); inode = coda_fid_to_inode(fid, sb);
if (inode) { if (inode) {
...@@ -851,7 +851,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -851,7 +851,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_ZAPFILE : { case CODA_ZAPFILE : {
struct inode *inode; struct inode *inode;
struct ViceFid *fid = &out->coda_zapfile.CodaFid; struct CodaFid *fid = &out->coda_zapfile.CodaFid;
inode = coda_fid_to_inode(fid, sb); inode = coda_fid_to_inode(fid, sb);
if ( inode ) { if ( inode ) {
coda_flag_inode(inode, C_VATTR); coda_flag_inode(inode, C_VATTR);
...@@ -862,7 +862,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -862,7 +862,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_PURGEFID : { case CODA_PURGEFID : {
struct inode *inode; struct inode *inode;
ViceFid *fid = &out->coda_purgefid.CodaFid; struct CodaFid *fid = &out->coda_purgefid.CodaFid;
inode = coda_fid_to_inode(fid, sb); inode = coda_fid_to_inode(fid, sb);
if ( inode ) { if ( inode ) {
coda_flag_inode_children(inode, C_PURGE); coda_flag_inode_children(inode, C_PURGE);
...@@ -878,8 +878,8 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -878,8 +878,8 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_REPLACE : { case CODA_REPLACE : {
struct inode *inode; struct inode *inode;
ViceFid *oldfid = &out->coda_replace.OldFid; struct CodaFid *oldfid = &out->coda_replace.OldFid;
ViceFid *newfid = &out->coda_replace.NewFid; struct CodaFid *newfid = &out->coda_replace.NewFid;
inode = coda_fid_to_inode(oldfid, sb); inode = coda_fid_to_inode(oldfid, sb);
if ( inode ) { if ( inode ) {
coda_replace_fid(inode, oldfid, newfid); coda_replace_fid(inode, oldfid, newfid);
......
...@@ -194,38 +194,24 @@ struct venus_dirent { ...@@ -194,38 +194,24 @@ struct venus_dirent {
#endif #endif
#ifndef _FID_T_ struct CodaFid {
#define _FID_T_ 1 u_int32_t opaque[3];
typedef u_int32_t VolumeId; };
typedef u_int32_t VnodeId;
typedef u_int32_t Unique_t;
typedef u_int32_t FileVersion;
#endif
#ifndef _VICEFID_T_
#define _VICEFID_T_ 1
typedef struct ViceFid {
VolumeId Volume;
VnodeId Vnode;
Unique_t Unique;
} ViceFid;
#endif /* VICEFID */
#ifdef __linux__ #ifdef __linux__
static __inline__ ino_t coda_f2i(struct ViceFid *fid) static __inline__ ino_t coda_f2i(struct CodaFid *fid)
{ {
if ( ! fid ) if ( ! fid )
return 0; return 0;
if (fid->Vnode == 0xfffffffe || fid->Vnode == 0xffffffff) if (fid->opaque[1] == 0xfffffffe || fid->opaque[1] == 0xffffffff)
return ((fid->Volume << 20) | (fid->Unique & 0xfffff)); return ((fid->opaque[0] << 20) | (fid->opaque[2] & 0xfffff));
else else
return (fid->Unique + (fid->Vnode<<10) + (fid->Volume<<20)); return (fid->opaque[2] + (fid->opaque[1]<<10) + (fid->opaque[0]<<20));
} }
#else #else
#define coda_f2i(fid)\ #define coda_f2i(fid)\
((fid) ? ((fid)->Unique + ((fid)->Vnode<<10) + ((fid)->Volume<<20)) : 0) ((fid) ? ((fid)->opaque[2] + ((fid)->opaque[1]<<10) + ((fid)->opaque[0]<<20)) : 0)
#endif #endif
...@@ -239,7 +225,7 @@ typedef u_int32_t vgid_t; ...@@ -239,7 +225,7 @@ typedef u_int32_t vgid_t;
#define _CODACRED_T_ #define _CODACRED_T_
struct coda_cred { struct coda_cred {
vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid; /* Real, efftve, set, fs uid*/ vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid; /* Real, efftve, set, fs uid*/
vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */ vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */
}; };
#endif #endif
...@@ -354,7 +340,7 @@ struct coda_out_hdr { ...@@ -354,7 +340,7 @@ struct coda_out_hdr {
/* coda_root: NO_IN */ /* coda_root: NO_IN */
struct coda_root_out { struct coda_root_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid VFid; struct CodaFid VFid;
}; };
struct coda_root_in { struct coda_root_in {
...@@ -364,7 +350,7 @@ struct coda_root_in { ...@@ -364,7 +350,7 @@ struct coda_root_in {
/* coda_open: */ /* coda_open: */
struct coda_open_in { struct coda_open_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int flags; int flags;
}; };
...@@ -378,7 +364,7 @@ struct coda_open_out { ...@@ -378,7 +364,7 @@ struct coda_open_out {
/* coda_store: */ /* coda_store: */
struct coda_store_in { struct coda_store_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int flags; int flags;
}; };
...@@ -389,7 +375,7 @@ struct coda_store_out { ...@@ -389,7 +375,7 @@ struct coda_store_out {
/* coda_release: */ /* coda_release: */
struct coda_release_in { struct coda_release_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int flags; int flags;
}; };
...@@ -400,7 +386,7 @@ struct coda_release_out { ...@@ -400,7 +386,7 @@ struct coda_release_out {
/* coda_close: */ /* coda_close: */
struct coda_close_in { struct coda_close_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int flags; int flags;
}; };
...@@ -411,7 +397,7 @@ struct coda_close_out { ...@@ -411,7 +397,7 @@ struct coda_close_out {
/* coda_ioctl: */ /* coda_ioctl: */
struct coda_ioctl_in { struct coda_ioctl_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int cmd; int cmd;
int len; int len;
int rwflag; int rwflag;
...@@ -428,7 +414,7 @@ struct coda_ioctl_out { ...@@ -428,7 +414,7 @@ struct coda_ioctl_out {
/* coda_getattr: */ /* coda_getattr: */
struct coda_getattr_in { struct coda_getattr_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
}; };
struct coda_getattr_out { struct coda_getattr_out {
...@@ -440,7 +426,7 @@ struct coda_getattr_out { ...@@ -440,7 +426,7 @@ struct coda_getattr_out {
/* coda_setattr: NO_OUT */ /* coda_setattr: NO_OUT */
struct coda_setattr_in { struct coda_setattr_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
struct coda_vattr attr; struct coda_vattr attr;
}; };
...@@ -451,7 +437,7 @@ struct coda_setattr_out { ...@@ -451,7 +437,7 @@ struct coda_setattr_out {
/* coda_access: NO_OUT */ /* coda_access: NO_OUT */
struct coda_access_in { struct coda_access_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int flags; int flags;
}; };
...@@ -467,14 +453,14 @@ struct coda_access_out { ...@@ -467,14 +453,14 @@ struct coda_access_out {
/* coda_lookup: */ /* coda_lookup: */
struct coda_lookup_in { struct coda_lookup_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int name; /* Place holder for data. */ int name; /* Place holder for data. */
int flags; int flags;
}; };
struct coda_lookup_out { struct coda_lookup_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid VFid; struct CodaFid VFid;
int vtype; int vtype;
}; };
...@@ -482,7 +468,7 @@ struct coda_lookup_out { ...@@ -482,7 +468,7 @@ struct coda_lookup_out {
/* coda_create: */ /* coda_create: */
struct coda_create_in { struct coda_create_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
struct coda_vattr attr; struct coda_vattr attr;
int excl; int excl;
int mode; int mode;
...@@ -491,7 +477,7 @@ struct coda_create_in { ...@@ -491,7 +477,7 @@ struct coda_create_in {
struct coda_create_out { struct coda_create_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid VFid; struct CodaFid VFid;
struct coda_vattr attr; struct coda_vattr attr;
}; };
...@@ -499,7 +485,7 @@ struct coda_create_out { ...@@ -499,7 +485,7 @@ struct coda_create_out {
/* coda_remove: NO_OUT */ /* coda_remove: NO_OUT */
struct coda_remove_in { struct coda_remove_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int name; /* Place holder for data. */ int name; /* Place holder for data. */
}; };
...@@ -510,8 +496,8 @@ struct coda_remove_out { ...@@ -510,8 +496,8 @@ struct coda_remove_out {
/* coda_link: NO_OUT */ /* coda_link: NO_OUT */
struct coda_link_in { struct coda_link_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid sourceFid; /* cnode to link *to* */ struct CodaFid sourceFid; /* cnode to link *to* */
ViceFid destFid; /* Directory in which to place link */ struct CodaFid destFid; /* Directory in which to place link */
int tname; /* Place holder for data. */ int tname; /* Place holder for data. */
}; };
...@@ -523,9 +509,9 @@ struct coda_link_out { ...@@ -523,9 +509,9 @@ struct coda_link_out {
/* coda_rename: NO_OUT */ /* coda_rename: NO_OUT */
struct coda_rename_in { struct coda_rename_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid sourceFid; struct CodaFid sourceFid;
int srcname; int srcname;
ViceFid destFid; struct CodaFid destFid;
int destname; int destname;
}; };
...@@ -536,14 +522,14 @@ struct coda_rename_out { ...@@ -536,14 +522,14 @@ struct coda_rename_out {
/* coda_mkdir: */ /* coda_mkdir: */
struct coda_mkdir_in { struct coda_mkdir_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
struct coda_vattr attr; struct coda_vattr attr;
int name; /* Place holder for data. */ int name; /* Place holder for data. */
}; };
struct coda_mkdir_out { struct coda_mkdir_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid VFid; struct CodaFid VFid;
struct coda_vattr attr; struct coda_vattr attr;
}; };
...@@ -551,7 +537,7 @@ struct coda_mkdir_out { ...@@ -551,7 +537,7 @@ struct coda_mkdir_out {
/* coda_rmdir: NO_OUT */ /* coda_rmdir: NO_OUT */
struct coda_rmdir_in { struct coda_rmdir_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int name; /* Place holder for data. */ int name; /* Place holder for data. */
}; };
...@@ -562,7 +548,7 @@ struct coda_rmdir_out { ...@@ -562,7 +548,7 @@ struct coda_rmdir_out {
/* coda_symlink: NO_OUT */ /* coda_symlink: NO_OUT */
struct coda_symlink_in { struct coda_symlink_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; /* Directory to put symlink in */ struct CodaFid VFid; /* Directory to put symlink in */
int srcname; int srcname;
struct coda_vattr attr; struct coda_vattr attr;
int tname; int tname;
...@@ -575,7 +561,7 @@ struct coda_symlink_out { ...@@ -575,7 +561,7 @@ struct coda_symlink_out {
/* coda_readlink: */ /* coda_readlink: */
struct coda_readlink_in { struct coda_readlink_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
}; };
struct coda_readlink_out { struct coda_readlink_out {
...@@ -588,7 +574,7 @@ struct coda_readlink_out { ...@@ -588,7 +574,7 @@ struct coda_readlink_out {
/* coda_fsync: NO_OUT */ /* coda_fsync: NO_OUT */
struct coda_fsync_in { struct coda_fsync_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
}; };
struct coda_fsync_out { struct coda_fsync_out {
...@@ -598,12 +584,12 @@ struct coda_fsync_out { ...@@ -598,12 +584,12 @@ struct coda_fsync_out {
/* coda_vget: */ /* coda_vget: */
struct coda_vget_in { struct coda_vget_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
}; };
struct coda_vget_out { struct coda_vget_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid VFid; struct CodaFid VFid;
int vtype; int vtype;
}; };
...@@ -623,35 +609,35 @@ struct coda_purgeuser_out { ...@@ -623,35 +609,35 @@ struct coda_purgeuser_out {
/* CODA_ZAPFILE is a venus->kernel call */ /* CODA_ZAPFILE is a venus->kernel call */
struct coda_zapfile_out { struct coda_zapfile_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid CodaFid; struct CodaFid CodaFid;
}; };
/* coda_zapdir: */ /* coda_zapdir: */
/* CODA_ZAPDIR is a venus->kernel call */ /* CODA_ZAPDIR is a venus->kernel call */
struct coda_zapdir_out { struct coda_zapdir_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid CodaFid; struct CodaFid CodaFid;
}; };
/* coda_purgefid: */ /* coda_purgefid: */
/* CODA_PURGEFID is a venus->kernel call */ /* CODA_PURGEFID is a venus->kernel call */
struct coda_purgefid_out { struct coda_purgefid_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid CodaFid; struct CodaFid CodaFid;
}; };
/* coda_replace: */ /* coda_replace: */
/* CODA_REPLACE is a venus->kernel call */ /* CODA_REPLACE is a venus->kernel call */
struct coda_replace_out { /* coda_replace is a venus->kernel call */ struct coda_replace_out { /* coda_replace is a venus->kernel call */
struct coda_out_hdr oh; struct coda_out_hdr oh;
ViceFid NewFid; struct CodaFid NewFid;
ViceFid OldFid; struct CodaFid OldFid;
}; };
/* coda_open_by_fd: */ /* coda_open_by_fd: */
struct coda_open_by_fd_in { struct coda_open_by_fd_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int flags; int flags;
}; };
...@@ -667,7 +653,7 @@ struct coda_open_by_fd_out { ...@@ -667,7 +653,7 @@ struct coda_open_by_fd_out {
/* coda_open_by_path: */ /* coda_open_by_path: */
struct coda_open_by_path_in { struct coda_open_by_path_in {
struct coda_in_hdr ih; struct coda_in_hdr ih;
ViceFid VFid; struct CodaFid VFid;
int flags; int flags;
}; };
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* coda fs inode data * coda fs inode data
*/ */
struct coda_inode_info { struct coda_inode_info {
struct ViceFid c_fid; /* Coda identifier */ struct CodaFid c_fid; /* Coda identifier */
u_short c_flags; /* flags (see below) */ u_short c_flags; /* flags (see below) */
struct list_head c_cilist; /* list of all coda inodes */ struct list_head c_cilist; /* list of all coda inodes */
unsigned int c_mapcount; /* nr of times this inode is mapped */ unsigned int c_mapcount; /* nr of times this inode is mapped */
...@@ -45,11 +45,11 @@ struct coda_file_info { ...@@ -45,11 +45,11 @@ struct coda_file_info {
#define C_DYING 0x4 /* from venus (which died) */ #define C_DYING 0x4 /* from venus (which died) */
#define C_PURGE 0x8 #define C_PURGE 0x8
int coda_cnode_make(struct inode **, struct ViceFid *, struct super_block *); int coda_cnode_make(struct inode **, struct CodaFid *, struct super_block *);
struct inode *coda_iget(struct super_block *sb, struct ViceFid *fid, struct coda_vattr *attr); struct inode *coda_iget(struct super_block *sb, struct CodaFid *fid, struct coda_vattr *attr);
int coda_cnode_makectl(struct inode **inode, struct super_block *sb); int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb); struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb);
void coda_replace_fid(struct inode *, ViceFid *, ViceFid *); void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *);
#endif #endif
#endif #endif
...@@ -47,10 +47,10 @@ int coda_setattr(struct dentry *, struct iattr *); ...@@ -47,10 +47,10 @@ int coda_setattr(struct dentry *, struct iattr *);
extern int coda_fake_statfs; extern int coda_fake_statfs;
/* this file: heloers */ /* this file: heloers */
static __inline__ struct ViceFid *coda_i2f(struct inode *); static __inline__ struct CodaFid *coda_i2f(struct inode *);
static __inline__ char *coda_i2s(struct inode *); static __inline__ char *coda_i2s(struct inode *);
static __inline__ void coda_flag_inode(struct inode *, int flag); static __inline__ void coda_flag_inode(struct inode *, int flag);
char *coda_f2s(ViceFid *f); char *coda_f2s(struct CodaFid *f);
int coda_isroot(struct inode *i); int coda_isroot(struct inode *i);
int coda_iscontrol(const char *name, size_t length); int coda_iscontrol(const char *name, size_t length);
...@@ -83,7 +83,7 @@ static inline struct coda_inode_info *ITOC(struct inode *inode) ...@@ -83,7 +83,7 @@ static inline struct coda_inode_info *ITOC(struct inode *inode)
return list_entry(inode, struct coda_inode_info, vfs_inode); return list_entry(inode, struct coda_inode_info, vfs_inode);
} }
static __inline__ struct ViceFid *coda_i2f(struct inode *inode) static __inline__ struct CodaFid *coda_i2f(struct inode *inode)
{ {
return &(ITOC(inode)->c_fid); return &(ITOC(inode)->c_fid);
} }
......
...@@ -31,44 +31,45 @@ static inline struct coda_sb_info *coda_sbp(struct super_block *sb) ...@@ -31,44 +31,45 @@ static inline struct coda_sb_info *coda_sbp(struct super_block *sb)
/* upcalls */ /* upcalls */
int venus_rootfid(struct super_block *sb, ViceFid *fidp); int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
int venus_getattr(struct super_block *sb, struct ViceFid *fid, int venus_getattr(struct super_block *sb, struct CodaFid *fid,
struct coda_vattr *attr); struct coda_vattr *attr);
int venus_setattr(struct super_block *, struct ViceFid *, int venus_setattr(struct super_block *, struct CodaFid *, struct coda_vattr *);
struct coda_vattr *); int venus_lookup(struct super_block *sb, struct CodaFid *fid,
int venus_lookup(struct super_block *sb, struct ViceFid *fid, const char *name, int length, int *type,
const char *name, int length, int *type, struct CodaFid *resfid);
struct ViceFid *resfid); int venus_store(struct super_block *sb, struct CodaFid *fid, int flags,
int venus_store(struct super_block *sb, struct ViceFid *fid, int flags, vuid_t uid); vuid_t uid);
int venus_release(struct super_block *sb, struct ViceFid *fid, int flags); int venus_release(struct super_block *sb, struct CodaFid *fid, int flags);
int venus_close(struct super_block *sb, struct ViceFid *fid, int flags, vuid_t uid); int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
int venus_open(struct super_block *sb, struct ViceFid *fid, vuid_t uid);
int flags, struct file **f); int venus_open(struct super_block *sb, struct CodaFid *fid, int flags,
int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid, struct file **f);
int venus_mkdir(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length, const char *name, int length,
struct ViceFid *newfid, struct coda_vattr *attrs); struct CodaFid *newfid, struct coda_vattr *attrs);
int venus_create(struct super_block *sb, struct ViceFid *dirfid, int venus_create(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length, int excl, int mode, dev_t rdev, const char *name, int length, int excl, int mode, dev_t rdev,
struct ViceFid *newfid, struct coda_vattr *attrs) ; struct CodaFid *newfid, struct coda_vattr *attrs) ;
int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid, int venus_rmdir(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length); const char *name, int length);
int venus_remove(struct super_block *sb, struct ViceFid *dirfid, int venus_remove(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length); const char *name, int length);
int venus_readlink(struct super_block *sb, struct ViceFid *fid, int venus_readlink(struct super_block *sb, struct CodaFid *fid,
char *buffer, int *length); char *buffer, int *length);
int venus_rename(struct super_block *, struct ViceFid *new_fid, int venus_rename(struct super_block *, struct CodaFid *new_fid,
struct ViceFid *old_fid, size_t old_length, struct CodaFid *old_fid, size_t old_length,
size_t new_length, const char *old_name, size_t new_length, const char *old_name,
const char *new_name); const char *new_name);
int venus_link(struct super_block *sb, struct ViceFid *fid, int venus_link(struct super_block *sb, struct CodaFid *fid,
struct ViceFid *dirfid, const char *name, int len ); struct CodaFid *dirfid, const char *name, int len );
int venus_symlink(struct super_block *sb, struct ViceFid *fid, int venus_symlink(struct super_block *sb, struct CodaFid *fid,
const char *name, int len, const char *symname, int symlen); const char *name, int len, const char *symname, int symlen);
int venus_access(struct super_block *sb, struct ViceFid *fid, int mask); int venus_access(struct super_block *sb, struct CodaFid *fid, int mask);
int venus_pioctl(struct super_block *sb, struct ViceFid *fid, int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
unsigned int cmd, struct PioctlData *data); unsigned int cmd, struct PioctlData *data);
int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb); int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb);
int venus_fsync(struct super_block *sb, struct ViceFid *fid); int venus_fsync(struct super_block *sb, struct CodaFid *fid);
int venus_statfs(struct super_block *sb, struct kstatfs *sfs); int venus_statfs(struct super_block *sb, struct kstatfs *sfs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment