From owner-svn-src-projects@freebsd.org Mon May 13 19:31:11 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 C28DD1599437 for ; Mon, 13 May 2019 19:31:11 +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 65DE969E33; Mon, 13 May 2019 19:31:11 +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 42885E528; Mon, 13 May 2019 19:31:11 +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 x4DJVBK5080250; Mon, 13 May 2019 19:31:11 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4DJVAfn079517; Mon, 13 May 2019 19:31:10 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201905131931.x4DJVAfn079517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 13 May 2019 19:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r347545 - in projects/fuse2: . sys/fs/fuse X-SVN-Group: projects X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in projects/fuse2: . sys/fs/fuse X-SVN-Commit-Revision: 347545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 65DE969E33 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,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: Mon, 13 May 2019 19:31:12 -0000 Author: asomers Date: Mon May 13 19:31:09 2019 New Revision: 347545 URL: https://svnweb.freebsd.org/changeset/base/347545 Log: fusefs: remove the vfs.fusefs.fix_broken_io sysctl This looks like it may have been a workaround for a specific buggy FUSE filesystem. However, there's no information about what that bug may have been, and the workaround is > 6.5 years old, so I consider the sysctl to be unmaintainable. Sponsored by: The FreeBSD Foundation Modified: projects/fuse2/UPDATING projects/fuse2/sys/fs/fuse/fuse_io.c projects/fuse2/sys/fs/fuse/fuse_ipc.h projects/fuse2/sys/fs/fuse/fuse_node.c projects/fuse2/sys/fs/fuse/fuse_vfsops.c Modified: projects/fuse2/UPDATING ============================================================================== --- projects/fuse2/UPDATING Mon May 13 19:03:46 2019 (r347544) +++ projects/fuse2/UPDATING Mon May 13 19:31:09 2019 (r347545) @@ -32,9 +32,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20190513: - The "-o sync_unmount" and "-o init_backgrounded" options have been - removed from mount_fusefs(8). You can safely remove them from your - scripts, because they had no effect. + The vfs.fusefs.sync_unmount and vfs.fusefs.init_backgrounded sysctls + and the "-o sync_unmount" and "-o init_backgrounded" mount options have + been removed from mount_fusefs(8). You can safely remove them from + your scripts, because they had no effect. + + The vfs.fusefs.fix_broken_io sysctl has been removed. If you felt the + need to set it to a non-default value, please tell asomers@FreeBSD.org + why. 20190507: The IPSEC option has been removed from GENERIC. Users requiring Modified: projects/fuse2/sys/fs/fuse/fuse_io.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_io.c Mon May 13 19:03:46 2019 (r347544) +++ projects/fuse2/sys/fs/fuse/fuse_io.c Mon May 13 19:31:09 2019 (r347545) @@ -776,11 +776,7 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp) uiop->uio_offset = ((off_t)bp->b_blkno) * biosize; error = fuse_read_directbackend(vp, uiop, cred, fufh); - /* XXXCEM: Potentially invalid access to cached_attrs here */ - if ((!error && uiop->uio_resid) || - (fsess_opt_brokenio(vnode_mount(vp)) && error == EIO && - uiop->uio_offset < fvdat->filesize && fvdat->filesize > 0 && - uiop->uio_offset >= fvdat->cached_attrs.va_size)) { + if (!error && uiop->uio_resid) { /* * If we had a short read with no error, we must have * hit a file hole. We should zero-fill the remainder. @@ -792,14 +788,6 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp) int nread = bp->b_bcount - uiop->uio_resid; int left = uiop->uio_resid; - if (error != 0) { - printf("FUSE: Fix broken io: offset %ju, " - " resid %zd, file size %ju/%ju\n", - (uintmax_t)uiop->uio_offset, - uiop->uio_resid, fvdat->filesize, - fvdat->cached_attrs.va_size); - error = 0; - } if (left > 0) bzero((char *)bp->b_data + nread, left); uiop->uio_resid = 0; Modified: projects/fuse2/sys/fs/fuse/fuse_ipc.h ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_ipc.h Mon May 13 19:03:46 2019 (r347544) +++ projects/fuse2/sys/fs/fuse/fuse_ipc.h Mon May 13 19:31:09 2019 (r347545) @@ -220,7 +220,6 @@ struct fuse_data { #define FSESS_NO_DATACACHE 0x0200 /* disable buffer cache */ #define FSESS_NO_NAMECACHE 0x0400 /* disable name cache */ #define FSESS_NO_MMAP 0x0800 /* disable mmap */ -#define FSESS_BROKENIO 0x1000 /* fix broken io */ #define FSESS_POSIX_LOCKS 0x2000 /* daemon supports POSIX locks */ enum fuse_data_cache_mode { @@ -233,7 +232,6 @@ extern int fuse_data_cache_mode; extern int fuse_data_cache_invalidate; extern int fuse_mmap_enable; extern int fuse_sync_resize; -extern int fuse_fix_broken_io; static inline struct fuse_data * fuse_get_mpdata(struct mount *mp) @@ -274,14 +272,6 @@ fsess_opt_mmap(struct mount *mp) if (!fuse_mmap_enable || fuse_data_cache_mode == FUSE_CACHE_UC) return (false); return ((data->dataflags & (FSESS_NO_DATACACHE | FSESS_NO_MMAP)) == 0); -} - -static inline bool -fsess_opt_brokenio(struct mount *mp) -{ - struct fuse_data *data = fuse_get_mpdata(mp); - - return (fuse_fix_broken_io || (data->dataflags & FSESS_BROKENIO)); } /* Insert a new upgoing message */ Modified: projects/fuse2/sys/fs/fuse/fuse_node.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_node.c Mon May 13 19:03:46 2019 (r347544) +++ projects/fuse2/sys/fs/fuse/fuse_node.c Mon May 13 19:31:09 2019 (r347545) @@ -142,13 +142,6 @@ SYSCTL_INT(_vfs_fusefs, OID_AUTO, sync_resize, CTLFLAG "If a cached write extended a file, inform FUSE filesystem of the changed" "size immediately subsequent to the issued writes"); -int fuse_fix_broken_io = 0; - -SYSCTL_INT(_vfs_fusefs, OID_AUTO, fix_broken_io, CTLFLAG_RW, - &fuse_fix_broken_io, 0, - "If non-zero, print a diagnostic warning if a userspace filesystem returns" - " EIO on reads of recently extended portions of files"); - static int sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS) { Modified: projects/fuse2/sys/fs/fuse/fuse_vfsops.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_vfsops.c Mon May 13 19:03:46 2019 (r347544) +++ projects/fuse2/sys/fs/fuse/fuse_vfsops.c Mon May 13 19:31:09 2019 (r347545) @@ -273,7 +273,6 @@ fuse_vfsop_mount(struct mount *mp) FUSE_FLAGOPT(no_datacache, FSESS_NO_DATACACHE); FUSE_FLAGOPT(no_namecache, FSESS_NO_NAMECACHE); FUSE_FLAGOPT(no_mmap, FSESS_NO_MMAP); - FUSE_FLAGOPT(brokenio, FSESS_BROKENIO); (void)vfs_scanopt(opts, "max_read=", "%u", &max_read); if (vfs_scanopt(opts, "timeout=", "%u", &daemon_timeout) == 1) {