aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient
Commit message (Collapse)AuthorAgeFilesLines
* nfs: clean up empty lines in .c and .h filesMateusz Guzik2020-09-012-2/+1
| | | | Notes: svn path=/head/; revision=365082
* style: Remove remaining deprecated MALLOC/FREE macrosConrad Meyer2018-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Mechanically replace uses of MALLOC/FREE with appropriate invocations of malloc(9) / free(9) (a series of sed expressions). Something like: * MALLOC(a, b, ... -> a = malloc(... * FREE( -> free( * free((caddr_t) -> free( No functional change. For now, punt on modifying contrib ipfilter code, leaving a definition of the macro in its KMALLOC(). Reported by: jhb Reviewed by: cy, imp, markj, rmacklem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14035 Notes: svn path=/head/; revision=328417
* sys: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326272
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-206-0/+12
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Add an NFSv4.1 mount option for "use one openowner".Rick Macklem2017-04-131-1/+1
| | | | | | | | | | | | | | | | Some NFSv4.1 servers such as AmazonEFS can only support a small fixed number of open_owner4s. This patch adds a mount option called "oneopenown" that can be used for NFSv4.1 mounts to make the client do all Opens with the same open_owner4 string. This option can only be used with NFSv4.1 and may not work correctly when Delegations are is use. Reported by: cperciva Tested by: cperciva MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8988 Notes: svn path=/head/; revision=316792
* Renumber copyright clause 4Warner Losh2017-02-286-6/+6
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Remove some oldnfs remnants.Edward Tomasz Napierala2015-04-181-3/+0
| | | | | | | | | Differential Revision: https://reviews.freebsd.org/D2287 Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281691
* Remove the old NFS client and server from head,Rick Macklem2014-12-238-10111/+0
| | | | | | | | | | | | | | | which means that the NFSCLIENT and NFSSERVER kernel options will no longer work. This commit only removes the kernel components. Removal of unused code in the user utilities will be done later. This commit does not include an addition to UPDATING, but that will be committed in a few minutes. Discussed on: freebsd-fs Notes: svn path=/head/; revision=276096
* The VOP_LOOKUP() implementations for CREATE op do not put the nameKonstantin Belousov2014-12-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | into namecache, to avoid cache trashing when doing large operations. E.g., tar archive extraction is not usually followed by access to many of the files created. Right now, each VOP_LOOKUP() implementation explicitely knowns about this quirk and tests for both MAKEENTRY flag presence and op != CREATE to make the call to cache_enter(). Centralize the handling of the quirk into VFS, by deciding to cache only by MAKEENTRY flag in VOP. VFS now sets NOCACHE flag for CREATE namei() calls. Note that the change in semantic is backward-compatible and could be merged to the stable branch, and is compatible with non-changed third-party filesystems which correctly handle MAKEENTRY. Suggested by: Chris Torek <torek@pi-coral.com> Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=275897
* Follow up to r225617. In order to maximize the re-usability of kernel codeDavide Italiano2014-10-161-1/+1
| | | | | | | | | | | in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv(). This fixes a namespace collision with libc symbols. Submitted by: kmacy Tested by: make universe Notes: svn path=/head/; revision=273174
* Avoid an exclusive acquisition of the object lock on the expected executionAlan Cox2014-09-141-20/+9
| | | | | | | | | | | | | | | | | path through the NFS clients' getpages functions. Introduce vm_pager_free_nonreq(). This function can be used to eliminate code that is duplicated in many getpages functions. Also, in contrast to the code that currently appears in those getpages functions, vm_pager_free_nonreq() avoids acquiring an exclusive object lock in one case. Reviewed by: kib MFC after: 6 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=271596
* For software builds, the NFS client does many smallRick Macklem2013-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | synchronous (with FILE_SYNC) writes because non-contiguous byte ranges in the same buffer cache block are being written. This patch adds a new mount option "noncontigwr" which allows the non-contiguous byte ranges to be combined, with the dirty byte range becoming the superset of the bytes that are dirty, if the file has not been file locked. This reduces the number of writes significantly for software builds. The only case where this change might break existing applications is where an application is writing non-overlapping byte ranges within the same buffer cache block of a file from multiple clients concurrently. Since such an application would normally do file locking on the file, avoiding the byte range merge for files that have been file locked should be sufficient for most (maybe all?) cases. Submitted by: jhb (earlier version) Reviewed by: kib MFC after: 3 weeks Notes: svn path=/head/; revision=259084
* - For kernel compiled only with KDTRACE_HOOKS and not any lock debuggingAttilio Rao2013-11-254-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined version of the releasing functions for mutex, rwlock and sxlock. Failing to do so skips the lockstat_probe_func invokation for unlocking. - As part of the LOCKSTAT support is inlined in mutex operation, for kernel compiled without lock debugging options, potentially every consumer must be compiled including opt_kdtrace.h. Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES is linked there and it is only used as a compile-time stub [0]. [0] immediately shows some new bug as DTRACE-derived support for debug in sfxge is broken and it was never really tested. As it was not including correctly opt_kdtrace.h before it was never enabled so it was kept broken for a while. Fix this by using a protection stub, leaving sfxge driver authors the responsibility for fixing it appropriately [1]. Sponsored by: EMC / Isilon storage division Discussed with: rstone [0] Reported by: rstone [1] Discussed with: philip Notes: svn path=/head/; revision=258541
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-262-0/+5
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* A problem with the old NFS client where large writes to large filesRick Macklem2013-07-041-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | would sometimes result in a corrupted file was reported via email. This problem appears to have been caused by r251719 (reverting r251719 fixed the problem). Although I have not been able to reproduce this problem, I suspect it is caused by another thread increasing np->n_size after the mtx_unlock(&np->n_mtx) but before the vnode_pager_setsize() call. Since the np->n_mtx mutex serializes updates to np->n_size, doing the vnode_pager_setsize() with the mutex locked appears to avoid the problem. Unfortunately, vnode_pager_setsize() where the new size is smaller, cannot be called with a mutex held. This patch returns the semantics to be close to pre-r251719 such that the call to the vnode_pager_setsize() is only delayed until after the mutex is unlocked when np->n_size is shrinking. Since the file is growing when being written, I believe this will fix the corruption. Reported by: David G. Lawrence (dg@dglawrence.com) Tested by: David G. Lawrence (pending, to happen soon) Reviewed by: kib MFC after: 1 week Notes: svn path=/head/; revision=252673
* A recent version of the oldnfs NFS client in head/currentRick Macklem2013-07-011-2/+2
| | | | | | | | | | | | | will crash when doing a large write, since m_get2() would return NULL. This patch fixes the problem, since nfsm_uiotombuf() will allocate additional mbufs, as required. Reported by: sbruno Tested by: sbruno Discussed with: glebius Notes: svn path=/head/; revision=252479
* - Convert the bufobj lock to rwlock.Jeff Roberson2013-05-312-1/+2
| | | | | | | | | | | | | - Use a shared bufobj lock in getblk() and inmem(). - Convert softdep's lk to rwlock to match the bufobj lock. - Move INFREECNT to b_flags and protect it with the buf lock. - Remove unnecessary locking around bremfree() and BKGRDINPROG. Sponsored by: EMC / Isilon Storage Division Discussed with: mckusick, kib, mdf Notes: svn path=/head/; revision=251171
* Add a patch analygous to r248567, r248581, r251079 to theRick Macklem2013-05-291-1/+8
| | | | | | | | | | | old NFS client to avoid the panic reported in the PR by doing the vnode_pager_setsize() call after unlocking the mutex. PR: 177335 MFC after: 2 weeks Notes: svn path=/head/; revision=251089
* When an NFS unmount occurs, once vflush() writes the last dirtyRick Macklem2013-04-182-1/+17
| | | | | | | | | | | | | | | | | | | buffer for the last vnode on the mount back to the server, it returns. At that point, the code continues with the unmount, including freeing up the nfs specific part of the mount structure. It is possible that an nfsiod thread will try to check for an empty I/O queue in the nfs specific part of the mount structure after it has been free'd by the unmount. This patch avoids this problem by setting the iodmount entries for the mount back to NULL while holding the mutex in the unmount and checking the appropriate entry is non-NULL after acquiring the mutex in the nfsiod thread. Reported and tested by: pho Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=249630
* Both NFS clients can deadlock when using the "rdirplus" mountRick Macklem2013-04-181-2/+10
| | | | | | | | | | | | | | | | | | | | | | option. This can occur when an nfsiod thread that already holds a buffer lock attempts to acquire a vnode lock on an entry in the directory (a LOR) when another thread holding the vnode lock is waiting on an nfsiod thread. This patch avoids the deadlock by disabling readahead for this case, so the nfsiod threads never do readdirplus. Since readaheads for directories need the directory offset cookie from the previous read, they cannot normally happen in parallel. As such, testing by jhb@ and myself didn't find any performance degredation when this patch is applied. If there is a case where this results in a significant performance degradation, mounting without the "rdirplus" option can be done to re-enable readahead for directories. Reported and tested by: jhb Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=249623
* Fix remainder calculation when biosize is not a power of 2Ed Maste2013-03-191-3/+3
| | | | | | | | | | | In common configurations biosize is a power of two, but is not required to be so. Thanks to markj@ for spotting an additional case beyond my original patch. Reviewed by: rmacklem@ Notes: svn path=/head/; revision=248500
* Revert 195703 and 195821 as this special stop handling in NFS is nowJohn Baldwin2013-03-133-9/+7
| | | | | | | | implemented via VFCF_SBDRY rather than passing PBDRY to individual sleep calls. Notes: svn path=/head/; revision=248255
* Functions m_getm2() and m_get2() have different order of arguments,Gleb Smirnoff2013-03-122-35/+36
| | | | | | | | | | and that can drive someone crazy. While m_get2() is young and not documented yet, change its order of arguments to match m_getm2(). Sorry for churn, but better now than later. Notes: svn path=/head/; revision=248207
* - Use m_get2() instead of nfsm_reqhead().Gleb Smirnoff2013-03-124-88/+45
| | | | | | | | | - Use m_get(), m_getcl() instead of historic macros. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=248198
* Switch the vm_object mutex to be a rwlock. This will enable in theAttilio Rao2013-03-092-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | future further optimizations where the vm_object lock will be held in read mode most of the time the page cache resident pool of pages are accessed for reading purposes. The change is mostly mechanical but few notes are reported: * The KPI changes as follow: - VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK() - VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK() - VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK() - VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED() (in order to avoid visibility of implementation details) - The read-mode operations are added: VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(), VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED() * The vm/vm_pager.h namespace pollution avoidance (forcing requiring sys/mutex.h in consumers directly to cater its inlining functions using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h consumers now must include also sys/rwlock.h. * zfs requires a quite convoluted fix to include FreeBSD rwlocks into the compat layer because the name clash between FreeBSD and solaris versions must be avoided. At this purpose zfs redefines the vm_object locking functions directly, isolating the FreeBSD components in specific compat stubs. The KPI results heavilly broken by this commit. Thirdy part ports must be updated accordingly (I can think off-hand of VirtualBox, for example). Sponsored by: EMC / Isilon storage division Reviewed by: jeff Reviewed by: pjd (ZFS specific review) Discussed with: alc Tested by: pho Notes: svn path=/head/; revision=248084
* Further refine the handling of stop signals in the NFS client. TheJohn Baldwin2013-02-212-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes in r246417 were incomplete as they did not add explicit calls to sigdeferstop() around all the places that previously passed SBDRY to _sleep(). In addition, nfs_getcacheblk() could trigger a write RPC from getblk() resulting in sigdeferstop() recursing. Rather than manually deferring stop signals in specific places, change the VFS_*() and VOP_*() methods to defer stop signals for filesystems which request this behavior via a new VFCF_SBDRY flag. Note that this has to be a VFC flag rather than a MNTK flag so that it works properly with VFS_MOUNT() when the mount is not yet fully constructed. For now, only the NFS clients are set this new flag in VFS_SET(). A few other related changes: - Add an assertion to ensure that TDF_SBDRY doesn't leak to userland. - When a lookup request uses VOP_READLINK() to follow a symlink, mark the request as being on behalf of the thread performing the lookup (cnp_thread) rather than using a NULL thread pointer. This causes NFS to properly handle signals during this VOP on an interruptible mount. PR: kern/176179 Reported by: Russell Cattelan (sigdeferstop() recursion) Reviewed by: kib MFC after: 1 month Notes: svn path=/head/; revision=247116
* Rework the handling of stop signals in the NFS client. The changes inJohn Baldwin2013-02-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 195702, 195703, and 195821 prevented a thread from suspending while holding locks inside of NFS by forcing the thread to fail sleeps with EINTR or ERESTART but defer the thread suspension to the user boundary. However, this had the effect that stopping a process during an NFS request could abort the request and trigger EINTR errors that were visible to userland processes (previously the thread would have suspended and completed the request once it was resumed). This change instead effectively masks stop signals while in the NFS client. It uses the existing TDF_SBDRY flag to effect this since SIGSTOP cannot be masked directly. Also, instead of setting PBDRY on individual sleeps, the NFS client now sets the TDF_SBDRY flag around each NFS request and stop signals are masked for all sleeps during that region (the previous change missed sleeps in lockmgr locks). The end result is that stop signals sent to threads performing an NFS request are completely ignored until after the NFS request has finished processing and the thread prepares to return to userland. This restores the behavior of stop signals being transparent to userland processes while still preventing threads from suspending while holding NFS locks. Reviewed by: kib MFC after: 1 month Notes: svn path=/head/; revision=246417
* Further cleanups to use of timestamps in NFS:John Baldwin2013-01-251-8/+5
| | | | | | | | | | | | | | | | | | - Use NFSD_MONOSEC (which maps to time_uptime) instead of the seconds portion of wall-time stamps to manage timeouts on events. - Remove unused nd_starttime from the per-request structure in the new NFS server. - Use nanotime() for the modification time on a delegation to get as precise a time as possible. - Use time_second instead of extracting the second from a call to getmicrotime(). Submitted by: bde (3) Reviewed by: bde, rmacklem MFC after: 2 weeks Notes: svn path=/head/; revision=245909
* Use vfs_timestamp() to set file timestamps rather than invokingJohn Baldwin2013-01-181-3/+3
| | | | | | | | | | getmicrotime() or getnanotime() directly in NFS. Reviewed by: rmacklem, bde MFC after: 1 week Notes: svn path=/head/; revision=245611
* Use the VA_UTIMES_NULL flag to detect when NULL was passed to utimes()John Baldwin2013-01-161-2/+2
| | | | | | | | | | | instead of comparing the desired time against the current time as a heuristic. Reviewed by: rmacklem MFC after: 1 week Notes: svn path=/head/; revision=245508
* - More properly handle interrupted NFS requests on an interruptible mountJohn Baldwin2013-01-151-4/+12
| | | | | | | | | | | | by returning an error of EINTR rather than EACCES. - While here, bring back some (but not all) of the NFS RPC statistics lost when krpc was committed. Reviewed by: rmacklem MFC after: 1 week Notes: svn path=/head/; revision=245476
* Move the NFSv4.1 client patches over from projects/nfsv4.1-clientRick Macklem2012-12-081-0/+1
| | | | | | | | | | | | | to head. I don't think the NFS client behaviour will change unless the new "minorversion=1" mount option is used. It includes basic NFSv4.1 support plus support for pNFS using the Files Layout only. All problems detecting during an NFSv4.1 Bakeathon testing event in June 2012 have been resolved in this code and it has been tested against the NFSv4.1 server available to me. Although not reviewed, I believe that kib@ has looked at it. Notes: svn path=/head/; revision=244042
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-052-9/+9
| | | | | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually Notes: svn path=/head/; revision=243882
* r16312 is not any longer real since many years (likely since when VFSAttilio Rao2012-11-191-6/+0
| | | | | | | | | | | | | received granular locking) but the comment present in UFS has been copied all over other filesystems code incorrectly for several times. Removes comments that makes no sense now. Reviewed by: kib MFC after: 3 days Notes: svn path=/head/; revision=243311
* Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag.Attilio Rao2012-11-091-1/+1
| | | | | | | | Porters should refer to __FreeBSD_version 1000021 for this change as it may have happened at the same timeframe. Notes: svn path=/head/; revision=242833
* Do not leave invalid pages in the object after the short read for aKonstantin Belousov2012-08-141-4/+8
| | | | | | | | | | | | | | | | | network file systems (not only NFS proper). Short reads cause pages other then the requested one, which were not filled by read response, to stay invalid. Change the vm_page_readahead_finish() interface to not take the error code, but instead to make a decision to free or to (de)activate the page only by its validity. As result, not requested invalid pages are freed even if the read RPC indicated success. Noted and reviewed by: alc MFC after: 1 week Notes: svn path=/head/; revision=239246
* After the PHYS_TO_VM_PAGE() function was de-inlined, the main reasonKonstantin Belousov2012-08-051-0/+1
| | | | | | | | | | | | | | | | to pull vm_param.h was removed. Other big dependency of vm_page.h on vm_param.h are PA_LOCK* definitions, which are only needed for in-kernel code, because modules use KBI-safe functions to lock the pages. Stop including vm_param.h into vm_page.h. Include vm_param.h explicitely for the kernel code which needs it. Suggested and reviewed by: alc MFC after: 2 weeks Notes: svn path=/head/; revision=239065
* Reduce code duplication and exposure of direct access to structKonstantin Belousov2012-08-041-30/+2
| | | | | | | | | | | | vm_page oflags by providing helper function vm_page_readahead_finish(), which handles completed reads for pages with indexes other then the requested one, for VOP_GETPAGES(). Reviewed by: alc MFC after: 1 week Notes: svn path=/head/; revision=239040
* PR# 165923 reported intermittent write failures for dirtyRick Macklem2012-05-124-1/+25
| | | | | | | | | | | | | | | | | | | | | | memory mapped pages being written back on an NFS mount. Since any thread can call VOP_PUTPAGES() to write back a dirty page, the credentials of that thread may not have write access to the file on an NFS server. (Often the uid is 0, which may be mapped to "nobody" in the NFS server.) Although there is no completely correct fix for this (NFS servers check access on every write RPC instead of at open/mmap time), this patch avoids the common cases by holding onto a credential that recently opened the file for writing and uses that credential for the write RPCs being done by VOP_PUTPAGES() for both NFS clients. Tested by: Joel Ray Holveck (joelh at juniper.net) PR: kern/165923 Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=235332
* Fix mount mutex handling missed in r234386.Kirk McKusick2012-05-101-1/+0
| | | | Notes: svn path=/head/; revision=235246
* Fix mount mutex handling missed in r234386.Sergey Kandaurov2012-05-051-0/+1
| | | | Notes: svn path=/head/; revision=235052
* Remove unused thread argument from vtruncbuf().Edward Tomasz Napierala2012-04-231-1/+1
| | | | | | | Reviewed by: kib Notes: svn path=/head/; revision=234605
* Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL.Kirk McKusick2012-04-172-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | The primary changes are that the user of the interface no longer needs to manage the mount-mutex locking and that the vnode that is returned has its mutex locked (thus avoiding the need to check to see if its is DOOMED or other possible end of life senarios). To minimize compatibility issues for third-party developers, the old MNT_VNODE_FOREACH interface will remain available so that this change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH will be removed in head. The reason for this update is to prepare for the addition of the MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks Notes: svn path=/head/; revision=234386
* Remove fifo.h. The only used function declaration from the header isKonstantin Belousov2012-03-111-2/+0
| | | | | | | | | migrated to sys/vnode.h. Submitted by: gianni Notes: svn path=/head/; revision=232821
* Post r230394, the Lookup RPC counts for both NFS clients increasedRick Macklem2012-03-031-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | significantly. Upon investigation this was caused by name cache misses for lookups of "..". For name cache entries for non-".." directories, the cache entry serves double duty. It maps both the named directory plus ".." for the parent of the directory. As such, two ctime values (one for each of the directory and its parent) need to be saved in the name cache entry. This patch adds an entry for ctime of the parent directory to the name cache. It also adds an additional uma zone for large entries with this time value, in order to minimize memory wastage. As well, it fixes a couple of cases where the mtime of the parent directory was being saved instead of ctime for positive name cache entries. With this patch, Lookup RPC counts return to values similar to pre-r230394 kernels. Reported by: bde Discussed with: kib Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=232420
* Fix the NFS clients so that they use copyin() instead of bcopy(),Rick Macklem2012-03-011-1/+16
| | | | | | | | | | | when doing direct I/O. This direct I/O code is not enabled by default. Submitted by: kib (earlier version) Reviewed by: kib MFC after: 1 week Notes: svn path=/head/; revision=232327
* Adjust the nfs_skip_wcc_data_onerr setting so that it does not blockJohn Baldwin2012-02-241-5/+7
| | | | | | | | | | post-op attributes for ENOENT errors now that the name caching logic depends on working post-op attributes. MFC after: 2 weeks Notes: svn path=/head/; revision=232116
* Fix found places where uio_resid is truncated to int.Konstantin Belousov2012-02-211-7/+7
| | | | | | | | | | | | Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode. Discussed with: bde, das (previous versions) MFC after: 1 month Notes: svn path=/head/; revision=231949
* IFC @231845Bjoern A. Zeeb2012-02-171-2/+2
|\ | | | | | | | | | | | | Sponsored by: Cisco Systems, Inc. Notes: svn path=/projects/multi-fibv6/head/; revision=231846
| * Rename cache_lookup_times() to cache_lookup() and retire the old API andJohn Baldwin2012-02-061-1/+1
| | | | | | | | | | | | | | ABI stub for cache_lookup(). Notes: svn path=/head/; revision=231088