Date: Tue, 26 Mar 2019 03:02:45 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r345521 - projects/fuse2/sys/fs/fuse Message-ID: <201903260302.x2Q32ji2098395@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Tue Mar 26 03:02:45 2019 New Revision: 345521 URL: https://svnweb.freebsd.org/changeset/base/345521 Log: fusefs: delete dead code This change also inlines several previously #define'd symbols that didn't really have the meanings indicated by the comments. Sponsored by: The FreeBSD Foundation Deleted: projects/fuse2/sys/fs/fuse/fuse_param.h Modified: projects/fuse2/sys/fs/fuse/fuse_file.h projects/fuse2/sys/fs/fuse/fuse_internal.c projects/fuse2/sys/fs/fuse/fuse_internal.h projects/fuse2/sys/fs/fuse/fuse_vfsops.c projects/fuse2/sys/fs/fuse/fuse_vnops.c Modified: projects/fuse2/sys/fs/fuse/fuse_file.h ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_file.h Tue Mar 26 02:53:35 2019 (r345520) +++ projects/fuse2/sys/fs/fuse/fuse_file.h Tue Mar 26 03:02:45 2019 (r345521) @@ -85,19 +85,6 @@ struct fuse_filehandle { #define FUFH_IS_VALID(f) ((f)->fh_type != FUFH_INVALID) static inline fufh_type_t -fuse_filehandle_xlate_from_mmap(int fflags) -{ - if (fflags & (PROT_READ | PROT_WRITE)) - return FUFH_RDWR; - else if (fflags & (PROT_WRITE)) - return FUFH_WRONLY; - else if ((fflags & PROT_READ) || (fflags & PROT_EXEC)) - return FUFH_RDONLY; - else - return FUFH_INVALID; -} - -static inline fufh_type_t fuse_filehandle_xlate_from_fflags(int fflags) { if ((fflags & FREAD) && (fflags & FWRITE)) Modified: projects/fuse2/sys/fs/fuse/fuse_internal.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_internal.c Tue Mar 26 02:53:35 2019 (r345520) +++ projects/fuse2/sys/fs/fuse/fuse_internal.c Tue Mar 26 03:02:45 2019 (r345521) @@ -92,7 +92,6 @@ __FBSDID("$FreeBSD$"); #include "fuse_ipc.h" #include "fuse_node.h" #include "fuse_file.h" -#include "fuse_param.h" SDT_PROVIDER_DECLARE(fuse); /* @@ -354,7 +353,11 @@ fuse_internal_readdir(struct vnode *vp, fri = fdi.indata; fri->fh = fufh->fh_id; fri->offset = uio_offset(uio); - fri->size = min(uio_resid(uio), FUSE_DEFAULT_IOSIZE); + /* + * XXX AWS Try removing the min(...,4096). I'm pretty sure + * there's no reason for it to be there. + */ + fri->size = min(uio_resid(uio), 4096); /* mp->max_read */ if ((err = fdisp_wait_answ(&fdi))) { @@ -686,7 +689,8 @@ fuse_internal_send_init(struct fuse_data *data, struct fiii = fdi.indata; fiii->major = FUSE_KERNEL_VERSION; fiii->minor = FUSE_KERNEL_MINOR_VERSION; - fiii->max_readahead = FUSE_DEFAULT_IOSIZE * 16; + //XXX should probably be maxbcachebuf * 16 + fiii->max_readahead = 4096 * 16; fiii->flags = 0; fuse_insert_callback(fdi.tick, fuse_internal_init_callback); Modified: projects/fuse2/sys/fs/fuse/fuse_internal.h ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_internal.h Tue Mar 26 02:53:35 2019 (r345520) +++ projects/fuse2/sys/fs/fuse/fuse_internal.h Tue Mar 26 03:02:45 2019 (r345521) @@ -134,12 +134,6 @@ uio_setoffset(struct uio *uio, off_t offset) uio->uio_offset = offset; } -static inline void -uio_setresid(struct uio *uio, ssize_t resid) -{ - uio->uio_resid = resid; -} - /* miscellaneous */ static inline bool Modified: projects/fuse2/sys/fs/fuse/fuse_vfsops.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_vfsops.c Tue Mar 26 02:53:35 2019 (r345520) +++ projects/fuse2/sys/fs/fuse/fuse_vfsops.c Tue Mar 26 03:02:45 2019 (r345521) @@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$"); #include <sys/fcntl.h> #include "fuse.h" -#include "fuse_param.h" #include "fuse_node.h" #include "fuse_ipc.h" #include "fuse_internal.h" @@ -523,7 +522,7 @@ fake: sbp->f_files = 0; sbp->f_ffree = 0; sbp->f_namemax = 0; - sbp->f_bsize = FUSE_DEFAULT_BLOCKSIZE; + sbp->f_bsize = S_BLKSIZE; return 0; } Modified: projects/fuse2/sys/fs/fuse/fuse_vnops.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_vnops.c Tue Mar 26 02:53:35 2019 (r345520) +++ projects/fuse2/sys/fs/fuse/fuse_vnops.c Tue Mar 26 03:02:45 2019 (r345521) @@ -102,10 +102,12 @@ __FBSDID("$FreeBSD$"); #include "fuse_internal.h" #include "fuse_ipc.h" #include "fuse_node.h" -#include "fuse_param.h" #include "fuse_io.h" #include <sys/priv.h> + +/* Maximum number of hardlinks to a single FUSE file */ +#define FUSE_LINK_MAX UINT32_MAX SDT_PROVIDER_DECLARE(fuse); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903260302.x2Q32ji2098395>