summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* MFC r275897:kib2015-01-019-16/+16
| | | | | Set NOCACHE flag for CREATE namei() calls, do not specially handle MAKEENTRY in VOP_LOOKUP().
* MFC: r276221rmacklem2014-12-311-14/+0
| | | | | | | Delete some duplicate code that was harmless because exactly the same code is at the end of the nfscl_checksattr() function that is called just before it. As such, this code had already been executed and didn't do anything.
* MFC: r276193rmacklem2014-12-312-33/+101
| | | | | | | | | | | | | A deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1 was reported via email. This was caused by a LOR between the sleep lock used to serialize the local locking (nfsrv_locklf()) and locking the vnode. I believe this patch fixes the problem by delaying relocking of the vnode until the sleep lock is unlocked (nfsrv_unlocklf()). To avoid nfsvno_advlock() having the side effect of unlocking the vnode, unlocking the vnode was moved to before the functions that call nfsvno_advlock(). It shouldn't affect the execution of the default case where vfs.nfsd.enable_locallocks=0.
* MFC r275638:kib2014-12-301-3/+7
| | | | Do not call VFS_SYNC() before VFS_UNMOUNT() for forced unmount.
* MFH r275941:peterj2014-12-281-1/+2
| | | | | | | | | | | | | | Adjust the test of a KASSERT to better match the intent. This assertion was added in r246213 as a guard against corrupted mbufs arriving from drivers, the key distinguishing factor of said mbufs being that they had a negative length. Given we're in a while loop specifically designed to skip over zero-length mbufs, panicking on a zero-length mbuf seems incorrect. Suggested by: rmacklem MFH go-ahead: benno Approved by: grog (co-mentor)
* MFC r274437;pfg2014-12-233-2/+6
| | | | | | | | ifdef ext2_print_inode which is not really used. ext2_print_inode was nice to have for initial development work but is not really used anymore. #ifdef it under a new EXT2FS_DEBUG knob so that we don't spend time compiling it.
* MFC r274784:trasz2014-12-211-2/+0
| | | | | | | | | | Fix smbfs to not zero out statfs f_flags field. Previously, this made getmntinfo() return empty flags for smbfs filesystems when called with MNT_WAIT. It's not visible with mount(8), since it uses MNT_NOWAIT, but broke autounmount(8) operation. PR: 195161 Sponsored by: The FreeBSD Foundation
* MFC r275645;pfg2014-12-161-6/+16
| | | | | | | | | | | | | | | ext2fs: Fix old out-of-bounds access. Overrunning buffer pointed to by (caddr_t)&oip->i_db[0] of 48 bytes by passing it to a function which accesses it at byte offset 59 using argument 60UL. The issue was inherited from an older FFS implementation and fixed there with by merging UFS2 in r98542. We follow the FFS fix. CID: 1007665 Discussed with: bde
* MFC r273852:trasz2014-11-291-1/+1
| | | | | | Fix handling of "conn" mount_nfs(8) option. Sponsored by: The FreeBSD Foundation
* MFC r273849:trasz2014-11-291-6/+34
| | | | | | | | Add support for "timeo", "actimeo", "noac", and "proto" options to mount_nfs(8). They are implemented on Linux, OS X, and Solaris, and thus can be expected to appear in automounter maps. Sponsored by: The FreeBSD Foundation
* MFC r272931:trasz2014-11-071-1/+5
| | | | | | Add assertion to catch duplicated nodes. Sponsored by: The FreeBSD Foundation
* MFC r272836:trasz2014-11-071-2/+2
| | | | | | Remove remnants of some cleanup; no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r272743:trasz2014-11-071-1/+1
| | | | | | Simplify; no functional changes. Sponsored by: The FreeBSD Foundation
* MFC r272512:trasz2014-11-073-9/+16
| | | | | | Make autofs use shared vnode locks. Sponsored by: The FreeBSD Foundation
* MFC r272471:trasz2014-11-071-7/+10
| | | | | | Fix autofs debug macros. Sponsored by: The FreeBSD Foundation
* MFC r272470:trasz2014-11-074-22/+25
| | | | | | Make autofs(4) use shared lock for lookups, instead of exclusive one. Sponsored by: The FreeBSD Foundation
* MFC r272405:trasz2014-11-071-2/+2
| | | | | | Call uma_zfree() outside of lock, and improve comment. Sponsored by: The FreeBSD Foundation
* MFC r272403:trasz2014-11-074-6/+15
| | | | | | | Make autofs timeout handling use timeout task instead of callout; that's because the handler can sleep on sx lock. Sponsored by: The FreeBSD Foundation
* MFC: r273486rmacklem2014-11-051-6/+16
| | | | | | | | Clip the settings for the NFS rsize, wsize mount options to a power of 2. For non-power of 2 settings, intermittent page faults have been reported. Although the bug that causes these page faults/crashes has not been identified, it does not appear to occur when rsize, wsize is a power of 2.
* MFC r273727:kib2014-11-031-3/+3
| | | | | | | | | Original commit message was Allow the vfs.nfsd knobs to be set from loader.conf (or using kenv(8)). This is useful when nfsd is loaded as module. As I understand, automatic fetch from kenv does not work in stable/10. Merge the change still, to reduce code difference.
* MFC r273159:araujo2014-10-311-2/+14
| | | | | | | | | | | | | | | | Add two sysctl(8) to enable/disable NFSv4 server to check when setting user nobody and/or setting group nogroup as owner of a file or directory. Usually at the client side, if there is an username that is not in the client's passwd database, some clients will send 'nobody@<your.dns.domain>' in the wire and the NFSv4 server will treat it as an ERROR. However, if you have a valid user nobody in your passwd database, the NFSv4 server will treat it as a NFSERR_BADOWNER as its believes the client doesn't has the username mapped. Submitted by: Loic Blot <loic.blot@unix-experience.fr> Reviewed by: rmacklem Approved by: rmacklem Sponsored by: QNAP Systems Inc.
* MFC r263710, r273377, r273378, r273423 and r273455:hselasky2014-10-274-6/+9
| | | | | | | - De-vnet hash sizes and hash masks. - Fix multiple issues related to arguments passed to SYSCTL macros. Sponsored by: Mellanox Technologies
* MFC r273132:kib2014-10-221-54/+10
| | | | Style changes for deadfs.
* MFC r273131:kib2014-10-222-13/+19
| | | | | When vnode bypass cannot be performed on the cdev file descriptor for read/write/poll/ioctl, call standard vnode filedescriptor fop.
* MFC r273130:kib2014-10-221-6/+9
| | | | | | Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller is interested in i/o state. Return POLLNVAL for invalid bits, similar to poll_no_poll().
* MFC r272952:kib2014-10-182-2/+2
| | | | Do not set IN_ACCESS flag for read-only mounts.
* MFC r271467, r271468:pfg2014-10-041-2/+47
| | | | | | | | ext2fs: add ext2_getpages(). Literally copy/pasted from ffs_getpages(). Tested with: fsx
* MFC r272025:trasz2014-09-251-0/+2
| | | | | | | | | | | | Fix thinko that, with two map entries like shown below, in that order, made autofs mix them up: the second one wasn't visible in ls(1) output, and trying to access it would trigger mount for the first one. foobar host:/foobar foo host:/foo Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r270507:trasz2014-08-311-3/+0
| | | | | | | | Fix bug that, assuming a/ is a root of NFS filesystem mounted on autofs, prevented "mv a/from a/to" from working, while "cd a && mv from to" was ok. PR: 192948 Sponsored by: The FreeBSD Foundation
* MFC r270402:trasz2014-08-314-73/+77
| | | | | | | | Autofs softc needs to be global anyway, so don't pass it as a local variable, and don't store in autofs_mount. Also rename it from 'sc' to 'autofs_softc', since it's global and extern. Sponsored by: The FreeBSD Foundation
* MFC r270399:trasz2014-08-311-0/+8
| | | | | | Add comment explaining one of the quirks in autofs. Sponsored by: The FreeBSD Foundation
* MFC r270281:trasz2014-08-313-4/+4
| | | | | | | Fix includes. Suggested by: pluknet@ Sponsored by: The FreeBSD Foundation
* MFC r270276:trasz2014-08-314-6/+6
| | | | | | | Use __FBSDID() properly. Suggested by: pluknet@ Sponsored by: The FreeBSD Foundation
* MFC r270207:trasz2014-08-311-14/+18
| | | | | | | Rework ".." lookup; previous one failed to properly busy the mountpoint. Reviewed by: kib@ Sponsored by: The FreeBSD Foundation
* MFC r270096:trasz2014-08-315-0/+1722
| | | | | | | | | | | | | Bring in the new automounter, similar to what's provided in most other UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format, has proper kernel support, and LDAP integration. There are still a few outstanding problems; they will be fixed shortly. Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) Phabric: D523 Relnotes: yes Sponsored by: The FreeBSD Foundation
* MFC r269708:kib2014-08-221-4/+40
| | | | | Unlock ldvp and lock dvp to compensate for possible ldvp unlock in lower VOP_LOOKUP() and dvp reclamation. Use cached value of dvp->v_mount.
* MFC: r269771rmacklem2014-08-161-4/+3
| | | | | | Change the NFS server's printf related to hitting the DRC cache's flood level so that it suggests increasing vfs.nfsd.tcphighwater.
* MFC r269347:kib2014-08-072-16/+8
| | | | | Do not generate 1000 unique lock names for nfsrc hash chain locks. Shorten the names of some nfs mutexes.
* MFC r269187:kib2014-08-041-0/+4
| | | | | Assert that nullfs vnode has VV_ROOT set whenever lower vnode has. Assert that dotdot lookup on the root vnode is not performed.
* MFC: r268273rmacklem2014-08-031-2/+4
| | | | | | | | | | | | The new NFSv3 server did not generate directory postop attributes for the reply to ReaddirPlus when the server failed within the loop that calls VFS_VGET(). This failure is most likely an error return from VFS_VGET() caused by a bogus d_fileno that was truncated to 32bits. This patch fixes the server so that it will return directory postop attributes for the failure. It does not fix the underlying issue caused by d_fileno being uint32_t when a file system like ZFS generates a fileno that is greater than 32bits.
* MFC: r268115rmacklem2014-08-0118-332/+2060
| | | | | | | | Merge the NFSv4.1 server code in projects/nfsv4.1-server over into head. The code is not believed to have any effect on the semantics of non-NFSv4.1 server behaviour. It is a rather large merge, but I am hoping that there will not be any regressions for the NFS server.
* MFC r268765:kib2014-07-301-1/+0
| | | | Remove unused header.
* MFC r268764:kib2014-07-305-36/+0
| | | | | Check for the cross-device cross-link attempt in the VFS, instead of VOP_LINK() implemenations.
* MFC r268766:kib2014-07-281-1/+3
| | | | Do not ignore error from tmpfs_alloc_vp().
* MFC r268617:kib2014-07-283-27/+74
| | | | Rework the tmpfs unmount.
* MFC r268615:kib2014-07-281-1/+1
| | | | | | | | | | | Add OBJ_TMPFS_NODE flag. MFC r268616: Set the OBJ_TMPFS_NODE flag for vm_object of VREG tmpfs node. MFC r269053: Correct assertion. tmpfs vm object is always at the bottom of the shadow chain.
* MFC r268614:kib2014-07-281-13/+13
| | | | | Use tmpfs_vn_get_ino_gen() to handle the races with reclaim in tmpfs dotdot lookup.
* MFC r268613:kib2014-07-282-1/+2
| | | | Style. Add comment about lock mode.
* MFC r268611:kib2014-07-281-9/+5
| | | | Replace goto's with the return.
* MFC r268610:kib2014-07-282-1/+3
| | | | Add convenience macro to assert tmpfs node lock.
OpenPOWER on IntegriCloud