summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Quick fix to a comment.gnn2011-01-271-2/+2
|
* Add macro to test the sv_flags of any process. Change some places to testdchagin2011-01-264-5/+5
| | | | | | | the flags instead of explicit comparing with address of known sysentvec structures. MFC after: 1 month
* - Move special inode constants to ext2_dinode.h and rename them to matchjhb2011-01-212-17/+27
| | | | | | | | NetBSD. - Add a constant for the HASJOURNAL compat flag. PR: kern/153584 Submitted by: Pedro F. Giffuni giffunip at yahoo
* Restore support for the 'async' and 'sync' mount options lost whenjhb2011-01-211-3/+3
| | | | | | | | switching to nmount(2). While here, sort the options. PR: kern/153584 Submitted by: Pedro F. Giffuni giffunip at yahoo MFC after: 1 week
* In tmpfs_readdir(), normalize handling of the directory entries thatkib2011-01-202-4/+5
| | | | | | | | | | either overflow the supplied buffer, or cause uiomove fail. Do not advance cached de when directory entry was not copied out. Do not return EOF when no entries could be copied due to first entry too large for supplied buffer, signal EINVAL instead. Reported by: Beat G?tzi <beat chruetertee ch> MFC after: 1 week
* Fix build with KDB defined.jhb2011-01-191-0/+2
| | | | | Pointy hat to: jhb Submitted by: jkim
* Whitespace and style fixes.jhb2011-01-193-6/+5
|
* Move calculation of 'bmask' earlier to match it's current location injhb2011-01-191-1/+2
| | | | ufs_lookup().
* Merge 118969 from UFS:jhb2011-01-193-4/+5
| | | | | | | | Eliminate the i_devvp field from the incore inodes, we can get the same value from ip->i_ump->um_devvp. Submitted by: Pedro F. Giffuni giffunip at yahoo MFC after: 1 week
* Fix the experimental NFSv4 server so that it uses VOP_ACCESSX()rmacklem2011-01-181-1/+1
| | | | | | to check for VREAD_ACL instead of VOP_ACCESS(). MFC after: 3 days
* Modify the experimental NFSv4 server so that it posts a SIGUSR2rmacklem2011-01-144-1/+49
| | | | | | | | | | | signal to the master nfsd daemon whenever the stable restart file has been modified. This will allow the master nfsd daemon to maintain an up to date backup copy of the file. This is enabled via the nfssvc() syscall, so that older nfsd daemons will not be signaled. Reviewed by: jhb MFC after: 1 week
* In the experimental NFS server, when converting an open-owner to a lock-owner,zack2011-01-121-1/+1
| | | | | | | start at sequence id 1 instead of 0, to match up with both Solaris and Linux. Reviewed by: rmacklem Approved by: zml (mentor)
* Clean up the experimental NFS server replay cache when the module is unloaded.zack2011-01-122-3/+5
| | | | | Reviewed by: rmacklem Approved by: zml (mentor)
* Modify readdirplus in the experimental NFS server in armacklem2011-01-091-3/+21
| | | | | | | | | | | | | manner analogous to r216633 for the regular server. This change busies the file system so that VFS_VGET() is guaranteed to be using the correct mount point even during a forced dismount attempt. Since nfsd_fhtovp() is not called immediately before readdirplus, the patch is actually a clone of pjd@'s nfs_serv.c.4.patch instead of the one committed in r216633. Reviewed by: kib MFC after: 10 days
* Delete the NFS_STARTWRITE() and NFS_ENDWRITE() macros thatrmacklem2011-01-062-9/+2
| | | | | | | | obscured vn_start_write() and vn_finished_write() for the old OpenBSD port, since most uses have been replaced by the correct calls. MFC after: 12 days
* Since the VFS_LOCK_GIANT() code in the experimental NFSrmacklem2011-01-065-171/+54
| | | | | | | | | server is broken and the major file systems are now all mpsafe, modify the server so that it will only export mpsafe file systems. This was discussed on freebsd-fs@ and removes a fair bit of crufty code. MFC after: 12 days
* Modify the experimental NFS server so that it callsrmacklem2011-01-051-7/+8
| | | | | | | | | | | vn_start_write() with a non-NULL vp. That way it will find the correct mount point mp and use that mp for the subsequent vn_finished_write() call. Also, it should fail without crashing if the mount point is being forced dismounted because vn_start_write() will set the mp NULL via VOP_GETWRITEMOUNT(). Reviewed by: kib MFC after: 12 days
* Fix the experimental NFS server to use vfs_busyfs() insteadrmacklem2011-01-051-6/+5
| | | | | | | | | of vfs_getvfs() so that the mount point is busied for the VFS_FHTOVP() call. This is analagous to r185432 for the regular NFS server. Reviewed by: kib MFC after: 12 days
* Fix the nlm so that it no longer depends on the regularrmacklem2011-01-033-2/+11
| | | | | | | | nfs client and, as such, can be loaded for the experimental nfs client without the regular client. Reviewed by: jhb MFC after: 2 weeks
* Fix the experimental NFS server so that it doesn't leakrmacklem2011-01-031-2/+1
| | | | | | | a reference count on the directory when creating device special files. MFC after: 2 weeks
* Modify the experimental NFSv4 server so that the lookuprmacklem2011-01-032-13/+13
| | | | | | | | | ops return a locked vnode. This ensures that the associated mount point will always be valid for the code that follows the operation. Also add a couple of additional checks for non-error to the other functions that create file objects. MFC after: 2 weeks
* Delete some cruft from the experimental NFS server that wasrmacklem2011-01-023-42/+9
| | | | | | only used by the OpenBSD port for its pseudo-fs. MFC after: 2 weeks
* Add checks for VI_DOOMED and vn_lock() failures to thermacklem2011-01-024-51/+99
| | | | | | | | | | experimental NFS server, to handle the case where an exported file system is forced dismounted while an RPC is in progress. Further commits will fix the cases where a mount point is used when the associated vnode isn't locked. Reviewed by: kib MFC after: 2 weeks
* Add support for shared vnode locks for the Read operationrmacklem2011-01-012-7/+9
| | | | | | | in the experimental NFSv4 server. Reviewed by: kib MFC after: 2 weeks
* Delete the nfsvno_localconflict() function in the experimentalrmacklem2010-12-282-62/+0
| | | | | | NFS server since it is no longer used and is broken. MFC after: 2 weeks
* Modify the experimental NFS server so that it uses LK_SHAREDrmacklem2010-12-256-78/+102
| | | | | | | | | | | | for RPC operations when it can. Since VFS_FHTOVP() currently always gets an exclusively locked vnode and is usually called at the beginning of each RPC, the RPCs for a given vnode will still be serialized. As such, passing a lock type argument to VFS_FHTOVP() would be preferable to doing the vn_lock() with LK_DOWNGRADE after the VFS_FHTOVP() call. Reviewed by: kib MFC after: 2 weeks
* Add an argument to nfsvno_getattr() in the experimentalrmacklem2010-12-243-62/+71
| | | | | | | | | | | | | NFS server, so that it can avoid calling VOP_ISLOCKED() when the vnode is known to be locked. This will allow LK_SHARED to be used for these cases, which happen to be all the cases that can use LK_SHARED. This does not fix any bug, but it reduces the number of calls to VOP_ISLOCKED() and prepares the code so that it can be switched to using LK_SHARED in a future patch. Reviewed by: kib MFC after: 2 weeks
* Simplify vnode locking in the expeimental NFS server'srmacklem2010-12-241-16/+11
| | | | | | | | | readdir functions. In particular, get rid of two bogus VOP_ISLOCKED() calls. Removing the VOP_ISLOCKED() calls is the only actual bug fixed by this patch. Reviewed by: kib MFC after: 2 weeks
* Since VOP_READDIR() for ZFS does not return monotonicallyrmacklem2010-12-241-2/+10
| | | | | | | | | | | | | | | | increasing directory offset cookies, disable the UFS related loop that skips over directory entries at the beginning of the block for the experimental NFS server. This loop is required for UFS since it always returns directory entries starting at the beginning of the block that the requested directory offset is in. In discussion with pjd@ and mckusick@ it seems that this behaviour of UFS should maybe change, with this fix being an interim patch until then. This patch only fixes the experimental server, since pjd@ is working on a patch for the regular server. Discussed with: pjd, mckusick MFC after: 5 days
* Fix two vnode locking problems in nfsd_recalldelegation() in thermacklem2010-12-171-4/+8
| | | | | | | | | | experimental NFSv4 server. The first was a bogus use of VOP_ISLOCKED() in a KASSERT() and the second was the need to lock the vnode for the nfsrv_checkremove() call. Also, delete a "__unused" that was bogus, since the argument is used. Reviewed by: zack.kirsch at isilon.com MFC after: 2 weeks
* Don't allow user created symbolic links to cover another entries markedjh2010-12-151-0/+5
| | | | | | | with DE_USER. If a devfs rule hid such entry, it was possible to create infinite number of symbolic links with the same name. Reviewed by: kib
* - Assert that dm_lock is exclusively held in devfs_rules_apply() andjh2010-12-153-0/+5
| | | | | | | | in devfs_vmkdir() while adding the entry to de_list of the parent. - Apply devfs rules to newly created directories and symbolic links. PR: kern/125034 Submitted by: Mateusz Guzik (original version)
* Handle the special ruleset 0 in devfs_ruleset_use(). An attempt set thejh2010-12-121-0/+5
| | | | | | | | current ruleset to 0 with command "devfs ruleset 0" triggered a KASSERT in devfs_ruleset_create(). PR: kern/125030 Submitted by: Mateusz Guzik
* Disable attempts to establish a callback connection from thermacklem2010-12-091-5/+13
| | | | | | | | | | | | | | | | | | experimental NFSv4 server to a NFSv4 client when delegations are not being issued, even if the client advertises a callback path. This avoids a problem where a Linux client advertises a callback path that doesn't work, due to a firewall, and then times out an Open attempt before the FreeBSD server gives up its callback connection attempt. (Suggested by drb at karlov.mff.cuni.cz to fix the Linux client problem that he reported on the fs-stable mailing list.) The server should probably have a 1sec timeout on callback connection attempts when there are no delegations issued to the client, but that patch will require changes to the krpc and this serves as a work around until then. Tested by: drb at karlov.mff.cuni.cz MFC after: 5 days
* Replace pointer to "struct uidinfo" with pointer to "struct ucred"trasz2010-12-021-3/+3
| | | | | | | | | in "struct vm_object". This is required to make it possible to account for per-jail swap usage. Reviewed by: kib@ Tested by: pho@ Sponsored by: FreeBSD Foundation
* For non-stopped threads, td_frame pointer is undefined. As akib2010-12-022-0/+8
| | | | | | | | | | | | | | consequence, fill_regs() and fill_fpregs() access random data, usually on the thread kernel stack. Most often the td_frame points to the previous frame saved by last kernel entry sequence, but this is not guaranteed. For /proc/<pid>/{regs,fpregs} read access, require the thread to be in stopped state. Otherwise, return EBUSY as is done for write case. Reported and tested by: pho Approved by: des (procfs maintainer) MFC after: 1 week
* Remove prtactive variable and related printf()s in the vop_inactivekib2010-11-197-37/+3
| | | | | | | | and vop_reclaim() methods. They seems to be unused, and the reported situation is normal for the forced unmount. MFC after: 1 week X-MFC-note: keep prtactive symbol in vfs_subr.c
* Remove unused includes of <sys/mutex.h> and <machine/mutex.h>.jhb2010-11-091-2/+0
|
* Modify nfs_open() in the experimental NFS client to be compatiblermacklem2010-10-291-46/+40
| | | | | | with the regular NFS client. Also, fix a couple of mutex lock issues. MFC after: 1 week
* Add a call for nfsrpc_close() to ncl_reclaim() in the experimentalrmacklem2010-10-291-0/+9
| | | | | | | | NFSv4 client, since the call in ncl_inactive() might be missed because VOP_INACTIVE() is not guaranteed to be called before VOP_RECLAIM(). MFC after: 1 week
* Add a flag to the experimental NFSv4 client to indicate whenrmacklem2010-10-262-22/+24
| | | | | | | | | | | | | delegations are being returned for reasons other than a Recall. Also, re-organize nfscl_recalldeleg() slightly, so that it leaves clearing NMODIFIED to the ncl_flush() call and invalidates the attribute cache after flushing. It is hoped that these changes might fix the problem others have seen when using the NFSv4 client with delegations enabled, since I can't reliably reproduce the problem. These changes only affect the client when doing NFSv4 mounts with delegations enabled. MFC after: 10 days
* Modify the experimental NFSv4 server's file handle hash functionrmacklem2010-10-232-7/+5
| | | | | | | | | | | to use the generic hash32_buf() function. Although adding the bytes seemed sufficient for UFS and ZFS, since most of the bytes are the same for file handles on the same volume, this might not be sufficient for other file systems. Use of a generic function also seems preferable to one specific to NFSv4. Suggested by: gleb.kurtsou at gmail.com MFC after: 10 days
* Modify the file handle hash function in the experimental NFSrmacklem2010-10-223-1/+17
| | | | | | | | server so that it will work better for non-UFS file systems. The new function simply sums the bytes of the fh_fid field of fhandle_t. MFC after: 10 days
* Modify the experimental NFS server in a manner analagous tormacklem2010-10-211-1/+9
| | | | | | | | r214049 for the regular NFS server, so that it will not do a VOP_LOOKUP() of ".." when at the root of a file system when performing a ReaddirPlus RPC. MFC after: 10 days
* Fix the type of the 3rd argument for nm_getinfo so that it worksrmacklem2010-10-191-3/+3
| | | | | | | for architectures like sparc64. Suggested by: kib MFC after: 2 weeks
* Modify the NFS clients and the NLM so that the NLM can be usedrmacklem2010-10-194-16/+58
| | | | | | | | | | | | | by both clients. Since the NLM uses various fields of the nfsmount structure, those fields were extracted and put in a separate nfs_mountcommon structure stored in sys/nfs/nfs_mountcommon.h. This structure also has a function pointer for a function that extracts the required information from the mount point and nfs vnode for that particular client, for information stored differently by the clients. Reviewed by: jhb MFC after: 2 weeks
* Fix a possible race where the directory dirent is moved to the locationkevlo2010-10-181-3/+8
| | | | | | | | | that was used by ".." entry. This change seems fixed panic during attempt to access msdosfs data over nfs. Reviewed by: kib MFC after: 1 week
* Ignore the return value of DE_INTERNALIZE().rpaulo2010-10-131-1/+1
|
* tmpfs + sendfile: do not produce partially valid pages for vnode's tailavg2010-10-121-3/+6
| | | | | | See r213730 for details of analogous change in ZFS. MFC after: 3 days
* Format prototypes to follow style(9) more closely.jh2010-10-122-22/+25
| | | | Discussed with: kib, phk
OpenPOWER on IntegriCloud