Date: Mon, 24 Jun 2019 20:08:28 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r349338 - projects/fuse2/sys/fs/fuse Message-ID: <201906242008.x5OK8Sq9043122@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Mon Jun 24 20:08:28 2019 New Revision: 349338 URL: https://svnweb.freebsd.org/changeset/base/349338 Log: fusefs: refine the short read fix from r349332 b_fsprivate1 needs to be initialized even for write operations, probably because a buffer can be used to read, write, and read again with the final read serviced by cache. 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 Mon Jun 24 19:52:08 2019 (r349337) +++ projects/fuse2/sys/fs/fuse/fuse_io.c Mon Jun 24 20:08:28 2019 (r349338) @@ -164,6 +164,8 @@ fuse_io_clear_suid_on_write(struct vnode *vp, struct u SDT_PROBE_DEFINE5(fusefs, , io, io_dispatch, "struct vnode*", "struct uio*", "int", "struct ucred*", "struct fuse_filehandle*"); +SDT_PROBE_DEFINE5(fusefs, , io, io_dispatch_filehandles_closed, "struct vnode*", + "struct uio*", "int", "bool", "struct ucred*"); int fuse_io_dispatch(struct vnode *vp, struct uio *uio, int ioflag, bool pages, struct ucred *cred, pid_t pid) @@ -186,6 +188,8 @@ fuse_io_dispatch(struct vnode *vp, struct uio *uio, in closefufh = true; } else if (err) { + SDT_PROBE5(fusefs, , io, io_dispatch_filehandles_closed, + vp, uio, ioflag, pages, cred); printf("FUSE: io dispatch: filehandles are closed\n"); return err; } @@ -860,6 +864,7 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp) fflag = bp->b_iocmd == BIO_READ ? FREAD : FWRITE; cred = bp->b_iocmd == BIO_READ ? bp->b_rcred : bp->b_wcred; error = fuse_filehandle_getrw(vp, fflag, &fufh, cred, pid); + bp->b_fsprivate1 = (void*)(intptr_t)0; if (bp->b_iocmd == BIO_READ && error == EBADF) { /* * This may be a read-modify-write operation on a cached file
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906242008.x5OK8Sq9043122>