summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* After a successfull poll of the cloning functions, match on thephk2001-05-141-14/+6
| | | | | | | returned dev_t rather than the original name. This allows cloning from one name to another which is useful for /dev/tty and later for the pty's.
* Convert DEVFS from an "opt-in" to an "opt-out" option.phk2001-05-133-5/+8
| | | | | | | | | If for some reason DEVFS is undesired, the "NODEVFS" option is needed now. Pending any significant issues, DEVFS will be made mandatory in -current on july 1st so that we can start reaping the full benefits of having it.
* GC prototype for procfs_bmap() missed during a previous commit.jhb2001-05-111-1/+0
|
* Remove unneeded devfs_badop()phk2001-05-061-10/+0
| | | | Noticed by: rwatson
* Convert vnode_pager_freepage() to vm_free_page().bp2001-05-031-2/+2
| | | | Forgotten by: alfred
* Implement vop_std{get|put}pages() and add them to the default vop[].phk2001-05-0110-161/+8
| | | | | Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default.
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-0132-123/+186
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Uncut&paste som bogus use of VOP_BMAP in cd9660::VOP_STRATEGY.phk2001-04-301-10/+4
| | | | XXX mark some stuff which looks like further cut&paste junk.
* Uncut&paste som bogus use of VOP_BMAP in hpfs::VOP_STRATEGY.phk2001-04-301-6/+6
| | | | | At the same time, eliminate uninitialized use of a vnode pointer. Interesting GCC didn't spot this.
* Backed out previous commit. It cause massive filesystem corruption,bde2001-04-301-0/+1
| | | | | | | | | | | | | | | | | | | not to mention a compile-time warning about the critical function becoming unused, by replacing spec_bmap() with vop_stdbmap(). ntfs seems to have the same bug. The factor for converting specfs block numbers to physical block numbers is 1, but vop_stdbmap() uses the bogus factor btodb(ap->a_vp->v_mount->mnt_stat.f_iosize), which is 16 for ffs with the default block size of 8K. This factor is bogus even for vop_stdbmap() -- the correct factor is related to the filesystem blocksize which is not necessarily the same to the optimal i/o size. vop_stdbmap() was apparently cloned from nfs where these sizes happen to be the same. There may also be a problem with a_vp->v_mount being null. spec_bmap() still checks for this, but I think the checks in specfs are dead code which used to support block devices.
* Add a vop_stdbmap(), and make it part of the default vop vector.phk2001-04-2910-168/+3
| | | | | | Make 7 filesystems which don't really know about VOP_BMAP rely on the default vector, rather than more or less complete local vop_nopbmap() implementations.
* Revert consequences of changes to mount.h, part 2.grog2001-04-2915-30/+0
| | | | Requested by: bde
* Move the netexport structure from the fs-specific mountstructurephk2001-04-258-73/+22
| | | | | | | | | | | | | | to struct mount. This makes the "struct netexport *" paramter to the vfs_export and vfs_checkexport interface unneeded. Consequently that all non-stacking filesystems can use vfs_stdcheckexp(). At the same time, make it a pointer to a struct netexport in struct mount, so that we can remove the bogus AF_MAX and #include <net/radix.h> from <sys/mount.h>
* Change the pfind() and zpfind() functions to lock the process that theyjhb2001-04-246-55/+50
| | | | | | find before releasing the allproc lock and returning. Reviewed by: -smp, dfr, jake
* fix it so it compiles againmjacob2001-04-236-0/+12
|
* add this ridiculous include foo so it will compile againmjacob2001-04-232-0/+4
|
* Correct #includes to work with fixed sys/mount.h.grog2001-04-239-0/+18
|
* Correct #includes to work with fixed sys/mount.h.grog2001-04-237-0/+14
|
* vnode_pager_freepage() is really vm_page_free() in disguise,alfred2001-04-191-2/+2
| | | | nuke vnode_pager_freepage() and replace all calls to it with vm_page_free()
* This patch removes the VOP_BWRITE() vector.phk2001-04-173-3/+0
| | | | | | | | | | | | | VOP_BWRITE() was a hack which made it possible for NFS client side to use struct buf with non-bio backing. This patch takes a more general approach and adds a bp->b_op vector where more methods can be added. The success of this patch depends on bp->b_op being initialized all relevant places for some value of "relevant" which is not easy to determine. For now the buffers have grown a b_magic element which will make such issues a tiny bit easier to debug.
* Move VT_SMBFS definition to the proper place. Undefine VI_LOCK/VI_UNLOCK.bp2001-04-131-7/+0
|
* Import kernel part of SMB/CIFS requester.bp2001-04-109-0/+4938
| | | | | | | | Add smbfs(CIFS) filesystem. Userland part will be in the ports tree for a while. Obtained from: smbfs-1.3.7-dev package.
* Let pseudofs into the warmth of the FreeBSD CVS repo.des2001-04-076-0/+1289
| | | | | | | | | | | It's not finished yet (I still have to find a way to implement process- dependent nodes without consuming too much memory, and the permission system needs tightening up), but it's becoming hard to work on without a repo (I've accidentally almost nuked it once already), and it works (except for the lack of process-dependent nodes, that is). I was supposed to commit this a week ago, but timed out waiting for jkh to reply to some questions I had. Pass him a spoonful of bad karma :)
* - Various style fixes.jhb2001-03-291-7/+3
| | | | | | | - Fix a silly bug so that we return the actual error code if a procfs attach fails rather than always returning 0. Reported by: bde
* Convert the allproc and proctree locks from lockmgr locks to sx locks.jhb2001-03-282-13/+14
|
* Catch up to header include changes:jhb2001-03-283-0/+3
| | | | | - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Add dependancy on libmchain module.bp2001-03-221-0/+1
| | | | Spotted by: Andrzej Tobola <san@iem.pw.edu.pl>
* o Change the API and ABI of the Extended Attribute kernel interfaces torwatson2001-03-152-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce a new argument, "namespace", rather than relying on a first- character namespace indicator. This is in line with more recent thinking on EA interfaces on various mailing lists, including the posix1e, Linux acl-devel, and trustedbsd-discuss forums. Two namespaces are defined by default, EXTATTR_NAMESPACE_SYSTEM and EXTATTR_NAMESPACE_USER, where the primary distinction lies in the access control model: user EAs are accessible based on the normal MAC and DAC file/directory protections, and system attributes are limited to kernel-originated or appropriately privileged userland requests. o These API changes occur at several levels: the namespace argument is introduced in the extattr_{get,set}_file() system call interfaces, at the vnode operation level in the vop_{get,set}extattr() interfaces, and in the UFS extended attribute implementation. Changes are also introduced in the VFS extattrctl() interface (system call, VFS, and UFS implementation), where the arguments are modified to include a namespace field, as well as modified to advoid direct access to userspace variables from below the VFS layer (in the style of recent changes to mount by adrian@FreeBSD.org). This required some cleanup and bug fixing regarding VFS locks and the VFS interface, as a vnode pointer may now be optionally submitted to the VFS_EXTATTRCTL() call. Updated documentation for the VFS interface will be committed shortly. o In the near future, the auto-starting feature will be updated to search two sub-directories to the ".attribute" directory in appropriate file systems: "user" and "system" to locate attributes intended for those namespaces, as the single filename is no longer sufficient to indicate what namespace the attribute is intended for. Until this is committed, all attributes auto-started by UFS will be placed in the EXTATTR_NAMESPACE_SYSTEM namespace. o The default POSIX.1e attribute names for ACLs and Capabilities have been updated to no longer include the '$' in their filename. As such, if you're using these features, you'll need to rename the attribute backing files to the same names without '$' symbols in front. o Note that these changes will require changes in userland, which will be committed shortly. These include modifications to the extended attribute utilities, as well as to libutil for new namespace string conversion routines. Once the matching userland changes are committed, a buildworld is recommended to update all the necessary include files and verify that the kernel and userland environments are in sync. Note: If you do not use extended attributes (most people won't), upgrading is not imperative although since the system call API has changed, the new userland extended attribute code will no longer compile with old include files. o Couple of minor cleanups while I'm there: make more code compilation conditional on FFS_EXTATTR, which should recover a bit of space on kernels running without EA's, as well as update copyright dates. Obtained from: TrustedBSD Project
* Add missed MODULE_VERSION() call, so loading of unicode conversion routinesobomax2001-03-111-0/+1
| | | | | | works properly. Clue beaten in by: des
* Do not kill vnodes after rename. This can cause deadlocks in the deadfs.bp2001-03-111-6/+2
| | | | Noticed by: Matthew N. Dodd <winter@jurai.net>
* Add a mount time option which slightly relaxes checks for valid Joiletbp2001-03-112-1/+3
| | | | | | | extensions. PR: kern/23315 Reviewed by: adrian
* Slightly reorganize allocation of new vnode. Use bit NVOLUME to detectedbp2001-03-106-51/+45
| | | | | vnodes which represent volumes (before it was done via strcmp()). Turn n_refparent into bit in the n_flag field.
* Synch with changes in the NCP requester.bp2001-03-103-192/+233
|
* Fixes to track snapshot copy-on-write checking in the specinfomckusick2001-03-071-2/+2
| | | | | | structure rather than assuming that the device vnode would reside in the FFS filesystem (which is obviously a broken assumption with the device filesystem).
* Grab the process lock while calling psignal and before calling psignal.jhb2001-03-072-0/+4
|
* Proc locking identical to that of linprocfs' vnops except that we hold thejhb2001-03-071-18/+59
| | | | proc lock while calling psignal.
* Protect read to p_pptr with proc lock rather than proctree lock.jhb2001-03-071-2/+2
|
* Proc locking. Lock around psignal() and also ensure both an exclusivejhb2001-03-071-20/+34
| | | | | | proctree lock and the process lock are held when updating p_pptr and p_oppid. When we are just reaading p_pptr we only need the proc lock and not a proctree lock as well.
* Protect p_flag with the proc lock.jhb2001-03-073-3/+18
|
* A name of the file can change while its id stays the same. So, we havebp2001-03-062-15/+5
| | | | | | to update it as well. Remove unused function.
* Remove the copyinstr call which was trying to copy the pathname in fromdfr2001-03-031-3/+0
| | | | | | | | | user space. It has already been copied in and mp->mnt_stat.f_mntonname has already been initialised by the caller. This fixes a panic on the alpha caused by the fact that the variable 'size' wasn't initialised because the call to copyinstr() bailed out with an EFAULT error.
* Reviewed by: jlemonadrian2001-03-0111-46/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | An initial tidyup of the mount() syscall and VFS mount code. This code replaces the earlier work done by jlemon in an attempt to make linux_mount() work. * the guts of the mount work has been moved into vfs_mount(). * move `type', `path' and `flags' from being userland variables into being kernel variables in vfs_mount(). `data' remains a pointer into userspace. * Attempt to verify the `type' and `path' strings passed to vfs_mount() aren't too long. * rework mount() and linux_mount() to take the userland parameters (besides data, as mentioned) and pass kernel variables to vfs_mount(). (linux_mount() already did this, I've just tidied it up a little more.) * remove the copyin*() stuff for `path'. `data' still requires copyin*() since its a pointer into userland. * set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each filesystem. This variable is generally initialised with `path', and each filesystem can override it if they want to. * NOTE: f_mntonname is intiailised with "/" in the case of a root mount.
* Display the Joliet Extension 'level' in the log message.alfred2001-02-231-1/+1
| | | | PR: kern/24998
* o Move per-process jail pointer (p->pr_prison) to inside of the subjectrwatson2001-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | credential structure, ucred (cr->cr_prison). o Allow jail inheritence to be a function of credential inheritence. o Abstract prison structure reference counting behind pr_hold() and pr_free(), invoked by the similarly named credential reference management functions, removing this code from per-ABI fork/exit code. o Modify various jail() functions to use struct ucred arguments instead of struct proc arguments. o Introduce jailed() function to determine if a credential is jailed, rather than directly checking pointers all over the place. o Convert PRISON_CHECK() macro to prison_check() function. o Move jail() function prototypes to jail.h. o Emulate the P_JAILED flag in fill_kinfo_proc() and no longer set the flag in the process flags field itself. o Eliminate that "const" qualifier from suser/p_can/etc to reflect mutex use. Notes: o Some further cleanup of the linux/jail code is still required. o It's now possible to consider resolving some of the process vs credential based permission checking confusion in the socket code. o Mutex protection of struct prison is still not present, and is required to protect the reference count plus some fields in the structure. Reviewed by: freebsd-arch Obtained from: TrustedBSD Project
* Remove a debug printf.phk2001-02-181-3/+1
|
* Extend kqueue down to the device layer.jlemon2001-02-152-30/+55
| | | | Backwards compatible approach suggested by: peter
* Add a hook for loading of a Unicode -> char conversion routine as a kld at asobomax2001-02-131-0/+12
| | | | | | | | | | run-time. This is temporary solution until proper kernel Unicode interfaces are in place and as such was purposely designed to be as tiny as possible (3 lines of the code not counting comments). The port with conversion routines for the most popular single-byte languages will be added later today Reviewed by: bp, "Michael C . Wu" <keichii@iteration.net> Approved by: bp
* Change and clean the mutex lock interface.bmilekic2001-02-0914-82/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Fix typo: seperate -> separate.asmodai2001-02-062-2/+2
| | | | Seperate does not exist in the english language.
OpenPOWER on IntegriCloud