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
This commit is contained in:
parent
4abf87666a
commit
bad4c94dc8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=347545
11
UPDATING
11
UPDATING
@ -32,9 +32,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
|
|||||||
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
||||||
|
|
||||||
20190513:
|
20190513:
|
||||||
The "-o sync_unmount" and "-o init_backgrounded" options have been
|
The vfs.fusefs.sync_unmount and vfs.fusefs.init_backgrounded sysctls
|
||||||
removed from mount_fusefs(8). You can safely remove them from your
|
and the "-o sync_unmount" and "-o init_backgrounded" mount options have
|
||||||
scripts, because they had no effect.
|
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:
|
20190507:
|
||||||
The IPSEC option has been removed from GENERIC. Users requiring
|
The IPSEC option has been removed from GENERIC. Users requiring
|
||||||
|
@ -776,11 +776,7 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp)
|
|||||||
uiop->uio_offset = ((off_t)bp->b_blkno) * biosize;
|
uiop->uio_offset = ((off_t)bp->b_blkno) * biosize;
|
||||||
error = fuse_read_directbackend(vp, uiop, cred, fufh);
|
error = fuse_read_directbackend(vp, uiop, cred, fufh);
|
||||||
|
|
||||||
/* XXXCEM: Potentially invalid access to cached_attrs here */
|
if (!error && uiop->uio_resid) {
|
||||||
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 we had a short read with no error, we must have
|
* If we had a short read with no error, we must have
|
||||||
* hit a file hole. We should zero-fill the remainder.
|
* 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 nread = bp->b_bcount - uiop->uio_resid;
|
||||||
int left = 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)
|
if (left > 0)
|
||||||
bzero((char *)bp->b_data + nread, left);
|
bzero((char *)bp->b_data + nread, left);
|
||||||
uiop->uio_resid = 0;
|
uiop->uio_resid = 0;
|
||||||
|
@ -220,7 +220,6 @@ struct fuse_data {
|
|||||||
#define FSESS_NO_DATACACHE 0x0200 /* disable buffer cache */
|
#define FSESS_NO_DATACACHE 0x0200 /* disable buffer cache */
|
||||||
#define FSESS_NO_NAMECACHE 0x0400 /* disable name cache */
|
#define FSESS_NO_NAMECACHE 0x0400 /* disable name cache */
|
||||||
#define FSESS_NO_MMAP 0x0800 /* disable mmap */
|
#define FSESS_NO_MMAP 0x0800 /* disable mmap */
|
||||||
#define FSESS_BROKENIO 0x1000 /* fix broken io */
|
|
||||||
#define FSESS_POSIX_LOCKS 0x2000 /* daemon supports POSIX locks */
|
#define FSESS_POSIX_LOCKS 0x2000 /* daemon supports POSIX locks */
|
||||||
|
|
||||||
enum fuse_data_cache_mode {
|
enum fuse_data_cache_mode {
|
||||||
@ -233,7 +232,6 @@ extern int fuse_data_cache_mode;
|
|||||||
extern int fuse_data_cache_invalidate;
|
extern int fuse_data_cache_invalidate;
|
||||||
extern int fuse_mmap_enable;
|
extern int fuse_mmap_enable;
|
||||||
extern int fuse_sync_resize;
|
extern int fuse_sync_resize;
|
||||||
extern int fuse_fix_broken_io;
|
|
||||||
|
|
||||||
static inline struct fuse_data *
|
static inline struct fuse_data *
|
||||||
fuse_get_mpdata(struct mount *mp)
|
fuse_get_mpdata(struct mount *mp)
|
||||||
@ -276,14 +274,6 @@ fsess_opt_mmap(struct mount *mp)
|
|||||||
return ((data->dataflags & (FSESS_NO_DATACACHE | FSESS_NO_MMAP)) == 0);
|
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 */
|
/* Insert a new upgoing message */
|
||||||
static inline void
|
static inline void
|
||||||
fuse_ms_push(struct fuse_ticket *ftick)
|
fuse_ms_push(struct fuse_ticket *ftick)
|
||||||
|
@ -142,13 +142,6 @@ SYSCTL_INT(_vfs_fusefs, OID_AUTO, sync_resize, CTLFLAG_RW,
|
|||||||
"If a cached write extended a file, inform FUSE filesystem of the changed"
|
"If a cached write extended a file, inform FUSE filesystem of the changed"
|
||||||
"size immediately subsequent to the issued writes");
|
"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
|
static int
|
||||||
sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS)
|
sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS)
|
||||||
{
|
{
|
||||||
|
@ -273,7 +273,6 @@ fuse_vfsop_mount(struct mount *mp)
|
|||||||
FUSE_FLAGOPT(no_datacache, FSESS_NO_DATACACHE);
|
FUSE_FLAGOPT(no_datacache, FSESS_NO_DATACACHE);
|
||||||
FUSE_FLAGOPT(no_namecache, FSESS_NO_NAMECACHE);
|
FUSE_FLAGOPT(no_namecache, FSESS_NO_NAMECACHE);
|
||||||
FUSE_FLAGOPT(no_mmap, FSESS_NO_MMAP);
|
FUSE_FLAGOPT(no_mmap, FSESS_NO_MMAP);
|
||||||
FUSE_FLAGOPT(brokenio, FSESS_BROKENIO);
|
|
||||||
|
|
||||||
(void)vfs_scanopt(opts, "max_read=", "%u", &max_read);
|
(void)vfs_scanopt(opts, "max_read=", "%u", &max_read);
|
||||||
if (vfs_scanopt(opts, "timeout=", "%u", &daemon_timeout) == 1) {
|
if (vfs_scanopt(opts, "timeout=", "%u", &daemon_timeout) == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user