Commit 50a02d70 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.5

into laptop.osdl.org:/home/torvalds/v2.5/linux
parents 793ca9b7 d7d65a95
...@@ -1562,6 +1562,20 @@ config CODA_FS ...@@ -1562,6 +1562,20 @@ config CODA_FS
whenever you want), say M here and read whenever you want), say M here and read
<file:Documentation/modules.txt>. The module will be called coda. <file:Documentation/modules.txt>. The module will be called coda.
config CODA_FS_OLD_API
bool "Use 96-bit Coda file identifiers"
depends on CODA_FS
help
A new kernel-userspace API had to be introduced for Coda v6.0
to support larger 128-bit file identifiers as needed by the
new realms implementation.
However this new API is not backward compatible with older
clients. If you really need to run the old Coda userspace
cache manager then say Y.
For most cases you probably want to say N.
config INTERMEZZO_FS config INTERMEZZO_FS
tristate "InterMezzo file system support (replicating fs) (EXPERIMENTAL)" tristate "InterMezzo file system support (replicating fs) (EXPERIMENTAL)"
depends on INET && EXPERIMENTAL depends on INET && EXPERIMENTAL
......
...@@ -23,13 +23,16 @@ ...@@ -23,13 +23,16 @@
#include <linux/coda_fs_i.h> #include <linux/coda_fs_i.h>
#include <linux/coda_cache.h> #include <linux/coda_cache.h>
static atomic_t permission_epoch = ATOMIC_INIT(0);
/* replace or extend an acl cache hit */ /* replace or extend an acl cache hit */
void coda_cache_enter(struct inode *inode, int mask) void coda_cache_enter(struct inode *inode, int mask)
{ {
struct coda_inode_info *cii = ITOC(inode); struct coda_inode_info *cii = ITOC(inode);
if ( !coda_cred_ok(&cii->c_cached_cred) ) { cii->c_cached_epoch = atomic_read(&permission_epoch);
coda_load_creds(&cii->c_cached_cred); if (cii->c_uid != current->fsuid) {
cii->c_uid = current->fsuid;
cii->c_cached_perm = mask; cii->c_cached_perm = mask;
} else } else
cii->c_cached_perm |= mask; cii->c_cached_perm |= mask;
...@@ -42,22 +45,15 @@ void coda_cache_clear_inode(struct inode *inode) ...@@ -42,22 +45,15 @@ void coda_cache_clear_inode(struct inode *inode)
cii->c_cached_perm = 0; cii->c_cached_perm = 0;
} }
/* remove all acl caches for a principal (or all principals when cred == NULL)*/ /* remove all acl caches */
void coda_cache_clear_all(struct super_block *sb, struct coda_cred *cred) void coda_cache_clear_all(struct super_block *sb)
{ {
struct coda_sb_info *sbi; struct coda_sb_info *sbi;
struct coda_inode_info *cii;
struct list_head *tmp;
sbi = coda_sbp(sb); sbi = coda_sbp(sb);
if (!sbi) BUG(); if (!sbi) BUG();
list_for_each(tmp, &sbi->sbi_cihead) atomic_inc(&permission_epoch);
{
cii = list_entry(tmp, struct coda_inode_info, c_cilist);
if (!cred || coda_cred_eq(cred, &cii->c_cached_cred))
cii->c_cached_perm = 0;
}
} }
...@@ -67,8 +63,9 @@ int coda_cache_check(struct inode *inode, int mask) ...@@ -67,8 +63,9 @@ int coda_cache_check(struct inode *inode, int mask)
struct coda_inode_info *cii = ITOC(inode); struct coda_inode_info *cii = ITOC(inode);
int hit; int hit;
hit = ((mask & cii->c_cached_perm) == mask) && hit = (mask & cii->c_cached_perm) == mask &&
coda_cred_ok(&cii->c_cached_cred); cii->c_uid == current->fsuid &&
cii->c_cached_epoch == atomic_read(&permission_epoch);
return hit; return hit;
} }
......
...@@ -11,18 +11,9 @@ ...@@ -11,18 +11,9 @@
#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)
{ {
if (fid1->Vnode != fid2->Vnode) return 0; return memcmp(fid1, fid2, sizeof(*fid1)) == 0;
if (fid1->Volume != fid2->Volume) return 0;
if (fid1->Unique != fid2->Unique) return 0;
return 1;
}
inline int coda_isnullfid(ViceFid *fid)
{
if (fid->Vnode || fid->Volume || fid->Unique) return 0;
return 1;
} }
static struct inode_operations coda_symlink_inode_operations = { static struct inode_operations coda_symlink_inode_operations = {
...@@ -52,13 +43,13 @@ static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr) ...@@ -52,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;
} }
...@@ -68,12 +59,11 @@ static int coda_fail_inode(struct inode *inode, void *data) ...@@ -68,12 +59,11 @@ 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;
struct coda_inode_info *cii; struct coda_inode_info *cii;
struct coda_sb_info *sbi = coda_sbp(sb);
unsigned long hash = coda_f2i(fid); unsigned long hash = coda_f2i(fid);
inode = iget5_locked(sb, hash, coda_test_inode, coda_set_inode, fid); inode = iget5_locked(sb, hash, coda_test_inode, coda_set_inode, fid);
...@@ -86,7 +76,6 @@ struct inode * coda_iget(struct super_block * sb, ViceFid * fid, ...@@ -86,7 +76,6 @@ struct inode * coda_iget(struct super_block * sb, ViceFid * fid,
/* we still need to set i_ino for things like stat(2) */ /* we still need to set i_ino for things like stat(2) */
inode->i_ino = hash; inode->i_ino = hash;
cii->c_mapcount = 0; cii->c_mapcount = 0;
list_add(&cii->c_cilist, &sbi->sbi_cihead);
unlock_new_inode(inode); unlock_new_inode(inode);
} }
...@@ -101,7 +90,7 @@ struct inode * coda_iget(struct super_block * sb, ViceFid * fid, ...@@ -101,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;
...@@ -122,8 +111,8 @@ int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb) ...@@ -122,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);
...@@ -142,7 +131,7 @@ void coda_replace_fid(struct inode *inode, struct ViceFid *oldfid, ...@@ -142,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,14 @@ ...@@ -25,10 +25,14 @@
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, "(%-#lx.%-#lx.%-#lx)", f->Volume, f->Vnode, f->Unique); #ifdef CODA_FS_OLD_API
sprintf(s, "(%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2]);
#else
sprintf(s, "(%08x.%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2], f->opaque[3]);
#endif
return s; return s;
} }
...@@ -45,30 +49,6 @@ int coda_isroot(struct inode *i) ...@@ -45,30 +49,6 @@ int coda_isroot(struct inode *i)
return ( i->i_sb->s_root->d_inode == i ); return ( i->i_sb->s_root->d_inode == i );
} }
/* put the current process credentials in the cred */
void coda_load_creds(struct coda_cred *cred)
{
cred->cr_uid = (vuid_t) current->uid;
cred->cr_euid = (vuid_t) current->euid;
cred->cr_suid = (vuid_t) current->suid;
cred->cr_fsuid = (vuid_t) current->fsuid;
cred->cr_groupid = (vgid_t) current->gid;
cred->cr_egid = (vgid_t) current->egid;
cred->cr_sgid = (vgid_t) current->sgid;
cred->cr_fsgid = (vgid_t) current->fsgid;
}
int coda_cred_ok(struct coda_cred *cred)
{
return(current->fsuid == cred->cr_fsuid);
}
int coda_cred_eq(struct coda_cred *cred1, struct coda_cred *cred2)
{
return (cred1->cr_fsuid == cred2->cr_fsuid);
}
unsigned short coda_flags_to_cflags(unsigned short flags) unsigned short coda_flags_to_cflags(unsigned short flags)
{ {
unsigned short coda_flags = 0; unsigned short coda_flags = 0;
...@@ -215,58 +195,3 @@ void coda_iattr_to_vattr(struct iattr *iattr, struct coda_vattr *vattr) ...@@ -215,58 +195,3 @@ void coda_iattr_to_vattr(struct iattr *iattr, struct coda_vattr *vattr)
} }
} }
void print_vattr(struct coda_vattr *attr)
{
char *typestr;
switch (attr->va_type) {
case C_VNON:
typestr = "C_VNON";
break;
case C_VREG:
typestr = "C_VREG";
break;
case C_VDIR:
typestr = "C_VDIR";
break;
case C_VBLK:
typestr = "C_VBLK";
break;
case C_VCHR:
typestr = "C_VCHR";
break;
case C_VLNK:
typestr = "C_VLNK";
break;
case C_VSOCK:
typestr = "C_VSCK";
break;
case C_VFIFO:
typestr = "C_VFFO";
break;
case C_VBAD:
typestr = "C_VBAD";
break;
default:
typestr = "????";
break;
}
printk("attr: type %s (%o) mode %o uid %d gid %d rdev %d\n",
typestr, (int)attr->va_type, (int)attr->va_mode,
(int)attr->va_uid, (int)attr->va_gid, (int)attr->va_rdev);
printk(" fileid %d nlink %d size %d blocksize %d bytes %d\n",
(int)attr->va_fileid, (int)attr->va_nlink,
(int)attr->va_size,
(int)attr->va_blocksize,(int)attr->va_bytes);
printk(" gen %ld flags %ld\n",
attr->va_gen, attr->va_flags);
printk(" atime sec %d nsec %d\n",
(int)attr->va_atime.tv_sec, (int)attr->va_atime.tv_nsec);
printk(" mtime sec %d nsec %d\n",
(int)attr->va_mtime.tv_sec, (int)attr->va_mtime.tv_nsec);
printk(" ctime sec %d nsec %d\n",
(int)attr->va_ctime.tv_sec, (int)attr->va_ctime.tv_nsec);
}
...@@ -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++;
...@@ -588,8 +588,7 @@ static int coda_venus_readdir(struct file *filp, filldir_t filldir, ...@@ -588,8 +588,7 @@ static int coda_venus_readdir(struct file *filp, filldir_t filldir,
break; break;
} }
/* validate whether the directory file actually makes sense */ /* validate whether the directory file actually makes sense */
if (vdir->d_reclen < vdir_size + vdir->d_namlen || if (vdir->d_reclen < vdir_size + vdir->d_namlen) {
vdir->d_namlen > CODA_MAXNAMLEN) {
printk("coda_venus_readdir: Invalid dir: %ld\n", printk("coda_venus_readdir: Invalid dir: %ld\n",
filp->f_dentry->d_inode->i_ino); filp->f_dentry->d_inode->i_ino);
ret = -EBADF; ret = -EBADF;
......
...@@ -136,7 +136,6 @@ int coda_open(struct inode *coda_inode, struct file *coda_file) ...@@ -136,7 +136,6 @@ int coda_open(struct inode *coda_inode, struct file *coda_file)
cfi->cfi_magic = CODA_MAGIC; cfi->cfi_magic = CODA_MAGIC;
cfi->cfi_mapcount = 0; cfi->cfi_mapcount = 0;
cfi->cfi_container = host_file; cfi->cfi_container = host_file;
coda_load_creds(&cfi->cfi_cred);
BUG_ON(coda_file->private_data != NULL); BUG_ON(coda_file->private_data != NULL);
coda_file->private_data = cfi; coda_file->private_data = cfi;
...@@ -176,7 +175,7 @@ int coda_flush(struct file *coda_file) ...@@ -176,7 +175,7 @@ int coda_flush(struct file *coda_file)
coda_inode = coda_file->f_dentry->d_inode; coda_inode = coda_file->f_dentry->d_inode;
err = venus_store(coda_inode->i_sb, coda_i2f(coda_inode), coda_flags, err = venus_store(coda_inode->i_sb, coda_i2f(coda_inode), coda_flags,
&cfi->cfi_cred); coda_file->f_uid);
if (err == -EOPNOTSUPP) { if (err == -EOPNOTSUPP) {
use_coda_close = 1; use_coda_close = 1;
...@@ -214,7 +213,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file) ...@@ -214,7 +213,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
if (use_coda_close) if (use_coda_close)
err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode), err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
coda_flags, &cfi->cfi_cred); coda_flags, coda_file->f_uid);
host_inode = cfi->cfi_container->f_dentry->d_inode; host_inode = cfi->cfi_container->f_dentry->d_inode;
cii = ITOC(coda_inode); cii = ITOC(coda_inode);
......
...@@ -44,10 +44,9 @@ static struct inode *coda_alloc_inode(struct super_block *sb) ...@@ -44,10 +44,9 @@ 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;
INIT_LIST_HEAD(&ei->c_cilist); ei->c_uid = 0;
memset(&ei->c_cached_cred, 0, sizeof(struct coda_cred));
ei->c_cached_perm = 0; ei->c_cached_perm = 0;
return &ei->vfs_inode; return &ei->vfs_inode;
} }
...@@ -139,7 +138,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -139,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;
...@@ -169,9 +168,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -169,9 +168,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
vc->vc_sb = sb; vc->vc_sb = sb;
sbi->sbi_sb = sb;
sbi->sbi_vcomm = vc; sbi->sbi_vcomm = vc;
INIT_LIST_HEAD(&sbi->sbi_cihead);
sb->s_fs_info = sbi; sb->s_fs_info = sbi;
sb->s_blocksize = 1024; /* XXXXX what do we put here?? */ sb->s_blocksize = 1024; /* XXXXX what do we put here?? */
...@@ -218,7 +215,6 @@ static void coda_put_super(struct super_block *sb) ...@@ -218,7 +215,6 @@ static void coda_put_super(struct super_block *sb)
sbi = coda_sbp(sb); sbi = coda_sbp(sb);
sbi->sbi_vcomm->vc_sb = NULL; sbi->sbi_vcomm->vc_sb = NULL;
list_del_init(&sbi->sbi_cihead);
printk("Coda: Bye bye.\n"); printk("Coda: Bye bye.\n");
kfree(sbi); kfree(sbi);
...@@ -226,9 +222,6 @@ static void coda_put_super(struct super_block *sb) ...@@ -226,9 +222,6 @@ static void coda_put_super(struct super_block *sb)
static void coda_clear_inode(struct inode *inode) static void coda_clear_inode(struct inode *inode)
{ {
struct coda_inode_info *cii = ITOC(inode);
list_del_init(&cii->c_cilist);
coda_cache_clear_inode(inode); coda_cache_clear_inode(inode);
} }
......
...@@ -61,7 +61,6 @@ unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */ ...@@ -61,7 +61,6 @@ unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */
struct venus_comm coda_comms[MAX_CODADEVS]; struct venus_comm coda_comms[MAX_CODADEVS];
kmem_cache_t *cii_cache, *cred_cache, *upc_cache;
/* /*
* Device operations * Device operations
...@@ -126,13 +125,13 @@ static ssize_t coda_psdev_write(struct file *file, const char *buf, ...@@ -126,13 +125,13 @@ static ssize_t coda_psdev_write(struct file *file, const char *buf,
} }
if ( nbytes < sizeof(struct coda_out_hdr) ) { if ( nbytes < sizeof(struct coda_out_hdr) ) {
printk("coda_downcall opc %ld uniq %ld, not enough!\n", printk("coda_downcall opc %d uniq %d, not enough!\n",
hdr.opcode, hdr.unique); hdr.opcode, hdr.unique);
count = nbytes; count = nbytes;
goto out; goto out;
} }
if ( nbytes > size ) { if ( nbytes > size ) {
printk("Coda: downcall opc %ld, uniq %ld, too much!", printk("Coda: downcall opc %d, uniq %d, too much!",
hdr.opcode, hdr.unique); hdr.opcode, hdr.unique);
nbytes = size; nbytes = size;
} }
...@@ -171,7 +170,7 @@ static ssize_t coda_psdev_write(struct file *file, const char *buf, ...@@ -171,7 +170,7 @@ static ssize_t coda_psdev_write(struct file *file, const char *buf,
unlock_kernel(); unlock_kernel();
if (!req) { if (!req) {
printk("psdev_write: msg (%ld, %ld) not found\n", printk("psdev_write: msg (%d, %d) not found\n",
hdr.opcode, hdr.unique); hdr.opcode, hdr.unique);
retval = -ESRCH; retval = -ESRCH;
goto out; goto out;
...@@ -179,7 +178,7 @@ static ssize_t coda_psdev_write(struct file *file, const char *buf, ...@@ -179,7 +178,7 @@ static ssize_t coda_psdev_write(struct file *file, const char *buf,
/* move data into response buffer. */ /* move data into response buffer. */
if (req->uc_outSize < nbytes) { if (req->uc_outSize < nbytes) {
printk("psdev_write: too much cnt: %d, cnt: %ld, opc: %ld, uniq: %ld.\n", printk("psdev_write: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n",
req->uc_outSize, (long)nbytes, hdr.opcode, hdr.unique); req->uc_outSize, (long)nbytes, hdr.opcode, hdr.unique);
nbytes = req->uc_outSize; /* don't have more space! */ nbytes = req->uc_outSize; /* don't have more space! */
} }
...@@ -325,10 +324,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) ...@@ -325,10 +324,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
} }
/* Wakeup clients so they can return. */ /* Wakeup clients so they can return. */
lh = vcp->vc_pending.next; list_for_each_safe(lh, next, &vcp->vc_pending) {
next = lh;
while ( (lh = next) != &vcp->vc_pending) {
next = lh->next;
req = list_entry(lh, struct upc_req, uc_chain); req = list_entry(lh, struct upc_req, uc_chain);
/* Async requests need to be freed here */ /* Async requests need to be freed here */
if (req->uc_flags & REQ_ASYNC) { if (req->uc_flags & REQ_ASYNC) {
...@@ -340,9 +336,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) ...@@ -340,9 +336,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
wake_up(&req->uc_sleep); wake_up(&req->uc_sleep);
} }
lh = &vcp->vc_processing; list_for_each_entry(req, &vcp->vc_processing, uc_chain) {
while ( (lh = lh->next) != &vcp->vc_processing) {
req = list_entry(lh, struct upc_req, uc_chain);
req->uc_flags |= REQ_ABORT; req->uc_flags |= REQ_ABORT;
wake_up(&req->uc_sleep); wake_up(&req->uc_sleep);
} }
...@@ -390,7 +384,13 @@ static int __init init_coda(void) ...@@ -390,7 +384,13 @@ static int __init init_coda(void)
{ {
int status; int status;
int i; int i;
printk(KERN_INFO "Coda Kernel/Venus communications, v5.3.15, coda@cs.cmu.edu\n"); printk(KERN_INFO "Coda Kernel/Venus communications, "
#ifdef CODA_FS_OLD_API
"v5.3.20"
#else
"v6.0.0"
#endif
", coda@cs.cmu.edu\n");
status = coda_init_inodecache(); status = coda_init_inodecache();
if (status) if (status)
......
...@@ -55,8 +55,12 @@ static void *alloc_upcall(int opcode, int size) ...@@ -55,8 +55,12 @@ static void *alloc_upcall(int opcode, int size)
inp->ih.opcode = opcode; inp->ih.opcode = opcode;
inp->ih.pid = current->pid; inp->ih.pid = current->pid;
inp->ih.pgid = current->pgrp; inp->ih.pgid = current->pgrp;
coda_load_creds(&(inp->ih.cred)); #ifdef CODA_FS_OLD_API
memset(&inp->ih.cred, 0, sizeof(struct coda_cred));
inp->ih.cred.cr_fsuid = current->fsuid;
#else
inp->ih.uid = current->fsuid;
#endif
return (void*)inp; return (void*)inp;
} }
...@@ -74,7 +78,7 @@ do {\ ...@@ -74,7 +78,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;
...@@ -88,14 +92,14 @@ int venus_rootfid(struct super_block *sb, ViceFid *fidp) ...@@ -88,14 +92,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;
...@@ -114,7 +118,7 @@ int venus_getattr(struct super_block *sb, struct ViceFid *fid, ...@@ -114,7 +118,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;
...@@ -133,9 +137,9 @@ int venus_setattr(struct super_block *sb, struct ViceFid *fid, ...@@ -133,9 +137,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;
...@@ -162,17 +166,25 @@ int venus_lookup(struct super_block *sb, struct ViceFid *fid, ...@@ -162,17 +166,25 @@ 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,
struct coda_cred *cred) vuid_t uid)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
int insize, outsize, error; int insize, outsize, error;
#ifdef CODA_FS_OLD_API
struct coda_cred cred = { 0, };
cred.cr_fsuid = uid;
#endif
insize = SIZE(store); insize = SIZE(store);
UPARG(CODA_STORE); UPARG(CODA_STORE);
memcpy(&(inp->ih.cred), cred, sizeof(*cred)); #ifdef CODA_FS_OLD_API
memcpy(&(inp->ih.cred), &cred, sizeof(cred));
#else
inp->ih.uid = uid;
#endif
inp->coda_store.VFid = *fid; inp->coda_store.VFid = *fid;
inp->coda_store.flags = flags; inp->coda_store.flags = flags;
...@@ -183,7 +195,7 @@ int venus_store(struct super_block *sb, struct ViceFid *fid, int flags, ...@@ -183,7 +195,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;
...@@ -201,17 +213,25 @@ int venus_release(struct super_block *sb, struct ViceFid *fid, int flags) ...@@ -201,17 +213,25 @@ 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,
struct coda_cred *cred) vuid_t uid)
{ {
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
int insize, outsize, error; int insize, outsize, error;
#ifdef CODA_FS_OLD_API
struct coda_cred cred = { 0, };
cred.cr_fsuid = uid;
#endif
insize = SIZE(release); insize = SIZE(release);
UPARG(CODA_CLOSE); UPARG(CODA_CLOSE);
memcpy(&(inp->ih.cred), cred, sizeof(*cred)); #ifdef CODA_FS_OLD_API
memcpy(&(inp->ih.cred), &cred, sizeof(cred));
#else
inp->ih.uid = uid;
#endif
inp->coda_close.VFid = *fid; inp->coda_close.VFid = *fid;
inp->coda_close.flags = flags; inp->coda_close.flags = flags;
...@@ -222,7 +242,7 @@ int venus_close(struct super_block *sb, struct ViceFid *fid, int flags, ...@@ -222,7 +242,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;
...@@ -243,9 +263,9 @@ int venus_open(struct super_block *sb, struct ViceFid *fid, ...@@ -243,9 +263,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;
...@@ -273,8 +293,8 @@ int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid, ...@@ -273,8 +293,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)
{ {
...@@ -310,9 +330,9 @@ int venus_rename(struct super_block *sb, struct ViceFid *old_fid, ...@@ -310,9 +330,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;
...@@ -343,7 +363,7 @@ int venus_create(struct super_block *sb, struct ViceFid *dirfid, ...@@ -343,7 +363,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;
...@@ -366,7 +386,7 @@ int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid, ...@@ -366,7 +386,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;
...@@ -388,7 +408,7 @@ int venus_remove(struct super_block *sb, struct ViceFid *dirfid, ...@@ -388,7 +408,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;
...@@ -421,8 +441,8 @@ int venus_readlink(struct super_block *sb, struct ViceFid *fid, ...@@ -421,8 +441,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;
...@@ -447,7 +467,7 @@ int venus_link(struct super_block *sb, struct ViceFid *fid, ...@@ -447,7 +467,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)
{ {
...@@ -482,7 +502,7 @@ int venus_symlink(struct super_block *sb, struct ViceFid *fid, ...@@ -482,7 +502,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;
...@@ -499,7 +519,7 @@ int venus_fsync(struct super_block *sb, struct ViceFid *fid) ...@@ -499,7 +519,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;
...@@ -518,7 +538,7 @@ int venus_access(struct super_block *sb, struct ViceFid *fid, int mask) ...@@ -518,7 +538,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;
...@@ -808,7 +828,7 @@ static int coda_upcall(struct coda_sb_info *sbi, ...@@ -808,7 +828,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)
{ {
...@@ -819,25 +839,20 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -819,25 +839,20 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
switch (opcode) { switch (opcode) {
case CODA_FLUSH : { case CODA_FLUSH : {
coda_cache_clear_all(sb, NULL); coda_cache_clear_all(sb);
shrink_dcache_sb(sb); shrink_dcache_sb(sb);
coda_flag_inode(sb->s_root->d_inode, C_FLUSH); coda_flag_inode(sb->s_root->d_inode, C_FLUSH);
return(0); return(0);
} }
case CODA_PURGEUSER : { case CODA_PURGEUSER : {
struct coda_cred *cred = &out->coda_purgeuser.cred; coda_cache_clear_all(sb);
if ( !cred ) {
printk("PURGEUSER: null cred!\n");
return 0;
}
coda_cache_clear_all(sb, cred);
return(0); return(0);
} }
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 +866,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -851,7 +866,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 +877,7 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -862,7 +877,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 +893,8 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb) ...@@ -878,8 +893,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);
......
...@@ -59,7 +59,7 @@ Mellon the rights to redistribute these changes without encumbrance. ...@@ -59,7 +59,7 @@ Mellon the rights to redistribute these changes without encumbrance.
#ifndef _CODA_HEADER_ #ifndef _CODA_HEADER_
#define _CODA_HEADER_ #define _CODA_HEADER_
#include <linux/config.h>
/* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */ /* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */
#if defined(__NetBSD__) || \ #if defined(__NetBSD__) || \
...@@ -163,10 +163,10 @@ typedef unsigned int u_int32_t; ...@@ -163,10 +163,10 @@ typedef unsigned int u_int32_t;
#ifndef _VENUS_DIRENT_T_ #ifndef _VENUS_DIRENT_T_
#define _VENUS_DIRENT_T_ 1 #define _VENUS_DIRENT_T_ 1
struct venus_dirent { struct venus_dirent {
unsigned long d_fileno; /* file number of entry */ u_int32_t d_fileno; /* file number of entry */
unsigned short d_reclen; /* length of this record */ u_int16_t d_reclen; /* length of this record */
unsigned char d_type; /* file type, see below */ u_int8_t d_type; /* file type, see below */
unsigned char d_namlen; /* length of string in d_name */ u_int8_t d_namlen; /* length of string in d_name */
char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */ char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */
}; };
#undef DIRSIZ #undef DIRSIZ
...@@ -194,53 +194,41 @@ struct venus_dirent { ...@@ -194,53 +194,41 @@ struct venus_dirent {
#endif #endif
#ifndef _FID_T_ #ifndef _VUID_T_
#define _FID_T_ 1 #define _VUID_T_
typedef u_long VolumeId; typedef u_int32_t vuid_t;
typedef u_long VnodeId; typedef u_int32_t vgid_t;
typedef u_long Unique_t; #endif /*_VUID_T_ */
typedef u_long FileVersion;
#endif
#ifndef _VICEFID_T_
#define _VICEFID_T_ 1
typedef struct ViceFid {
VolumeId Volume;
VnodeId Vnode;
Unique_t Unique;
} ViceFid;
#endif /* VICEFID */
#ifdef CODA_FS_OLD_API
struct CodaFid {
u_int32_t opaque[3];
};
#ifdef __linux__ static __inline__ ino_t coda_f2i(struct CodaFid *fid)
static __inline__ ino_t coda_f2i(struct ViceFid *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
#define coda_f2i(fid)\
((fid) ? ((fid)->Unique + ((fid)->Vnode<<10) + ((fid)->Volume<<20)) : 0)
#endif
#ifndef _VUID_T_
#define _VUID_T_
typedef u_int32_t vuid_t;
typedef u_int32_t vgid_t;
#endif /*_VUID_T_ */
#ifndef _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 */
}; };
#else /* not defined(CODA_FS_OLD_API) */
struct CodaFid {
u_int32_t opaque[4];
};
#define coda_f2i(fid)\
(fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
#endif #endif
#ifndef _VENUS_VATTR_T_ #ifndef _VENUS_VATTR_T_
...@@ -330,31 +318,41 @@ struct coda_statfs { ...@@ -330,31 +318,41 @@ struct coda_statfs {
#define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */ #define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */
#define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */ #define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */
#endif #endif
#define CODA_KERNEL_VERSION 2 /* venus_lookup gets an extra parameter */ #ifdef CODA_FS_OLD_API
#define CODA_KERNEL_VERSION 2 /* venus_lookup got an extra parameter */
#else
#define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */
#endif
/* /*
* Venus <-> Coda RPC arguments * Venus <-> Coda RPC arguments
*/ */
struct coda_in_hdr { struct coda_in_hdr {
unsigned long opcode; u_int32_t opcode;
unsigned long unique; /* Keep multiple outstanding msgs distinct */ u_int32_t unique; /* Keep multiple outstanding msgs distinct */
u_short pid; /* Common to all */ #ifdef CODA_FS_OLD_API
u_short pgid; /* Common to all */ u_int16_t pid; /* Common to all */
u_short sid; /* Common to all */ u_int16_t pgid; /* Common to all */
u_int16_t sid; /* Common to all */
struct coda_cred cred; /* Common to all */ struct coda_cred cred; /* Common to all */
#else
pid_t pid;
pid_t pgid;
vuid_t uid;
#endif
}; };
/* Really important that opcode and unique are 1st two fields! */ /* Really important that opcode and unique are 1st two fields! */
struct coda_out_hdr { struct coda_out_hdr {
unsigned long opcode; u_int32_t opcode;
unsigned long unique; u_int32_t unique;
unsigned long result; u_int32_t result;
}; };
/* 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 +362,7 @@ struct coda_root_in { ...@@ -364,7 +362,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 +376,7 @@ struct coda_open_out { ...@@ -378,7 +376,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 +387,7 @@ struct coda_store_out { ...@@ -389,7 +387,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 +398,7 @@ struct coda_release_out { ...@@ -400,7 +398,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 +409,7 @@ struct coda_close_out { ...@@ -411,7 +409,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 +426,7 @@ struct coda_ioctl_out { ...@@ -428,7 +426,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 +438,7 @@ struct coda_getattr_out { ...@@ -440,7 +438,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 +449,7 @@ struct coda_setattr_out { ...@@ -451,7 +449,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 +465,14 @@ struct coda_access_out { ...@@ -467,14 +465,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 +480,7 @@ struct coda_lookup_out { ...@@ -482,7 +480,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 +489,7 @@ struct coda_create_in { ...@@ -491,7 +489,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 +497,7 @@ struct coda_create_out { ...@@ -499,7 +497,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 +508,8 @@ struct coda_remove_out { ...@@ -510,8 +508,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 +521,9 @@ struct coda_link_out { ...@@ -523,9 +521,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 +534,14 @@ struct coda_rename_out { ...@@ -536,14 +534,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 +549,7 @@ struct coda_mkdir_out { ...@@ -551,7 +549,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 +560,7 @@ struct coda_rmdir_out { ...@@ -562,7 +560,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 +573,7 @@ struct coda_symlink_out { ...@@ -575,7 +573,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 +586,7 @@ struct coda_readlink_out { ...@@ -588,7 +586,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 +596,12 @@ struct coda_fsync_out { ...@@ -598,12 +596,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;
}; };
...@@ -616,50 +614,46 @@ struct coda_vget_out { ...@@ -616,50 +614,46 @@ struct coda_vget_out {
/* CODA_PURGEUSER is a venus->kernel call */ /* CODA_PURGEUSER is a venus->kernel call */
struct coda_purgeuser_out { struct coda_purgeuser_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
#ifdef CODA_FS_OLD_API
struct coda_cred cred; struct coda_cred cred;
#else
vuid_t uid;
#endif
}; };
/* coda_zapfile: */ /* coda_zapfile: */
/* 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_zapnode: */
/* CODA_ZAPVNODE is a venus->kernel call */
struct coda_zapvnode_out {
struct coda_out_hdr oh;
struct coda_cred cred;
ViceFid VFid;
}; };
/* 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;
}; };
...@@ -675,7 +669,7 @@ struct coda_open_by_fd_out { ...@@ -675,7 +669,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;
}; };
...@@ -741,7 +735,6 @@ union outputArgs { ...@@ -741,7 +735,6 @@ union outputArgs {
struct coda_purgeuser_out coda_purgeuser; struct coda_purgeuser_out coda_purgeuser;
struct coda_zapfile_out coda_zapfile; struct coda_zapfile_out coda_zapfile;
struct coda_zapdir_out coda_zapdir; struct coda_zapdir_out coda_zapdir;
struct coda_zapvnode_out coda_zapvnode;
struct coda_purgefid_out coda_purgefid; struct coda_purgefid_out coda_purgefid;
struct coda_replace_out coda_replace; struct coda_replace_out coda_replace;
struct coda_open_by_fd_out coda_open_by_fd; struct coda_open_by_fd_out coda_open_by_fd;
...@@ -755,7 +748,6 @@ union coda_downcalls { ...@@ -755,7 +748,6 @@ union coda_downcalls {
struct coda_purgeuser_out purgeuser; struct coda_purgeuser_out purgeuser;
struct coda_zapfile_out zapfile; struct coda_zapfile_out zapfile;
struct coda_zapdir_out zapdir; struct coda_zapdir_out zapdir;
struct coda_zapvnode_out zapvnode;
struct coda_purgefid_out purgefid; struct coda_purgefid_out purgefid;
struct coda_replace_out replace; struct coda_replace_out replace;
}; };
...@@ -780,16 +772,7 @@ struct PioctlData { ...@@ -780,16 +772,7 @@ struct PioctlData {
#define CODA_CONTROL ".CONTROL" #define CODA_CONTROL ".CONTROL"
#define CODA_CONTROLLEN 8 #define CODA_CONTROLLEN 8
#define CTL_VOL -1
#define CTL_VNO -1
#define CTL_UNI -1
#define CTL_INO -1 #define CTL_INO -1
#define CTL_FILE "/coda/.CONTROL"
#define IS_CTL_FID(fidp) ((fidp)->Volume == CTL_VOL &&\
(fidp)->Vnode == CTL_VNO &&\
(fidp)->Unique == CTL_UNI)
/* Data passed to mount */ /* Data passed to mount */
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
/* credential cache */ /* credential cache */
void coda_cache_enter(struct inode *inode, int mask); void coda_cache_enter(struct inode *inode, int mask);
void coda_cache_clear_inode(struct inode *); void coda_cache_clear_inode(struct inode *);
void coda_cache_clear_all(struct super_block *sb, struct coda_cred *cred); void coda_cache_clear_all(struct super_block *sb);
int coda_cache_check(struct inode *inode, int mask); int coda_cache_check(struct inode *inode, int mask);
/* for downcalls and attributes and lookups */ /* for downcalls and attributes and lookups */
......
...@@ -17,11 +17,12 @@ ...@@ -17,11 +17,12 @@
* 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 */
struct coda_cred c_cached_cred; /* credentials of cached perms */ unsigned int c_cached_epoch; /* epoch for cached permissions */
vuid_t c_uid; /* fsuid for cached permissions */
unsigned int c_cached_perm; /* cached access permissions */ unsigned int c_cached_perm; /* cached access permissions */
struct inode vfs_inode; struct inode vfs_inode;
}; };
...@@ -34,7 +35,6 @@ struct coda_file_info { ...@@ -34,7 +35,6 @@ struct coda_file_info {
int cfi_magic; /* magic number */ int cfi_magic; /* magic number */
struct file *cfi_container; /* container file for this cnode */ struct file *cfi_container; /* container file for this cnode */
unsigned int cfi_mapcount; /* nr of times this file is mapped */ unsigned int cfi_mapcount; /* nr of times this file is mapped */
struct coda_cred cfi_cred; /* credentials of opener */
}; };
#define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data)) #define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data))
...@@ -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
...@@ -42,26 +42,21 @@ int coda_permission(struct inode *inode, int mask, struct nameidata *nd); ...@@ -42,26 +42,21 @@ int coda_permission(struct inode *inode, int mask, struct nameidata *nd);
int coda_revalidate_inode(struct dentry *); int coda_revalidate_inode(struct dentry *);
int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *);
int coda_setattr(struct dentry *, struct iattr *); int coda_setattr(struct dentry *, struct iattr *);
int coda_isnullfid(ViceFid *fid);
/* global variables */ /* global variables */
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);
void coda_load_creds(struct coda_cred *cred);
void coda_vattr_to_iattr(struct inode *, struct coda_vattr *); void coda_vattr_to_iattr(struct inode *, struct coda_vattr *);
void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *); void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *);
unsigned short coda_flags_to_cflags(unsigned short); unsigned short coda_flags_to_cflags(unsigned short);
void print_vattr( struct coda_vattr *attr );
int coda_cred_ok(struct coda_cred *cred);
int coda_cred_eq(struct coda_cred *cred1, struct coda_cred *cred2);
/* sysctl.h */ /* sysctl.h */
void coda_sysctl_init(void); void coda_sysctl_init(void);
...@@ -88,7 +83,7 @@ static inline struct coda_inode_info *ITOC(struct inode *inode) ...@@ -88,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);
} }
......
...@@ -6,13 +6,11 @@ ...@@ -6,13 +6,11 @@
#define CODA_SUPER_MAGIC 0x73757245 #define CODA_SUPER_MAGIC 0x73757245
struct statfs; struct kstatfs;
struct coda_sb_info struct coda_sb_info
{ {
struct venus_comm * sbi_vcomm; struct venus_comm *sbi_vcomm;
struct super_block *sbi_sb;
struct list_head sbi_cihead;
}; };
/* communication pending/processing queues */ /* communication pending/processing queues */
...@@ -33,46 +31,45 @@ static inline struct coda_sb_info *coda_sbp(struct super_block *sb) ...@@ -33,46 +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 ViceFid *resfid); struct CodaFid *resfid);
int venus_store(struct super_block *sb, struct ViceFid *fid, int flags, int venus_store(struct super_block *sb, struct CodaFid *fid, int flags,
struct coda_cred *); 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, int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
struct coda_cred *); vuid_t uid);
int venus_open(struct super_block *sb, struct ViceFid *fid, int venus_open(struct super_block *sb, struct CodaFid *fid, int flags,
int flags, struct file **f); struct file **f);
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);
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