Date: Thu, 6 Jun 2019 20:35:41 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r348758 - projects/fuse2/sys/fs/fuse Message-ID: <201906062035.x56KZf3D008996@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Thu Jun 6 20:35:41 2019 New Revision: 348758 URL: https://svnweb.freebsd.org/changeset/base/348758 Log: fusefs: remove some stuff that was copy/pasted from nfsclient fusefs's I/O methods were originally copy/pasted from nfsclient. This commit removes some irrelevant parts, like stuff involving B_NEEDCOMMIT. Sponsored by: The FreeBSD Foundation Modified: projects/fuse2/sys/fs/fuse/fuse_io.c Modified: projects/fuse2/sys/fs/fuse/fuse_io.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_io.c Thu Jun 6 20:12:04 2019 (r348757) +++ projects/fuse2/sys/fs/fuse/fuse_io.c Thu Jun 6 20:35:41 2019 (r348758) @@ -567,7 +567,7 @@ fuse_write_biobackend(struct vnode *vp, struct uio *ui const int biosize = fuse_iosize(vp); - KASSERT(uio->uio_rw == UIO_WRITE, ("ncl_write mode")); + KASSERT(uio->uio_rw == UIO_WRITE, ("fuse_write_biobackend mode")); if (vp->v_type != VREG) return (EIO); if (uio->uio_offset < 0) @@ -585,14 +585,6 @@ fuse_write_biobackend(struct vnode *vp, struct uio *ui if (vn_rlimit_fsize(vp, uio, uio->uio_td)) return (EFBIG); - /* - * Find all of this file's B_NEEDCOMMIT buffers. If our writes - * would exceed the local maximum per-file write commit size when - * combined with those, we must decide whether to flush, - * go synchronous, or return err. We don't bother checking - * IO_UNIT -- we just make all writes atomic anyway, as there's - * no point optimizing for something that really won't ever happen. - */ do { bool direct_append, extending; @@ -741,14 +733,6 @@ again: } err = uiomove((char *)bp->b_data + on, n, uio); - /* - * Since this block is being modified, it must be written - * again and not just committed. Since write clustering does - * not work for the stage 1 data write, only the stage 2 - * commit rpc, we have to clear B_CLUSTEROK as well. - */ - bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); - if (err) { bp->b_ioflags |= BIO_ERROR; bp->b_error = err; @@ -860,13 +844,6 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp) } } else { /* - * If we only need to commit, try to commit - */ - if (bp->b_flags & B_NEEDCOMMIT) { - SDT_PROBE2(fusefs, , io, trace, 1, - "write: B_NEEDCOMMIT flags set"); - } - /* * Setup for actual write */ error = fuse_vnode_size(vp, &filesize, cred, curthread); @@ -892,9 +869,7 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp) error = fuse_write_directbackend(vp, uiop, cred, fufh, filesize, 0, false); - if (error == EINTR || error == ETIMEDOUT - || (!error && (bp->b_flags & B_NEEDCOMMIT))) { - + if (error == EINTR || error == ETIMEDOUT) { bp->b_flags &= ~(B_INVAL | B_NOCACHE); if ((bp->b_flags & B_PAGING) == 0) { bdirty(bp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906062035.x56KZf3D008996>