summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r281628rmacklem2015-04-304-7/+18
| | | | | | | | | | | mav@ has found that NFS servers exporting ZFS file systems can perform better when using a 128K read/write data size. This patch changes NFS_MAXDATA from 64K to 128K so that clients can use 128K for NFS mounts to allow this. The patch also renames NFS_MAXDATA to NFS_SRVMAXIO so that it is clear that it applies to the NFS server side only. It also avoids a name conflict with the NFS_MAXDATA defined in rpcsvc/nfs_prot.h, that is used for userland RPC.
* MFC: r281562rmacklem2015-04-307-3/+13
| | | | | | | | | | | File systems that do not use the buffer cache (such as ZFS) must use VOP_FSYNC() to perform the NFS server's Commit operation. This patch adds a mnt_kern_flag called MNTK_USES_BCACHE which is set by file systems that use the buffer cache. If this flag is not set, the NFS server always does a VOP_FSYNC(). This should be ok for old file system modules that do not set MNTK_USES_BCACHE, since calling VOP_FSYNC() is correct, although it might not be optimal for file systems that use the buffer cache.
* MFC r281756:pfg2015-04-241-1/+3
| | | | | | | | nfsrpc_createv4: fix double free. Reported by: Oliver Pinter, clang static checker Obtained from: HardenedBSD (63cac77c42c0c3fc67da62f97d5ab651d52ae707) Reviewed by: rmacklem
* MFC r281670, r281703:pfg2015-04-227-1492/+115
| | | | | | | | | | | | | | | | | | | | | | | Drop experimental ext2fs dir_index support. The htree directory index is a highly desirable feature for research purposes and was meant to improve performance in our ext2/3 driver. Unfortunately our implementation has two problems: - It never really delivered any performance improvement. - It appears to corrupt the filesystem in undetermined circumstances. Strictly speaking dir_index is not required for read/write support in ext2/3 and our limited ext4 support still works fine without it. Regain stability in the ext2 driver by removing it. We may need it back (fixed) if we want to support encrypted ext4 support but thanks to the wonders of version control we can always revert this change and bring it back. PR: 191895 PR: 198731 PR: 199309
* MFC r281121:kib2015-04-121-6/+6
| | | | | | Do not call msdosfs_sync() on the read-only msdosfs mounts. PR: 199152
* MFC r281120:kib2015-04-121-0/+6
| | | | | Assert that an msdosfs mount is not read-only when FAT modifications are requested.
* MFC: r276347rmacklem2015-04-101-1/+8
| | | | | | | | | | | | | | | | | | r245508 modified the NFS client's Setattr RPC to use VA_UTIMES_NULL to indicate whether it should set the time to the current tod on the server. This had the side effect of making the NFS client use the client's timestamp for exclusive create, starting with FreeBSD9.2. Unfortunately a bug in some Solaris NFS servers causes these servers to return NFS_OK to the Setattr RPC done during exclusive create, but not actually set the file's mode, leaving the file's mode == 0. This patch restores the NFS client's behaviour to use the server's tod for the exclusive open's Setattr RPC, to avoid the Solaris server bug and to restore the pre-FreeBSD9.2 NFS behaviour.
* MFC r280308 (by delphij):kib2015-04-082-3/+30
| | | | | | | Disable timestamping on devfs read/write operations by default. MFC r280949: Refine r280308. Use seconds precision for devfs timestamps by default.
* MFC r280342:kib2015-04-051-4/+2
| | | | msdosfs: mark unused compat-mount fields.
* Merge r263233 from HEAD to stable/10:rwatson2015-03-194-4/+4
| | | | | | | | | Update kernel inclusions of capability.h to use capsicum.h instead; some further refinement is required as some device drivers intended to be portable over FreeBSD versions rely on __FreeBSD_version to decide whether to include capability.h. Sponsored by: Google, Inc.
* MFC r279401:kib2015-03-141-10/+32
| | | | | Some fixes for fdescfs lookup code Do not ever return doomed vnode from. lookup. Reuse the vn_vget_ino_gen() helper to handle parallel unmounts .
* MFC r271927:trasz2015-03-071-11/+1
| | | | | | | Turns out -1 is a perfectly valid error number, ERESTART. Remove useless code written under assumption that it wasn't. Sponsored by: The FreeBSD Foundation
* MFC r274859:trasz2015-03-073-1/+16
| | | | | | Implement "automount -c". Sponsored by: The FreeBSD Foundation
* MFC r273127:trasz2015-03-073-6/+73
| | | | | | | | | | | | | | | | | Make automountd(8) inform autofs(4) whether directory being handled can have wildcards. This makes it possible for autofs(4) to avoid requesting automountd(8) action on access to nonexistent nodes - unless wildcards are actually used. Note that this change breaks ABI for automountd(8). MFC r278521: Restore ABI compatibility, broken in r273127. Note that while this fixes ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8) is neccessary. Sponsored by: The FreeBSD Foundation
* MFC r279362:kib2015-03-061-2/+1
| | | | | | | The VNASSERT in vflush() FORCECLOSE case is trying to panic early to prevent errors from yanking devices out from under filesystems. Only care about special vnodes on devfs, special nodes on other kinds of filesystems do not have special properties.
* MFC r278790, r278802:pfg2015-02-221-5/+6
| | | | | | | | | Initialize the allocation of variables related to the ext2 allocator. Use malloc to clear the values and initialize e2fs_contigdirs during allocation. free() e2fs_contigdirs upon error. While here clean up small style issues.
* MFC r278791:pfg2015-02-221-1/+1
| | | | | | Reuse value of cursize instead of recalculating. Reported by: Clang static checker
* MFC r277828:kib2015-02-114-9/+69
| | | | | | | | | | | | | Update mtime for tmpfs files modified through memory mapping. MFC r277969: Update both ctime and mtime for writes to tmpfs files. MFC r277972: Remove single-use boolean. MFC r278151: Remove duplicated assignment.
* MFC r277953:dim2015-02-091-2/+2
| | | | | Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change.
* MFC r278000:kib2015-02-071-0/+2
| | | | | Update directory times immediately after an entry is created or removed.
* MFC r277179, r277199 and r277391:hselasky2015-02-051-0/+1
| | | | | | Add a kernel function to delist our kernel character devices, so that the device name can be re-used right away in case we are destroying the character devices in the background.
* MFC r277952:dim2015-02-031-2/+3
| | | | | Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No functional change.
* MFC r277354, r277365:pfg2015-02-027-13/+7
| | | | | | ext2: Garbage-collect some unused variables Reported by: clang static analysis
* MFC r277899:dim2015-02-021-2/+4
| | | | | Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using __DECONST. No functional change.
* MFC r277898:dim2015-02-021-6/+7
| | | | | Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using __DECONST. No functional change.
* MFC r277855:jamie2015-01-311-1/+6
| | | | | | | Add allow.mount.fdescfs jail flag. PR: 192951 Submitted by: ruben@verweg.com
* MFC r277827:kib2015-01-311-4/+4
| | | | tmpfs does not use UVM on FreeBSD.
* MFC r277340, r277349:pfg2015-01-282-7/+4
| | | | | | | | | | | | | | | Remove dead code. After the ext2 variant of the "orlov allocator" was implemented, the case for a negative or zero dirsize disappeared. Drop the dead code and unsign dirsize given that it can't be negative anyways. ext2fs: fix for uninitialized pointer read. path.ep_bp was being used uninitialized in ext4_ext_find_extent(). CID: 1062344 CID: 1008669
* MFC r277390:kib2015-01-262-0/+13
| | | | Ignore devfs directory entries for devices being destroyed.
* MFC r277321:kib2015-01-251-1/+7
| | | | | Make SIGSTOP working for sleeps done while waiting for fifo readers or writers in open(2), when the fifo is located on an NFS mount.
* MFC r277301:pfg2015-01-241-2/+5
| | | | | | ext2: cosmetical issues Minor sorting and note when the cases are expected to fall through.
* MFC r276007:kib2015-01-044-2/+12
| | | | Handle MAKEENTRY cnp flag in the VOP_CREATE().
* 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
OpenPOWER on IntegriCloud