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 @@
#include <linux/coda_fs_i.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;
}
......@@ -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)
{
ViceFid *fid = (ViceFid *)data;
struct CodaFid *fid = (struct CodaFid *)data;
return coda_fideq(&(ITOC(inode)->c_fid), fid);
}
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;
return 0;
}
......@@ -59,7 +59,7 @@ static int coda_fail_inode(struct inode *inode, void *data)
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 inode *inode;
......@@ -90,7 +90,7 @@ struct inode * coda_iget(struct super_block * sb, ViceFid * fid,
- link the two up if this is needed
- 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;
int error;
......@@ -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,
struct ViceFid *newfid)
void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid,
struct CodaFid *newfid)
{
struct coda_inode_info *cii;
unsigned long hash = coda_f2i(newfid);
......@@ -131,7 +131,7 @@ void coda_replace_fid(struct inode *inode, struct ViceFid *oldfid,
}
/* 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;
unsigned long hash = coda_f2i(fid);
......
......@@ -25,10 +25,10 @@
int coda_fake_statfs;
/* print a fid */
char * coda_f2s(ViceFid *f)
char * coda_f2s(struct CodaFid *f)
{
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;
}
......
......@@ -93,7 +93,7 @@ struct file_operations coda_dir_operations = {
static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, struct nameidata *nd)
{
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 type = 0;
int error = 0;
......@@ -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;
int length=de->d_name.len;
struct inode *inode;
struct ViceFid newfid;
struct CodaFid newfid;
struct coda_vattr attrs;
lock_kernel();
......@@ -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;
int length=de->d_name.len;
struct inode *inode;
struct ViceFid newfid;
struct CodaFid newfid;
struct coda_vattr attrs;
if ( coda_hasmknod == 0 )
......@@ -283,7 +283,7 @@ static int coda_mkdir(struct inode *dir, struct dentry *de, int mode)
const char *name = de->d_name.name;
int len = de->d_name.len;
int error;
struct ViceFid newfid;
struct CodaFid newfid;
lock_kernel();
coda_vfs_stat.mkdir++;
......
......@@ -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);
if (!ei)
return NULL;
memset(&ei->c_fid, 0, sizeof(struct ViceFid));
memset(&ei->c_fid, 0, sizeof(struct CodaFid));
ei->c_flags = 0;
ei->c_uid = 0;
ei->c_cached_perm = 0;
......@@ -138,7 +138,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
struct inode *root = 0;
struct coda_sb_info *sbi = NULL;
struct venus_comm *vc = NULL;
ViceFid fid;
struct CodaFid fid;
int error;
int idx;
......
......@@ -75,7 +75,7 @@ do {\
/* 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 outputArgs *outp;
......@@ -89,14 +89,14 @@ int venus_rootfid(struct super_block *sb, ViceFid *fidp)
if (error) {
printk("coda_get_rootfid: error %d\n", error);
} else {
*fidp = (ViceFid) outp->coda_root.VFid;
*fidp = outp->coda_root.VFid;
}
CODA_FREE(inp, insize);
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)
{
union inputArgs *inp;
......@@ -115,7 +115,7 @@ int venus_getattr(struct super_block *sb, struct ViceFid *fid,
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)
{
union inputArgs *inp;
......@@ -134,9 +134,9 @@ int venus_setattr(struct super_block *sb, struct ViceFid *fid,
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,
struct ViceFid *resfid)
struct CodaFid *resfid)
{
union inputArgs *inp;
union outputArgs *outp;
......@@ -163,7 +163,7 @@ int venus_lookup(struct super_block *sb, struct ViceFid *fid,
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)
{
union inputArgs *inp;
......@@ -186,7 +186,7 @@ int venus_store(struct super_block *sb, struct ViceFid *fid, int flags,
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 outputArgs *outp;
......@@ -204,7 +204,7 @@ int venus_release(struct super_block *sb, struct ViceFid *fid, int flags)
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)
{
union inputArgs *inp;
......@@ -227,7 +227,7 @@ int venus_close(struct super_block *sb, struct ViceFid *fid, int flags,
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)
{
union inputArgs *inp;
......@@ -248,9 +248,9 @@ int venus_open(struct super_block *sb, struct ViceFid *fid,
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,
struct ViceFid *newfid, struct coda_vattr *attrs)
struct CodaFid *newfid, struct coda_vattr *attrs)
{
union inputArgs *inp;
union outputArgs *outp;
......@@ -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,
struct ViceFid *new_fid, size_t old_length,
int venus_rename(struct super_block *sb, struct CodaFid *old_fid,
struct CodaFid *new_fid, size_t old_length,
size_t new_length, const char *old_name,
const char *new_name)
{
......@@ -315,9 +315,9 @@ int venus_rename(struct super_block *sb, struct ViceFid *old_fid,
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,
struct ViceFid *newfid, struct coda_vattr *attrs)
struct CodaFid *newfid, struct coda_vattr *attrs)
{
union inputArgs *inp;
union outputArgs *outp;
......@@ -348,7 +348,7 @@ int venus_create(struct super_block *sb, struct ViceFid *dirfid,
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)
{
union inputArgs *inp;
......@@ -371,7 +371,7 @@ int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid,
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)
{
union inputArgs *inp;
......@@ -393,7 +393,7 @@ int venus_remove(struct super_block *sb, struct ViceFid *dirfid,
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)
{
union inputArgs *inp;
......@@ -426,8 +426,8 @@ int venus_readlink(struct super_block *sb, struct ViceFid *fid,
int venus_link(struct super_block *sb, struct ViceFid *fid,
struct ViceFid *dirfid, const char *name, int len )
int venus_link(struct super_block *sb, struct CodaFid *fid,
struct CodaFid *dirfid, const char *name, int len )
{
union inputArgs *inp;
union outputArgs *outp;
......@@ -452,7 +452,7 @@ int venus_link(struct super_block *sb, struct ViceFid *fid,
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 *symname, int symlen)
{
......@@ -487,7 +487,7 @@ int venus_symlink(struct super_block *sb, struct ViceFid *fid,
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 outputArgs *outp;
......@@ -504,7 +504,7 @@ int venus_fsync(struct super_block *sb, struct ViceFid *fid)
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 outputArgs *outp;
......@@ -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)
{
union inputArgs *inp;
......@@ -813,7 +813,7 @@ static int coda_upcall(struct coda_sb_info *sbi,
* The last allows Venus to replace local fids with global ones
* 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)
{
......@@ -837,7 +837,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_ZAPDIR : {
struct inode *inode;
ViceFid *fid = &out->coda_zapdir.CodaFid;
struct CodaFid *fid = &out->coda_zapdir.CodaFid;
inode = coda_fid_to_inode(fid, sb);
if (inode) {
......@@ -851,7 +851,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_ZAPFILE : {
struct inode *inode;
struct ViceFid *fid = &out->coda_zapfile.CodaFid;
struct CodaFid *fid = &out->coda_zapfile.CodaFid;
inode = coda_fid_to_inode(fid, sb);
if ( inode ) {
coda_flag_inode(inode, C_VATTR);
......@@ -862,7 +862,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_PURGEFID : {
struct inode *inode;
ViceFid *fid = &out->coda_purgefid.CodaFid;
struct CodaFid *fid = &out->coda_purgefid.CodaFid;
inode = coda_fid_to_inode(fid, sb);
if ( inode ) {
coda_flag_inode_children(inode, C_PURGE);
......@@ -878,8 +878,8 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CODA_REPLACE : {
struct inode *inode;
ViceFid *oldfid = &out->coda_replace.OldFid;
ViceFid *newfid = &out->coda_replace.NewFid;
struct CodaFid *oldfid = &out->coda_replace.OldFid;
struct CodaFid *newfid = &out->coda_replace.NewFid;
inode = coda_fid_to_inode(oldfid, sb);
if ( inode ) {
coda_replace_fid(inode, oldfid, newfid);
......
......@@ -194,38 +194,24 @@ struct venus_dirent {
#endif
#ifndef _FID_T_
#define _FID_T_ 1
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 */
struct CodaFid {
u_int32_t opaque[3];
};
#ifdef __linux__
static __inline__ ino_t coda_f2i(struct ViceFid *fid)
static __inline__ ino_t coda_f2i(struct CodaFid *fid)
{
if ( ! fid )
return 0;
if (fid->Vnode == 0xfffffffe || fid->Vnode == 0xffffffff)
return ((fid->Volume << 20) | (fid->Unique & 0xfffff));
if (fid->opaque[1] == 0xfffffffe || fid->opaque[1] == 0xffffffff)
return ((fid->opaque[0] << 20) | (fid->opaque[2] & 0xfffff));
else
return (fid->Unique + (fid->Vnode<<10) + (fid->Volume<<20));
return (fid->opaque[2] + (fid->opaque[1]<<10) + (fid->opaque[0]<<20));
}
#else
#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
......@@ -239,7 +225,7 @@ typedef u_int32_t vgid_t;
#define _CODACRED_T_
struct coda_cred {
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
......@@ -354,7 +340,7 @@ struct coda_out_hdr {
/* coda_root: NO_IN */
struct coda_root_out {
struct coda_out_hdr oh;
ViceFid VFid;
struct CodaFid VFid;
};
struct coda_root_in {
......@@ -364,7 +350,7 @@ struct coda_root_in {
/* coda_open: */
struct coda_open_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int flags;
};
......@@ -378,7 +364,7 @@ struct coda_open_out {
/* coda_store: */
struct coda_store_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int flags;
};
......@@ -389,7 +375,7 @@ struct coda_store_out {
/* coda_release: */
struct coda_release_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int flags;
};
......@@ -400,7 +386,7 @@ struct coda_release_out {
/* coda_close: */
struct coda_close_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int flags;
};
......@@ -411,7 +397,7 @@ struct coda_close_out {
/* coda_ioctl: */
struct coda_ioctl_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int cmd;
int len;
int rwflag;
......@@ -428,7 +414,7 @@ struct coda_ioctl_out {
/* coda_getattr: */
struct coda_getattr_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
};
struct coda_getattr_out {
......@@ -440,7 +426,7 @@ struct coda_getattr_out {
/* coda_setattr: NO_OUT */
struct coda_setattr_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
struct coda_vattr attr;
};
......@@ -451,7 +437,7 @@ struct coda_setattr_out {
/* coda_access: NO_OUT */
struct coda_access_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int flags;
};
......@@ -467,14 +453,14 @@ struct coda_access_out {
/* coda_lookup: */
struct coda_lookup_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int name; /* Place holder for data. */
int flags;
};
struct coda_lookup_out {
struct coda_out_hdr oh;
ViceFid VFid;
struct CodaFid VFid;
int vtype;
};
......@@ -482,7 +468,7 @@ struct coda_lookup_out {
/* coda_create: */
struct coda_create_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
struct coda_vattr attr;
int excl;
int mode;
......@@ -491,7 +477,7 @@ struct coda_create_in {
struct coda_create_out {
struct coda_out_hdr oh;
ViceFid VFid;
struct CodaFid VFid;
struct coda_vattr attr;
};
......@@ -499,7 +485,7 @@ struct coda_create_out {
/* coda_remove: NO_OUT */
struct coda_remove_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int name; /* Place holder for data. */
};
......@@ -510,8 +496,8 @@ struct coda_remove_out {
/* coda_link: NO_OUT */
struct coda_link_in {
struct coda_in_hdr ih;
ViceFid sourceFid; /* cnode to link *to* */
ViceFid destFid; /* Directory in which to place link */
struct CodaFid sourceFid; /* cnode to link *to* */
struct CodaFid destFid; /* Directory in which to place link */
int tname; /* Place holder for data. */
};
......@@ -523,9 +509,9 @@ struct coda_link_out {
/* coda_rename: NO_OUT */
struct coda_rename_in {
struct coda_in_hdr ih;
ViceFid sourceFid;
struct CodaFid sourceFid;
int srcname;
ViceFid destFid;
struct CodaFid destFid;
int destname;
};
......@@ -536,14 +522,14 @@ struct coda_rename_out {
/* coda_mkdir: */
struct coda_mkdir_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
struct coda_vattr attr;
int name; /* Place holder for data. */
};
struct coda_mkdir_out {
struct coda_out_hdr oh;
ViceFid VFid;
struct CodaFid VFid;
struct coda_vattr attr;
};
......@@ -551,7 +537,7 @@ struct coda_mkdir_out {
/* coda_rmdir: NO_OUT */
struct coda_rmdir_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int name; /* Place holder for data. */
};
......@@ -562,7 +548,7 @@ struct coda_rmdir_out {
/* coda_symlink: NO_OUT */
struct coda_symlink_in {
struct coda_in_hdr ih;
ViceFid VFid; /* Directory to put symlink in */
struct CodaFid VFid; /* Directory to put symlink in */
int srcname;
struct coda_vattr attr;
int tname;
......@@ -575,7 +561,7 @@ struct coda_symlink_out {
/* coda_readlink: */
struct coda_readlink_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
};
struct coda_readlink_out {
......@@ -588,7 +574,7 @@ struct coda_readlink_out {
/* coda_fsync: NO_OUT */
struct coda_fsync_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
};
struct coda_fsync_out {
......@@ -598,12 +584,12 @@ struct coda_fsync_out {
/* coda_vget: */
struct coda_vget_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
};
struct coda_vget_out {
struct coda_out_hdr oh;
ViceFid VFid;
struct CodaFid VFid;
int vtype;
};
......@@ -623,35 +609,35 @@ struct coda_purgeuser_out {
/* CODA_ZAPFILE is a venus->kernel call */
struct coda_zapfile_out {
struct coda_out_hdr oh;
ViceFid CodaFid;
struct CodaFid CodaFid;
};
/* coda_zapdir: */
/* CODA_ZAPDIR is a venus->kernel call */
struct coda_zapdir_out {
struct coda_out_hdr oh;
ViceFid CodaFid;
struct CodaFid CodaFid;
};
/* coda_purgefid: */
/* CODA_PURGEFID is a venus->kernel call */
struct coda_purgefid_out {
struct coda_out_hdr oh;
ViceFid CodaFid;
struct CodaFid CodaFid;
};
/* coda_replace: */
/* CODA_REPLACE is a venus->kernel call */
struct coda_replace_out { /* coda_replace is a venus->kernel call */
struct coda_out_hdr oh;
ViceFid NewFid;
ViceFid OldFid;
struct CodaFid NewFid;
struct CodaFid OldFid;
};
/* coda_open_by_fd: */
struct coda_open_by_fd_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int flags;
};
......@@ -667,7 +653,7 @@ struct coda_open_by_fd_out {
/* coda_open_by_path: */
struct coda_open_by_path_in {
struct coda_in_hdr ih;
ViceFid VFid;
struct CodaFid VFid;
int flags;
};
......
......@@ -17,7 +17,7 @@
* coda fs inode data
*/
struct coda_inode_info {
struct ViceFid c_fid; /* Coda identifier */
struct CodaFid c_fid; /* Coda identifier */
u_short c_flags; /* flags (see below) */
struct list_head c_cilist; /* list of all coda inodes */
unsigned int c_mapcount; /* nr of times this inode is mapped */
......@@ -45,11 +45,11 @@ struct coda_file_info {
#define C_DYING 0x4 /* from venus (which died) */
#define C_PURGE 0x8
int coda_cnode_make(struct inode **, struct ViceFid *, struct super_block *);
struct inode *coda_iget(struct super_block *sb, struct ViceFid *fid, struct coda_vattr *attr);
int coda_cnode_make(struct inode **, struct CodaFid *, struct super_block *);
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);
struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb);
void coda_replace_fid(struct inode *, ViceFid *, ViceFid *);
struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb);
void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *);
#endif
#endif
......@@ -47,10 +47,10 @@ int coda_setattr(struct dentry *, struct iattr *);
extern int coda_fake_statfs;
/* 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__ 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_iscontrol(const char *name, size_t length);
......@@ -83,7 +83,7 @@ static inline struct coda_inode_info *ITOC(struct inode *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);
}
......
......@@ -31,44 +31,45 @@ static inline struct coda_sb_info *coda_sbp(struct super_block *sb)
/* upcalls */
int venus_rootfid(struct super_block *sb, ViceFid *fidp);
int venus_getattr(struct super_block *sb, struct ViceFid *fid,
struct coda_vattr *attr);
int venus_setattr(struct super_block *, struct ViceFid *,
struct coda_vattr *);
int venus_lookup(struct super_block *sb, struct ViceFid *fid,
const char *name, int length, int *type,
struct ViceFid *resfid);
int venus_store(struct super_block *sb, struct ViceFid *fid, int flags, vuid_t uid);
int venus_release(struct super_block *sb, struct ViceFid *fid, int flags);
int venus_close(struct super_block *sb, struct ViceFid *fid, int flags, vuid_t uid);
int venus_open(struct super_block *sb, struct ViceFid *fid,
int flags, struct file **f);
int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid,
int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
int venus_getattr(struct super_block *sb, struct CodaFid *fid,
struct coda_vattr *attr);
int venus_setattr(struct super_block *, struct CodaFid *, struct coda_vattr *);
int venus_lookup(struct super_block *sb, struct CodaFid *fid,
const char *name, int length, int *type,
struct CodaFid *resfid);
int venus_store(struct super_block *sb, struct CodaFid *fid, int flags,
vuid_t uid);
int venus_release(struct super_block *sb, struct CodaFid *fid, int flags);
int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
vuid_t uid);
int venus_open(struct super_block *sb, struct CodaFid *fid, int flags,
struct file **f);
int venus_mkdir(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length,
struct ViceFid *newfid, struct coda_vattr *attrs);
int venus_create(struct super_block *sb, struct ViceFid *dirfid,
struct CodaFid *newfid, struct coda_vattr *attrs);
int venus_create(struct super_block *sb, struct CodaFid *dirfid,
const char *name, int length, int excl, int mode, dev_t rdev,
struct ViceFid *newfid, struct coda_vattr *attrs) ;
int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid,
struct CodaFid *newfid, struct coda_vattr *attrs) ;
int venus_rmdir(struct super_block *sb, struct CodaFid *dirfid,
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);
int venus_readlink(struct super_block *sb, struct ViceFid *fid,
int venus_readlink(struct super_block *sb, struct CodaFid *fid,
char *buffer, int *length);
int venus_rename(struct super_block *, struct ViceFid *new_fid,
struct ViceFid *old_fid, size_t old_length,
int venus_rename(struct super_block *, struct CodaFid *new_fid,
struct CodaFid *old_fid, size_t old_length,
size_t new_length, const char *old_name,
const char *new_name);
int venus_link(struct super_block *sb, struct ViceFid *fid,
struct ViceFid *dirfid, const char *name, int len );
int venus_symlink(struct super_block *sb, struct ViceFid *fid,
int venus_link(struct super_block *sb, struct CodaFid *fid,
struct CodaFid *dirfid, const char *name, int len );
int venus_symlink(struct super_block *sb, struct CodaFid *fid,
const char *name, int len, const char *symname, int symlen);
int venus_access(struct super_block *sb, struct ViceFid *fid, int mask);
int venus_pioctl(struct super_block *sb, struct ViceFid *fid,
int venus_access(struct super_block *sb, struct CodaFid *fid, int mask);
int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
unsigned int cmd, struct PioctlData *data);
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);
......
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