From owner-p4-projects@FreeBSD.ORG Mon Jun 13 15:41:25 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B28E1065756; Mon, 13 Jun 2011 15:41:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AFCC106567E for ; Mon, 13 Jun 2011 15:41:25 +0000 (UTC) (envelope-from ilya@FreeBSD.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id ED8888FC15 for ; Mon, 13 Jun 2011 15:41:24 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p5DFfOKW076357 for ; Mon, 13 Jun 2011 15:41:24 GMT (envelope-from ilya@FreeBSD.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p5DFfOMG076354 for perforce@freebsd.org; Mon, 13 Jun 2011 15:41:24 GMT (envelope-from ilya@FreeBSD.org) Date: Mon, 13 Jun 2011 15:41:24 GMT Message-Id: <201106131541.p5DFfOMG076354@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to ilya@FreeBSD.org using -f From: Ilya Putsikau To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 194690 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2011 15:41:25 -0000 http://p4web.freebsd.org/@@194690?ac=10 Change 194690 by ilya@ilya_triton2011 on 2011/06/13 15:41:03 Remove unused functions Affected files ... .. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_internal.c#7 edit .. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_internal.h#9 edit .. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_io.h#5 edit .. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_main.c#4 edit Differences ... ==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_internal.c#7 (text+ko) ==== @@ -511,10 +511,6 @@ /* strategy */ - - - - /* entity creation */ void ==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_internal.h#9 (text+ko) ==== @@ -80,14 +80,6 @@ uio->uio_resid = resid; } -/* XXX */ -void cluster_push(struct vnode *vp, int a); - -struct fuse_pidcred { - pid_t pid; - struct ucred cred; -}; - /* access */ #define FVP_ACCESS_NOOP 0x01 @@ -224,9 +216,6 @@ /* strategy */ - - - /* entity creation */ static __inline ==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_io.h#5 (text+ko) ==== @@ -24,40 +24,4 @@ int fuse_io_strategy(struct vnode *vp, struct buf *bp, struct fuse_filehandle *fufh, enum fuse_opcode op); -/* - * XXX for blocking vnode usage, it seems that changing vnops to dead ones - * is not enough: file ops don't look at the vnode... - * so as an ad hoc solution we'll test against this macro to the top of file - * specific ops. - * Tell me if there is an "official" way to handle this. - */ - -static __inline int -_file_is_bad(struct file *fp) -{ - return (fp->f_ops == &badfileops || - fp->f_ops == &vnops || - fp->f_vnode->v_type == VBAD || - fp->f_vnode->v_op == &dead_vnodeops || - fp->f_vnode->v_data == NULL || - fp->f_data == NULL); -} - -/* - * In kern_open() of vfs_syscalls.c, if the f_data slot is not set - * up at open time, the vnode of the file will be put there. - * So "f_data == f_vnode" means someting like "the file is not - * initialized". I don't know how stable this convention is, so relying - * on it might be somewhat bogus; yet this saves us from on more locking - * for nothing (when allocating a dummy data field). - * As a compromise, the respective test is wrapped into a macro, to provide - * some abstraction... - */ - -static __inline int -_file_is_fat(struct file *fp) -{ - return (fp->f_vnode && fp->f_data != fp->f_vnode); -} - #endif /* _FUSE_IO_H_ */ ==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_main.c#4 (text+ko) ==== @@ -37,17 +37,8 @@ extern struct vfsops fuse_vfsops; extern struct cdevsw fuse_cdevsw; extern struct vop_vector fuse_vnops; -extern struct fileops fuse_fileops; extern struct clonedevs *fuseclones; -#if FMASTER -extern struct cdevsw fmaster_cdevsw[5]; -static struct cdev *fmaster_dev[5]; -#endif extern int fuse_pbuf_freecnt; -#if FUSE_HAS_CREATE -extern struct vop_vector fuse_germ_vnops; -extern vop_access_t fuse_germ_access; -#endif static struct vfsconf fuse_vfsconf = { .vfc_version = VFS_VERSION, @@ -71,9 +62,6 @@ static void fuse_bringdown(eventhandler_tag eh_tag) { -#if FMASTER - int i; -#endif EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); @@ -81,12 +69,6 @@ #if USE_FUSE_LOCK mtx_destroy(&fuse_mtx); #endif -#if FMASTER - for (i = 0; i < 5; i++) { - DEBUG("destroying fmaster%d\n", i); - destroy_dev(fmaster_dev[i]); - } -#endif } static int @@ -94,32 +76,12 @@ { static eventhandler_tag eh_tag = NULL; int err = 0; -#if FMASTER - int i; - char *fmaster_name = "fmasterx"; -#endif GIANT_REQUIRED; switch (what) { case MOD_LOAD: /* kldload */ - -#if __FreeBSD_version > 800009 - fuse_fileops.fo_truncate = vnops.fo_truncate; -#endif - fuse_fileops.fo_ioctl = vnops.fo_ioctl; - fuse_fileops.fo_poll = vnops.fo_poll; - fuse_fileops.fo_kqfilter = vnops.fo_kqfilter; - fuse_fileops.fo_stat = vnops.fo_stat; - fuse_pbuf_freecnt = nswbuf / 2 + 1; - -#if FUSE_HAS_CREATE - memcpy(&fuse_germ_vnops, &dead_vnodeops, sizeof(struct vop_vector)); - fuse_germ_vnops.vop_access = fuse_germ_access; - fuse_germ_vnops.vop_open = fuse_vnops.vop_open; -#endif - clone_setup(&fuseclones); #ifdef USE_FUSE_LOCK mtx_init(&fuse_mtx, "fuse_mtx", NULL, MTX_DEF); @@ -133,14 +95,6 @@ #endif return (ENOMEM); } -#if FMASTER - for (i=0; i<5; i++) { - fmaster_name[7] = i + '0'; - fmaster_dev[i] = make_dev(&fmaster_cdevsw[i], 0, - UID_ROOT, GID_WHEEL, - S_IWUSR, fmaster_name); - } -#endif /* Duh, it's static... */ /* vfs_register(&fuse_vfsconf); */