summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313735: add svcpool_close to handle killed nfsd threadsavg2017-02-211-11/+9
| | | | | | | PR: 204340 Reported by: Panzura Reviewed by: rmacklem Approved by: rmacklem
* MFC r313797:kib2017-02-191-2/+3
| | | | Minor style fixes.
* MFC r312432:kib2017-02-025-17/+54
| | | | Add a mount option for tmpfs(5) to not use namecache.
* MFC r312430:kib2017-02-021-0/+127
| | | | Implement VOP_VPTOCNP() for tmpfs.
* MFC r312429:kib2017-02-021-5/+0
| | | | VNON nodes cannot exist.
* MFC r312428:kib2017-02-024-44/+130
| | | | Refcount tmpfs nodes and mount structures.
* MFC r312425:kib2017-01-262-7/+11
| | | | Make tmpfs directory cursor available outside tmpfs_subr.c.
* MFC r312414:kib2017-01-262-7/+8
| | | | Rename tmpfs_mount member allnode_lock to include namespace prefix.
* MFC r312410:kib2017-01-263-14/+2
| | | | | | | Rework some tmpfs lock assertions. MFC r312412: Protect macro argument.
* MFC r312409:kib2017-01-264-164/+179
| | | | | | | Style fixes and comment updates. MFC r312435: Remove mistakenly merged field.
* MFC r312407:kib2017-01-261-6/+0
| | | | Remove unused union member, fifos on tmpfs are implemented in common code.
* MFC r312124 (by mjg):kib2017-01-263-11/+7
| | | | tmpfs: manage tm_pages_used with atomics.
* MFC r311531 (by mjg):kib2017-01-261-16/+6
| | | | Perform a lockless check in tmpfs_itimes.
* MFC 311122jpaetzel2017-01-191-28/+11
| | | | | | Workaround NFS bug with readdirplus when there are greater than 1 billion files in a filesystem. Reviewed by: kib
* MFC r311815:kib2017-01-161-4/+9
| | | | Forcibly remove the cached items from pseudofs vncache on module unload.
* MFC r311525:kib2017-01-134-28/+54
| | | | Lock tmpfs node tn_status updates done under the shared vnode lock.
* MFC r311524:kib2017-01-131-15/+15
| | | | Use vnode lock assertion expression, assert exclusive ownership.
* MFC r311523:kib2017-01-131-22/+0
| | | | Remove dead code.
* MFC r310705, r310706:pfg2017-01-0420-270/+286
| | | | | | style(9) cleanups. Just to reduce some of the issues found with indent(1).
* MFC r308708: Reduce verbosity of warnings about truncating NFS fileids tocperciva2016-12-201-4/+21
| | | | 32-bit inode numbers.
* MFC: r309566rmacklem2016-12-191-3/+28
| | | | | | | | | | | | | Fix the NFSv4.1 server for Open reclaim after a reboot. The NFSv4.1 server failed to update the nfs-stablerestart file for a client when the client was issued its first Open. As such, recovery of Opens after a server reboot failed with NFSERR_NOGRACE. This patch fixes this. It also changes the code so that it malloc()'s the 1024 byte array instead of allocating it on the kernel stack for both NFSv4.0 and NFSv4.1. Note that this bug only affected NFSv4.1 and only when clients attempted to reclaim Opens after a server reboot.
* MFC r309209:kib2016-12-042-1/+4
| | | | Do not enable nullfs vnode caching over nfs v4 mounts.
* MFC r309179:pfg2016-12-031-1/+2
| | | | | | ext2fs: avoid possible overflow when calculating malloc size. This is inspired on r308064 for the case of mounting UFS.
* MFC r308025:kib2016-11-112-3/+9
| | | | Enable vn_io_fault() deadlock avoidance for msdosfs.
* MFC r308024:kib2016-11-111-4/+26
| | | | | Ensure that cluster allocations never allocate clusters outside the volume limits.
* MFC r308023:kib2016-11-111-1/+4
| | | | | If the fatchain() call in chainalloc() returned an error, revert marking the cluster run as in-use.
* MFC r308022:kib2016-11-111-5/+7
| | | | Use symbolic name for the value of fully free word in pm_inusemap.
* MFC r308021:kib2016-11-111-1/+1
| | | | Use symbolic name for the free cluster number.
* MFC r308020:kib2016-11-111-6/+8
| | | | Fix comment formatting.
* MFC r308019:kib2016-11-111-2/+1
| | | | Remove useless NULL check.
* MFC: r307694rmacklem2016-11-031-1/+5
| | | | | | | | | | | | | | | | | | | A problem w.r.t. interoperation between the FreeBSD NFSv4.1 server with delegations enabled and the Linux NFSv4.1 client was reported in reviews.freebsd.org/D7891. I believe that the FreeBSD server behaviour conforms to the RFC and that the Linux client has a bug. Therefore, I do not think the proposed patch is appropriate. When nfsrv_writedelegifpos is non-zero, the FreeBSD server will issue a write delegation for a read open if possible. The Linux client then erroneously assumes that the credentials used for the read open can write the file. This patch reverses the default value for nfsrv_writedelegifpos to 0 so that the default behaviour is Linux compatible and adds a sysctl that can be used to set nfsrv_writedelegifpos. This change should only affect users that are mounting a FreeBSD server with delegations enabled (they are not enabled by default) with a Linux NFSv4.1 client mount.
* MFC r306276, but don't remove findwin95asomers2016-10-211-18/+2
| | | | | | | Mount msdosfs with longnames support by default. The old behavior depended on the FAT version and on what files were in the root directory. "mount_msdosfs -o shortnames" is still supported.
* MFC r299199: Add nid_namelen bounds check to nfssvc system callemaste2016-10-071-0/+4
| | | | | | | | This is only allowed by root and only used by the nfs daemon, which should not provide an incorrect value. However, it's still good practice to validate data provided by userland. PR: 206626
* Revert r306659 since the userland changes won't merge and this wouldrmacklem2016-10-0314-439/+196
| | | | break the build.
* MFC: r304026rmacklem2016-10-0314-196/+439
| | | | | | | | | | | | Update the nfsstats structure to include the changes needed by the patch in D1626 plus changes so that it includes counts for NFSv4.1 (and the draft of NFSv4.2). Also, make all the counts uint64_t and add a vers field at the beginning, so that future revisions can easily be implemented. There is code in place to handle the old vesion of the nfsstats structure for backwards binary compatibility. Subsequent commits will update nfsstat(8) to use the new fields.
* MFC r303799, r303800:pfg2016-09-062-0/+15
| | | | | | | | | | ext2fs: Add defines for some missing ext4 features and inode flags. These are currently unused in our implementation and some even appear to have not been implemented yet on linux but it is good to keep them for reference. Obtained from: NetBSD
* MFC r303916:kib2016-08-171-4/+7
| | | | Convert another tmpfs assert into runtime check.
* MFC r303710:kib2016-08-104-40/+18
| | | | | | | Remove unneeded (recursing) Giant acquisition around vprintf(9). MFC r303715: Remove ncl_printf(), use printf(9) directly.
* MFC r303704:kib2016-08-104-16/+8
| | | | | | | Some style changes. Fix a typo in comment. MFC r303705: Remove Giant asserts. Update comment.
* MFC r302196kib2016-07-081-21/+41
| | | | | | | | Since VOP_INACTIVE() is not guaranteed to be called, all cleanups executed by inactive methods, must be repeated on reclaim. MFC r302210: Clean other flags in ncl_inactive, only.
* MFC r302019:kib2016-06-261-4/+8
| | | | Do not access NFS data for reclaimed vnode.
* MFC r301928:kib2016-06-221-13/+20
| | | | Only access vp->v_rdev for VCHR vnodes in devfs_reclaim().
* MFC r300365:kib2016-06-041-5/+0
| | | | | Remove zero assignments in the cdev allocator. cdp memory is requested with M_ZERO.
* MFC: r300169rmacklem2016-06-011-3/+4
| | | | | | | | | If a local (AF_LOCAL, AF_UNIX) socket creation (bind) is attempted on a fuse mounted file system, it will crash. Although it may be possible to make this work correctly, this patch avoids the crash in the meantime. I removed the MPASS(), since panicing for the FIFO case didn't make a lot of sense when it returns an error for the others.
* MFC: r299872rmacklem2016-05-293-1/+24
| | | | | | | | | | | | | | | Fix fuse for "cp" of a mode 0444 file to the file system. When "cp" of a file with read-only (mode 0444) to a fuse mounted file system was attempted it would fail with EACCES. This was because fuse would attempt to open the file WRONLY and the open would fail. This patch changes the fuse_vnop_open() to test for an extant read-write open and use that, if it is available. This makes the "cp" of a read-only file to the fuse mounted file system work ok. There are simpler ways to fix this than adding the fuse_filehandle_validrw() function, but this function is useful for future patches related to exporting a fuse filesystem via NFS.
* MFC: r299816rmacklem2016-05-291-0/+2
| | | | | | | | | Fix fuse so that stale buffer cache data isn't read. When I/O on a file under fuse is switched from buffered to DIRECT_IO, it was possible to read stale (before a recent modification) data from the buffer cache. This patch invalidates the buffer cache for the file to fix this.
* MFC: r299753rmacklem2016-05-282-2/+23
| | | | | | | | | | | | Fix fuse to use DIRECT_IO when required. When a file is opened write-only and a partial block was written, buffered I/O would try and read the whole block in. This would result in a hung thread, since there was no open (fuse filehandle) that allowed reading. This patch avoids the problem by forcing DIRECT_IO for this case. It also sets DIRECT_IO when the file system specifies the FN_DIRECTIO flag in its reply to the open.
* MFC: r299514rmacklem2016-05-261-2/+2
| | | | | | | Fix use-after-free in NFS4 lock test service. Trivial use-after-free where stp was freed too soon in the non-error path. To fix, simply move its release to the end of the routine.
* MFC: r299226rmacklem2016-05-211-1/+6
| | | | | | | | | | | | Don't increment srvrpccnt[] for the NFSv4.1 operations. When support for NFSv4.1 was added to the NFS server, it broke the server rpc count stats, since newnfsstats.srvrpccnt[] doesn't have entries for the new NFSv4.1 operations. Without this patch, the code was incrementing bogus entries in newnfsstats for the new NFSv4.1 operations. This patch is an interim fix. The nfsstats structure needs to be updated and that will come in a future commit.
* MFC: r299201rmacklem2016-05-201-0/+6
| | | | | | | | | | | | | | Give mountd -S priority over outstanding RPC requests when suspending the nfsd. It was reported via email that under certain heavy RPC loads long delays before the exports would be updated was observed when using "mountd -S". This patch reverses the priority between the exclusive lock request to suspend the nfsd threads and the shared lock request for performing RPCs. As such, when mountd attempts to suspend the nfsd threads, it gets priority over outstanding RPC requests to do this. I suspect that the case reported was an artificial test load, but this patch did fix the problem for the reporter.
OpenPOWER on IntegriCloud