From owner-svn-src-projects@freebsd.org Tue Mar 26 03:02:47 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C084155E462 for ; Tue, 26 Mar 2019 03:02:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7D270B38; Tue, 26 Mar 2019 03:02:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8E1319998; Tue, 26 Mar 2019 03:02:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2Q32ksN098399; Tue, 26 Mar 2019 03:02:46 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2Q32ji2098395; Tue, 26 Mar 2019 03:02:45 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201903260302.x2Q32ji2098395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 26 Mar 2019 03:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r345521 - projects/fuse2/sys/fs/fuse X-SVN-Group: projects X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: projects/fuse2/sys/fs/fuse X-SVN-Commit-Revision: 345521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1C7D270B38 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 03:02:47 -0000 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 #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 + +/* Maximum number of hardlinks to a single FUSE file */ +#define FUSE_LINK_MAX UINT32_MAX SDT_PROVIDER_DECLARE(fuse); /*