Author: cem
Date: Thu Mar  7 00:55:49 2019
New Revision: 344865
URL: https://svnweb.freebsd.org/changeset/base/344865

Log:
  fuse: switch from DFLTPHYS/MAXBSIZE to maxcachebuf
  
  On GENERIC kernels with empty loader.conf, there is no functional change.
  DFLTPHYS and MAXBSIZE are both 64kB at the moment.  This change allows
  larger bufcache block sizes to be used when either MAXBSIZE (custom kernel)
  or the loader.conf tunable vfs.maxbcachebuf (GENERIC) is adjusted higher
  than the default.
  
  Suggested by: ken@

Modified:
  head/sys/fs/fuse/fuse_io.c
  head/sys/fs/fuse/fuse_vfsops.c

Modified: head/sys/fs/fuse/fuse_io.c
==============================================================================
--- head/sys/fs/fuse/fuse_io.c  Thu Mar  7 00:04:13 2019        (r344864)
+++ head/sys/fs/fuse/fuse_io.c  Thu Mar  7 00:55:49 2019        (r344865)
@@ -198,7 +198,7 @@ fuse_read_biobackend(struct vnode *vp, struct uio *uio
        if (uio->uio_offset < 0)
                return (EINVAL);
 
-       bcount = MIN(MAXBSIZE, biosize);
+       bcount = biosize;
        filesize = VTOFUD(vp)->filesize;
 
        do {

Modified: head/sys/fs/fuse/fuse_vfsops.c
==============================================================================
--- head/sys/fs/fuse/fuse_vfsops.c      Thu Mar  7 00:04:13 2019        
(r344864)
+++ head/sys/fs/fuse/fuse_vfsops.c      Thu Mar  7 00:55:49 2019        
(r344865)
@@ -58,11 +58,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/buf.h>
 #include <sys/module.h>
 #include <sys/systm.h>
 #include <sys/errno.h>
-#include <sys/param.h>
 #include <sys/kernel.h>
 #include <sys/capsicum.h>
 #include <sys/conf.h>
@@ -338,7 +338,7 @@ fuse_vfsop_mount(struct mount *mp)
        mp->mnt_kern_flag |= MNTK_USES_BCACHE;
        MNT_IUNLOCK(mp);
        /* We need this here as this slot is used by getnewvnode() */
-       mp->mnt_stat.f_iosize = MIN(DFLTPHYS, MAXBSIZE);
+       mp->mnt_stat.f_iosize = maxbcachebuf;
        if (subtype) {
                strlcat(mp->mnt_stat.f_fstypename, ".", MFSNAMELEN);
                strlcat(mp->mnt_stat.f_fstypename, subtype, MFSNAMELEN);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to