summaryrefslogtreecommitdiffstats
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); inrwatson2007-06-121-12/+6
| | | | | | | | | | | | | | | some cases, move to priv_check() if it was an operation on a thread and no other flags were present. Eliminate caller-side jail exception checking (also now-unused); jail privilege exception code now goes solely in kern_jail.c. We can't yet eliminate suser() due to some cases in the KAME code where a privilege check is performed and then used in many different deferred paths. Do, however, move those prototypes to priv.h. Reviewed by: csjp Obtained from: TrustedBSD Project
* Remove 'inline' qualifiers from functions which are not, in fact, inlines.mjacob2007-06-102-7/+7
|
* Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operationkib2007-06-011-1/+1
| | | | | | | | argument from being file descriptor index into the pointer to struct file: part 2. Convert calls missed in the first big commit. Noted by: rwatson Pointy hat to: kib
* - Move rusage from being per-process in struct pstats to per-thread injeff2007-06-011-1/+1
| | | | | | | | | | | | | | | | | | | td_ru. This removes the requirement for per-process synchronization in statclock() and mi_switch(). This was previously supported by sched_lock which is going away. All modifications to rusage are now done in the context of the owning thread. reads proceed without locks. - Aggregate exiting threads rusage in thread_exit() such that the exiting thread's rusage is not lost. - Provide a new routine, rufetch() to fetch an aggregate of all rusage structures from all threads in a process. This routine must be used in any place requiring a rusage from a process prior to it's exit. The exited process's rusage is still available via p_ru. - Aggregate tick statistics only on demand via rufetch() or when a thread exits. Tick statistics are kept in the thread and protected by sched_lock until it exits. Initial patch by: attilio Reviewed by: attilio, bde (some objections), arch (mostly silent)
* Bow to incomplete GCC 4. constant propagation optimizations andkan2007-05-3013-13/+17
| | | | | initialize some of the local variables GCC claims are being used uninitialized.
* Change #include <machine/pcpu.h> to #include <sys/pcpu.h>rodrigc2007-04-011-1/+1
| | | | to get definition of curthread, required by <sys/sx.h>.
* Optimize sx locks to use simple atomic operations for the common cases ofjhb2007-03-312-79/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | obtaining and releasing shared and exclusive locks. The algorithms for manipulating the lock cookie are very similar to that rwlocks. This patch also adds support for exclusive locks using the same algorithm as mutexes. A new sx_init_flags() function has been added so that optional flags can be specified to alter a given locks behavior. The flags include SX_DUPOK, SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature to the similar flags for mutexes. Adaptive spinning on select locks may be enabled by enabling the ADAPTIVE_SX kernel option. Only locks initialized with the SX_ADAPTIVESPIN flag via sx_init_flags() will adaptively spin. The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock() are now performed inline in non-debug kernels. As a result, <sys/sx.h> now requires <sys/lock.h> to be included prior to <sys/sx.h>. The new kernel option SX_NOINLINE can be used to disable the aforementioned inlining in non-debug kernels. The size of struct sx has changed, so the kernel ABI is probably greatly disturbed. MFC after: 1 month Submitted by: attilio Tested by: kris, pjd
* Add "force" to ext2_ops, to match what was in the old mount_ext2fs binary.rodrigc2007-03-151-1/+1
| | | | Reported by: Ivan Voras <ivoras fer hr>
* Make insmntque() externally visibile and allow it to fail (e.g. duringtegge2007-03-133-2/+24
| | | | | | | | | | | | | | | | | | | | | | | late stages of unmount). On failure, the vnode is recycled. Add insmntque1(), to allow for file system specific cleanup when recycling vnode on failure. Change getnewvnode() to no longer call insmntque(). Previously, embryonic vnodes were put onto the list of vnode belonging to a file system, which is unsafe for a file system marked MPSAFE. Change vfs_hash_insert() to no longer lock the vnode. The caller now has that responsibility. Change most file systems to lock the vnode and call insmntque() or insmntque1() after a new vnode has been sufficiently setup. Handle failed insmntque*() calls by propagating errors to callers, possibly after some file system specific cleanup. Approved by: re (kensmith) Reviewed by: kib In collaboration with: kib
* Rename PRIV_VFS_CLEARSUGID to PRIV_VFS_RETAINSUGID, which seems to betterpjd2007-03-011-2/+2
| | | | | | describe the privilege. OK'ed by: rwatson
* Avoid checking for privileges if there is no need to.pjd2007-03-011-1/+1
| | | | Discussed with: rwatson
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.pjd2007-02-156-59/+70
| | | | | | | | | | | | | | | | This way we may support multiple structures in v_data vnode field within one file system without using black magic. Vnode-to-file-handle should be VOP in the first place, but was made VFS operation to keep interface as compatible as possible with SUN's VFS. BTW. Now Solaris also implements vnode-to-file-handle as VOP operation. VFS_VPTOFH() was left for API backward compatibility, but is marked for removal before 8.0-RELEASE. Approved by: mckusick Discussed with: many (on IRC) Tested with: ufs, msdosfs, cd9660, nullfs and zfs
* Cylinder group bitmaps and blocks containing inode for a snapshotkib2007-01-231-0/+7
| | | | | | | | | | | | | | | | | | | | | file are after snaplock, while other ffs device buffers are before snaplock in global lock order. By itself, this could cause deadlock when bdwrite() tries to flush dirty buffers on snapshotted ffs. If, during the flush, COW activity for snapshot needs to allocate block and ffs_alloccg() selects the cylinder group that is being written by bdwrite(), then kernel would panic due to recursive buffer lock acquision. Avoid dealing with buffers in bdwrite() that are from other side of snaplock divisor in the lock order then the buffer being written. Add new BOP, bop_bdwrite(), to do dirty buffer flushing for same vnode in the bdwrite(). Default implementation, bufbdflush(), refactors the code from bdwrite(). For ffs device buffers, specialized implementation is used. Reviewed by: tegge, jeff, Russell Cattelan (cattelan xfs org, xfs changes) Tested by: Peter Holm X-MFC after: 3 weeks (if ever: it changes ABI)
* Previously, the mount_ext2fs binary listed the acceptable mountrodrigc2006-11-181-1/+4
| | | | | | | | | | | options for ext2fs. Now that we use nmount() directly from the mount binary to access ext2fs filesystems, add the list of acceptable mount options to ext2_ops, so that vfs_filteropts() will accept options like "noatime" for ext2fs. PR: 105483 Noticed by: Dr. Markus Waldeck <waldeck gmx de> MFC after: 1 month
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-065-46/+71
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* Add mnt_noasync counter to better handle interleaved calls to nmount(),tegge2006-09-261-1/+1
| | | | | | sync() and sync_fsync() without losing MNT_ASYNC. Add MNTK_ASYNC flag which is set only when MNT_ASYNC is set and mnt_noasync is zero, and check that flag instead of MNT_ASYNC before initiating async io.
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-262-0/+10
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* Add snd_emu10kx driver for Creative SoundBlaster Live! and Audigy seriesnetchild2006-07-152-0/+414
| | | | | | | | | | | | | | | sound cards with optional pseudo-multichannel playback. It's based on snd_emu10k1 sound driver. Single channel version is available from audio/emu10kx port since some time. The two new ALSA header files (GPLed), which contain Audigy 2 ("p16v") and Audigy 2 Value ("p17v") specific interfaces, are latest versions from ALSA Mercurial repository. This is not connected to the build yet. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* - Update ALSA emu10k1.h (it was imported as emu10k1-alsa.h) header file tonetchild2006-07-153-1249/+445
| | | | | | | | | | | | latest version from Mercurial repository. It brings definition of some additional Audigy 2 / Audigy 2 Value registers. - Use new #defines from ALSA emu10k1.h - Remove unused include files: + emu10k1-ac97.h was imported from ALSA and never used, + emu10k1.h was imported from Creative Linux emu10k1 driver, but only AUDIGY_CODEBASE was used from it. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* Implement vnode operations for setting and removing extended attributes.rodrigc2006-06-111-1/+95
|
* Restore routines for getting and listing extended attributes whichrodrigc2006-06-111-0/+124
| | | | were lost in the last merge.
* Restore changes to spinlock macros before merge.rodrigc2006-06-111-10/+8
|
* Remove debugging printfrodrigc2006-06-111-1/+0
|
* Temporarily disable log recovery until we fix panics.rodrigc2006-06-101-0/+5
|
* Logical OR the following flags into the va_mode field:rodrigc2006-06-101-9/+3
| | | | | | | | | S_IFDIR when making a directory S_IFLNK when making a symbolic link S_IFIFO when making a pipe xfs_ialloc() checks this field for these flags when figuring out whether to make a directory, make a symbolic link or make a pipe.
* Call g_vfs_close() if:rodrigc2006-06-101-2/+35
| | | | | (1) _xfs_mount() fails (2) at the end of _xfs_unmount()
* Do not call vput() after we call VOP_UNLOCK().rodrigc2006-06-101-1/+1
|
* Change %llx to %jx in printf() to eliminate warnings on 64-bit platforms.rodrigc2006-06-091-1/+1
|
* Bring back changes in version 1.3 lost in previous commit.rodrigc2006-06-091-13/+1
|
* More changes due to latest XFS import.rodrigc2006-06-091-188/+267
| | | | Work done by: Russell Cattelan <cattelan at xfs dot org>
* Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree.rodrigc2006-06-09138-17918/+14817
| | | | | | Improve support for writing to XFS partitions. Work done by: Russell Cattelan <cattelan at xfs dot org>
* Include "xfs_macros.h" to fix tinderbox build breakage.rodrigc2006-06-011-0/+1
|
* Cope with -Wundef. This means including xfs_macros.h early in a few moreimp2006-06-0113-19/+24
| | | | | | files and changing #if XXXKAN -> #ifdef XXXKAN. # this is just compile tested, since I don't have xfs partitions.
* Add support for "export" option, to allow NFS exportingrodrigc2006-05-261-5/+11
| | | | of XFS filesystems.
* Remove calls to vfs_export() for exporting a filesystem for NFS mountingrodrigc2006-05-261-4/+2
| | | | | | | from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem. Approved by: dumbbell
* Remove calls to vfs_export() for exporting a filesystem for NFS mountingrodrigc2006-05-261-8/+3
| | | | | from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
* Check for VFS_STATFS() failure in _xfs_mount() and abort the mountkeramida2006-05-051-2/+1
| | | | | | | | on errors. Found by: Coverity Prevent Approved by: rodrigc, Russell Cattelan MFC after: 4 weeks
* Repair ext2fs writes.cracauer2006-04-131-1/+1
| | | | | | | | | | | | | | | | Strong candidate for backport to 6.x. When allocating new blocks, the search for block group beginnings would fail with a segfault. There was a side-effect read access with an off-by-one errors. The results were not used in the error case so the code worked in the past. But now the FreeBSD kernel has tighter mappings and the word accessed is not mapped (for me). The Linux kernel has rewritten most of the allocation strategy by now. Also, the Linux kernel cleaned up the integration of these files and it look feasable to wrap the original Linux files in wrapper that provides their favorite arguments instead of dragging around our own code.
* Update a DB_SET to DB_FUNC I missed yesterday.jhb2006-03-081-1/+1
|
* Add marker vnodes to ensure that all vnodes associated with the mount point aretegge2006-01-091-5/+9
| | | | | | iterated over when using MNT_VNODE_FOREACH. Reviewed by: truckman
* Don't hold a reference to the disk vnode for each inode.dumbbell2006-01-051-9/+0
|
* This is the style-fix for my previous commit. Sorry for the delay, Icracauer2005-12-291-7/+1
| | | | forgot about it.
* Eradicate caddr_t from the VFS API.des2005-12-141-1/+1
|
* Hide DDB-specific functions inside check for #ifdef DDB.rodrigc2005-12-131-3/+2
| | | | Noticed by: des
* Inherit system-wide BLKDEV_IOSIZE definition.rodrigc2005-12-131-13/+1
| | | | Submitted by: kan
* #define __user to nothingrodrigc2005-12-121-0/+4
|
* Initial import of read-only support for SGI's XFS filesystem.rodrigc2005-12-12168-0/+110918
| | | | Contributed by: XFS for FreeBSD project
* Fix -Wundef warnings found when compiling i386 LINT, GENERIC andru2005-12-054-8/+8
| | | | custom kernels.
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-041-1/+1
|
* Oops, the bug is still here, but reimplement the cpp(1) conditional properly.ru2005-12-041-0/+9
|
OpenPOWER on IntegriCloud