Since Coda is effectively a stacked file system, use VOP_EOPNOTSUPP

for vop_bmap; delete the existing stub that returned either EINVAL
or EOPNOTSUPP, and had unreachable calls to VOP_BMAP on the cache
vnode.

MFC after:	1 month
This commit is contained in:
rwatson 2008-02-09 09:33:19 +00:00
parent 61bc7e9048
commit e16828cb77
2 changed files with 1 additions and 38 deletions

View File

@ -129,7 +129,7 @@ struct vop_vector coda_vnodeops = {
.vop_reclaim = coda_reclaim, /* reclaim */
.vop_lock1 = coda_lock, /* lock */
.vop_unlock = coda_unlock, /* unlock */
.vop_bmap = coda_bmap, /* bmap */
.vop_bmap = VOP_EOPNOTSUPP, /* bmap */
.vop_print = VOP_NULL, /* print */
.vop_islocked = coda_islocked, /* islocked */
.vop_pathconf = coda_pathconf, /* pathconf */
@ -1489,42 +1489,6 @@ coda_readdir(struct vop_readdir_args *ap)
return(error);
}
/*
* Convert from filesystem blocks to device blocks
*/
int
coda_bmap(struct vop_bmap_args *ap)
{
/* XXX on the global proc */
/* true args */
struct vnode *vp __attribute__((unused)) = ap->a_vp; /* file's vnode */
daddr_t bn __attribute__((unused)) = ap->a_bn; /* fs block number */
struct bufobj **bop = ap->a_bop; /* RETURN bufobj of device */
daddr_t *bnp __attribute__((unused)) = ap->a_bnp; /* RETURN device block number */
struct thread *td __attribute__((unused)) = curthread;
/* upcall decl */
/* locals */
int ret = 0;
struct cnode *cp;
cp = VTOC(vp);
if (cp->c_ovp) {
return EINVAL;
ret = VOP_BMAP(cp->c_ovp, bn, bop, bnp, ap->a_runp, ap->a_runb);
#if 0
printf("VOP_BMAP(cp->c_ovp %p, bn %p, bop %p, bnp %lld, ap->a_runp %p, ap->a_runb %p) = %d\n",
cp->c_ovp, bn, bop, bnp, ap->a_runp, ap->a_runb, ret);
#endif
return ret;
} else {
#if 0
printf("coda_bmap: no container\n");
#endif
return(EOPNOTSUPP);
}
}
int
coda_reclaim(struct vop_reclaim_args *ap)
{

View File

@ -69,7 +69,6 @@ vop_mkdir_t coda_mkdir;
vop_rmdir_t coda_rmdir;
vop_symlink_t coda_symlink;
vop_readdir_t coda_readdir;
vop_bmap_t coda_bmap;
vop_strategy_t coda_strategy;
vop_reclaim_t coda_reclaim;
vop_lock1_t coda_lock;