1) grep vn_ops kernel/fs/*.c kernel/fs/vfs_syscall.c: * Finally call the dir's mkdir vn_ops. Return what it returns. kernel/fs/vfs_syscall.c: * o call the destination dir's (to) link vn_ops. kernel/fs/vnode.c: vn->vn_ops = &bytedev_spec_vops; kernel/fs/vnode.c: vn->vn_ops = &blockdev_spec_vops; kernel/fs/vnode.c: KASSERT(vnode->vn_fs->fs_root->vn_ops->stat != NULL); kernel/fs/vnode.c: return vnode->vn_fs->fs_root->vn_ops->stat(vnode, ss); kernel/fs/vnode.c: return v->vn_ops->fillpage(v, (int)PN_TO_ADDR(pf->pf_pagenum), pf->pf_addr); kernel/fs/vnode.c: return v->vn_ops->dirtypage(v, (int) PN_TO_ADDR(pf->pf_pagenum)); kernel/fs/vnode.c: return v->vn_ops->cleanpage(v, (int) PN_TO_ADDR(pf->pf_pagenum), pf->pf_addr); a) vn_ops contains the address of an array of function pointers (&bytedev_spec_vops or &blockdev_spec_vops) b) you don't have to call a function using the (func_name)(...) syntax, you can just do func_name(...) 2) grep vn_ops kernel/fs/*/*.c kernel/fs/ramfs/ramfs.c: vn->vn_ops = &ramfs_file_vops; kernel/fs/ramfs/ramfs.c: vn->vn_ops = &ramfs_dir_vops; kernel/fs/ramfs/ramfs.c: vn->vn_ops = NULL; kernel/fs/ramfs/ramfs.c: vn->vn_ops = NULL; a) vn_ops contains the address of an array of function pointers (&ramfs_file_vops or &ramfs_dir_vops) i) where is ramfs_read_vnode set? in ramfs_read_vnode() ii) what is ramfs_read_vnode()? it's a member of ramfs_ops (which is an array of function pointers) 3) explain dir_namev(const char *pathname, size_t *namelen, const char **name, vnode_t *base, vnode_t **res_vnode) a) Explain the following: For example: dir_namev("/s5fs/bin/ls", &namelen, &name, NULL, &res_vnode) would put 2 in namelen, "ls" in name, and a pointer to the vnode corresponding to "/s5fs/bin" in res_vnode. i) it should say that name POINTS to "ls"