PERFORCE change 194690 for review

Ilya Putsikau ilya at FreeBSD.org
Mon Jun 13 15:41:25 UTC 2011


http://p4web.freebsd.org/@@194690?ac=10

Change 194690 by ilya at 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); */
 


More information about the p4-projects mailing list