Print this page
OS-20 share_nfs(1m) charset handling is unreliable
OS-22 Page fault at nfscmd_dropped_entrysize+0x1e()
OS-23 NFSv2/3/4: READDIR responses are inconsistent when charset conversion fails
OS-24 rfs3_readdir(): Issues related to nfscmd_convdirent()
Reviewed by: Jan Kryl <jan.kryl@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
re #13613 rb4516 Tunables needs volatile keyword
*** 18,27 ****
--- 18,28 ----
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*
* Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
* All rights reserved.
*/
*** 1457,1467 ****
return (secpolicy_vnode_access2(cr, vp, va.va_uid,
va.va_mode << shift, mode));
}
! static int nfs_do_symlink_cache = 1;
/* ARGSUSED */
static int
nfs_readlink(vnode_t *vp, struct uio *uiop, cred_t *cr, caller_context_t *ct)
{
--- 1458,1468 ----
return (secpolicy_vnode_access2(cr, vp, va.va_uid,
va.va_mode << shift, mode));
}
! volatile int nfs_do_symlink_cache = 1;
/* ARGSUSED */
static int
nfs_readlink(vnode_t *vp, struct uio *uiop, cred_t *cr, caller_context_t *ct)
{
*** 1760,1770 ****
VN_RELE(avp);
return (error);
}
! static int nfs_lookup_neg_cache = 1;
#ifdef DEBUG
static int nfs_lookup_dnlc_hits = 0;
static int nfs_lookup_dnlc_misses = 0;
static int nfs_lookup_dnlc_neg_hits = 0;
--- 1761,1771 ----
VN_RELE(avp);
return (error);
}
! volatile int nfs_lookup_neg_cache = 1;
#ifdef DEBUG
static int nfs_lookup_dnlc_hits = 0;
static int nfs_lookup_dnlc_misses = 0;
static int nfs_lookup_dnlc_neg_hits = 0;
*** 2951,2961 ****
static int nfs_readdir_cache_waits = 0;
static int nfs_readdir_cache_misses = 0;
static int nfs_readdir_readahead = 0;
#endif
! static int nfs_shrinkreaddir = 0;
/*
* Read directory entries.
* There are some weird things to look out for here. The uio_offset
* field is either 0 or it is the offset returned from a previous
--- 2952,2962 ----
static int nfs_readdir_cache_waits = 0;
static int nfs_readdir_cache_misses = 0;
static int nfs_readdir_readahead = 0;
#endif
! volatile int nfs_shrinkreaddir = 0;
/*
* Read directory entries.
* There are some weird things to look out for here. The uio_offset
* field is either 0 or it is the offset returned from a previous
*** 3284,3294 ****
fip = &fi;
} else {
fip = NULL;
}
! rd.rd_entries = kmem_alloc(rdc->buflen, KM_SLEEP);
rd.rd_size = count;
rd.rd_offset = rda.rda_offset;
douprintf = 1;
--- 3285,3295 ----
fip = &fi;
} else {
fip = NULL;
}
! rd.rd_dirents = kmem_alloc(rdc->buflen, KM_SLEEP);
rd.rd_size = count;
rd.rd_offset = rda.rda_offset;
douprintf = 1;
*** 3334,3344 ****
rdc->entries = rddir_cache_buf_alloc(rdc->buflen,
KM_SLEEP);
#else
rdc->entries = kmem_alloc(rdc->buflen, KM_SLEEP);
#endif
! bcopy(rd.rd_entries, rdc->entries, rdc->entlen);
rdc->error = 0;
if (mi->mi_io_kstats) {
mutex_enter(&mi->mi_lock);
KSTAT_IO_PTR(mi->mi_io_kstats)->reads++;
KSTAT_IO_PTR(mi->mi_io_kstats)->nread +=
--- 3335,3345 ----
rdc->entries = rddir_cache_buf_alloc(rdc->buflen,
KM_SLEEP);
#else
rdc->entries = kmem_alloc(rdc->buflen, KM_SLEEP);
#endif
! bcopy(rd.rd_dirents, rdc->entries, rdc->entlen);
rdc->error = 0;
if (mi->mi_io_kstats) {
mutex_enter(&mi->mi_lock);
KSTAT_IO_PTR(mi->mi_io_kstats)->reads++;
KSTAT_IO_PTR(mi->mi_io_kstats)->nread +=
*** 3351,3361 ****
}
if (error) {
rdc->entries = NULL;
rdc->error = error;
}
! kmem_free(rd.rd_entries, rdc->buflen);
mutex_enter(&rp->r_statelock);
rdc->flags &= ~RDDIR;
if (rdc->flags & RDDIRWAIT) {
rdc->flags &= ~RDDIRWAIT;
--- 3352,3362 ----
}
if (error) {
rdc->entries = NULL;
rdc->error = error;
}
! kmem_free(rd.rd_dirents, rdc->buflen);
mutex_enter(&rp->r_statelock);
rdc->flags &= ~RDDIR;
if (rdc->flags & RDDIRWAIT) {
rdc->flags &= ~RDDIRWAIT;
*** 3611,3621 ****
/*
* number of NFS_MAXDATA blocks to read ahead
* optimized for 100 base-T.
*/
! static int nfs_nra = 4;
#ifdef DEBUG
static int nfs_lostpage = 0; /* number of times we lost original page */
#endif
--- 3612,3622 ----
/*
* number of NFS_MAXDATA blocks to read ahead
* optimized for 100 base-T.
*/
! volatile int nfs_nra = 4;
#ifdef DEBUG
static int nfs_lostpage = 0; /* number of times we lost original page */
#endif