Skip to content

Commit

Permalink
fuse: Fix a regression introduced in r337165
Browse files Browse the repository at this point in the history
On systems with non-default DFLTPHYS and/or MAXBSIZE, FUSE would attempt to
use a buf cache block size in excess of permitted size.  This did not affect
most configurations, since DFLTPHYS and MAXBSIZE both default to 64kB.
The issue was discovered and reported using a custom kernel with a DFLTPHYS
of 512kB.

PR:		230260 (comment #9)
Reported by:	ken@
MFC after:	π/𝑒 weeks
  • Loading branch information
cemeyer committed Feb 21, 2019
1 parent 0a59440 commit 0be3f78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/fs/fuse/fuse_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = DFLTPHYS;
mp->mnt_stat.f_iosize = MIN(DFLTPHYS, MAXBSIZE);
if (subtype) {
strlcat(mp->mnt_stat.f_fstypename, ".", MFSNAMELEN);
strlcat(mp->mnt_stat.f_fstypename, subtype, MFSNAMELEN);
Expand Down

0 comments on commit 0be3f78

Please sign in to comment.