summaryrefslogtreecommitdiffstats
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-042-8/+8
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Use <sys/queue.h> macro API.phk2001-02-041-2/+2
|
* Remove a DIAGNOSTIC check which belongs in <sys/queue.h> if anyplace at all.phk2001-02-041-4/+0
|
* Driver for the ESS Maestro3 and Allegro sound chips. Note that due to thescottl2001-02-012-0/+906
| | | | | | amount of GPL'd firmware in the driver, it will only be built as a module. Approved by: cg
* Back out proc locking to protect p_ucred for obtaining additionaljhb2001-01-272-48/+6
| | | | references along with the actual obtaining of additional references.
* Convert all simplelocks to mutexes and remove the simplelock implementations.jasone2001-01-243-41/+36
|
* Proc locking.jhb2001-01-231-0/+2
|
* Proc locking, mostly protecting p_ucred while obtaining additionaljhb2001-01-234-10/+56
| | | | references.
* Completed move of Digiboard drivers to dev/dgbbabkin2001-01-088-10303/+0
|
* Changed the copyright notice to BSD-style. The original GPL copyrightbabkin2001-01-054-24/+110
| | | | | was used due to confusion. Now this code should be moved out of the gnu ghetto subdirectory.
* Avoid a data-consistency race between write() and mmap()dillon2000-12-172-0/+18
| | | | | | | | by ensuring that newly allocated blocks are zerod. The race can occur even in the case where the write covers the entire block. Reported by: Sven Berkvens <sven@berkvens.net>, Marc Olzheim <zlo@zlo.nu>
* Put the bits in place for Alpha support for ext2. Not tested.mjacob2000-12-095-0/+263
|
* Correct to a common %ld the 5 argument to a printf.mjacob2000-12-092-4/+4
|
* Use a pointer to a size_t for the 4th argument to copyinstr-mjacob2000-12-092-2/+2
| | | | not a pointer to a u_int.
* Backed out previous commit. Don't depend on namespace pollution inbde2000-12-024-0/+4
| | | | <sys/buf.h>.
* remove unneded sys/ucred.h includesalfred2000-11-304-4/+0
|
* Quick fix for not writing group descriptor group, inode bitmaps orbde2000-11-102-2/+4
| | | | | | | | | | | | | block bitmaps before unmount() completes. They were written using bdwrite(), so they were normally written less than 32 seconds after unmount(), but this is too late if the media is removed or the system is rebooted soon after unmount(). sync()ing before unmount() didn't help, because ext2fs uses buggy private caching for these blocks -- it doesn't even bdwrite() them until they are uncached or the filesystem is unmounted. sync()ing after unmount() didn't help, because sync() only applies to (vnodes for) mounted filesystems. PR: 22726
* Fixed breakage of mknod() in rev.1.48 of ext2_vnops.c and rev.1.126 ofbde2000-11-042-2/+6
| | | | | | | | | | | | | | | | | | | | ufs_vnops.c: 1) i_ino was confused with i_number, so the inode number passed to VFS_VGET() was usually wrong (usually 0U). 2) ip was dereferenced after vgone() freed it, so the inode number passed to VFS_VGET() was sometimes not even wrong. Bug (1) was usually fatal in ext2_mknod(), since ext2fs doesn't have space for inode 0 on the disk; ino_to_fsba() subtracts 1 from the inode number, so inode number 0U gives a way out of bounds array index. Bug(1) was usually harmless in ufs_mknod(); ino_to_fsba() doesn't subtract 1, and VFS_VGET() reads suitable garbage (all 0's?) from the disk for the invalid inode number 0U; ufs_mknod() returns a wrong vnode, but most callers just vput() it; the correct vnode is eventually obtained by an implicit VFS_VGET() just like it used to be. Bug (2) usually doesn't happen.
* Support filesystems with the not-so-new "sparse_superblocks" feature.bde2000-11-038-30/+90
| | | | | | | | | | | When this feature is enabled, mke2fs doesn't necessarily allocate a super block and its associated descriptor blocks for every group. The (non-)allocations are reflected in the block bitmap. Since the filesystem code doesn't write to these blocks except for the first superblock, all it has to do to support them is to not count them in ext2_statfs() and not attempt to check them at mount time in ext2_check_blocks_bitmap() (the check has never been enabled in FreeBSD anyway).
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-292-2/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ingphk2000-10-294-4/+0
| | | | | | | | | | the offending inline function (BUF_KERNPROC) on it being #included already. I'm not sure BUF_KERNPROC() is even the right thing to do or in the right place or implemented the right way (inline vs normal function). Remove consequently unneeded #includes of <sys/proc.h>
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-272-4/+0
| | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
* Remove unneeded #include <machine/clock.h>phk2000-10-152-2/+0
|
* Blow away the v_specmountpoint define, replacing it with what it waseivind2000-10-092-4/+4
| | | | defined as (rdev->si_mountpoint)
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-043-8/+14
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Put on my nuclear-grade asbestos suit and cvs rm the old, broken, soundpeter2000-10-026-5566/+0
| | | | | | | | | | | drivers (again). These drivers have not compiled for 5-6 months. Now that the new sound code supports MIDI, the major reason we had for reviving it is gone. It is a far better investment polishing the new midi code than trying to keep this on life support. Come 5.0-REL, if there are major shortcomings in the pcm sound driver then maybe we can rethink this, but until then we should focus on pcm. Remember, these have not been compilable since ~April-May this year.
* ext2fs depends on ufs code, so update it to properly handle v_lock field.bp2000-09-262-2/+2
| | | | Noticed by: bde
* Add a lock structure to vnode structure. Previously it was either allocatedbp2000-09-253-3/+1
| | | | | | | | | | | | | | | | | | | separately (nfs, cd9660 etc) or keept as a first element of structure referenced by v_data pointer(ffs). Such organization leads to known problems with stacked filesystems. From this point vop_no*lock*() functions maintain only interlock lock. vop_std*lock*() functions maintain built-in v_lock structure using lockmgr(). vop_sharedlock() is compatible with vop_stdunlock(), but maintains a shared lock on vnode. If filesystem wishes to export lockmgr compatible lock, it can put an address of this lock to v_vnlock field. This indicates that the upper filesystem can take advantage of it and use single lock structure for entire (or part) of stack of vnodes. This field shouldn't be examined or modified by VFS code except for initialization purposes. Reviewed in general by: mckusick
* Fixed some serious bugs in ext2_readdir():bde2000-09-122-22/+44
| | | | | | | | | | | | | | | | | The cookie buffer was usually overrun by a large amount whenever cookies were used. Cookies are used by nfs and the Linuxulator, so this bug usually caused panics whenever an ext2fs filesystem was nfs mounted or a Linux utility that calls readdir() was run on an ext2fs filesystem. The directory buffer was sometimes overrun by a small amount. This sometimes caused panics and wrong results even for FreeBSD utilities, but it was usually harmless because FreeBSD utilities use a large enough buffer size (4K). Linux utilities usually triggered the bug since they use a too-small buffer size (512 bytes), at least with the old RedHat utilities that I tested with. PR: 19407 (this fix is incomplete or for a slightly different bug)
* sync CCR register definitions with creative sourcescg2000-08-061-1/+3
|
* This patch corrects the first round of panics and hangs reportedmckusick2000-07-242-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with the new snapshot code. Update addaliasu to correctly implement the semantics of the old checkalias function. When a device vnode first comes into existence, check to see if an anonymous vnode for the same device was created at boot time by bdevvp(). If so, adopt the bdevvp vnode rather than creating a new vnode for the device. This corrects a problem which caused the kernel to panic when taking a snapshot of the root filesystem. Change the calling convention of vn_write_suspend_wait() to be the same as vn_start_write(). Split out softdep_flushworklist() from softdep_flushfiles() so that it can be used to clear the work queue when suspending filesystem operations. Access to buffers becomes recursive so that snapshots can recursively traverse their indirect blocks using ffs_copyonwrite() when checking for the need for copy on write when flushing one of their own indirect blocks. This eliminates a deadlock between the syncer daemon and a process taking a snapshot. Ensure that softdep_process_worklist() can never block because of a snapshot being taken. This eliminates a problem with buffer starvation. Cleanup change in ffs_sync() which did not synchronously wait when MNT_WAIT was specified. The result was an unclean filesystem panic when doing forcible unmount with heavy filesystem I/O in progress. Return a zero'ed block when reading a block that was not in use at the time that a snapshot was taken. Normally, these blocks should never be read. However, the readahead code will occationally read them which can cause unexpected behavior. Clean up the debugging code that ensures that no blocks be written on a filesystem while it is suspended. Snapshots must explicitly label the blocks that they are writing during the suspension so that they do not cause a `write on suspended filesystem' panic. Reorganize ffs_copyonwrite() to eliminate a deadlock and also to prevent a race condition that would permit the same block to be copied twice. This change eliminates an unexpected soft updates inconsistency in fsck caused by the double allocation. Use bqrelse rather than brelse for buffers that will be needed soon again by the snapshot code. This improves snapshot performance.
* Add snapshots to the fast filesystem. Most of the changes supportmckusick2000-07-114-14/+34
| | | | | | | | | | | | | | | | | | | | the gating of system calls that cause modifications to the underlying filesystem. The gating can be enabled by any filesystem that needs to consistently suspend operations by adding the vop_stdgetwritemount to their set of vnops. Once gating is enabled, the function vfs_write_suspend stops all new write operations to a filesystem, allows any filesystem modifying system calls already in progress to complete, then sync's the filesystem to disk and returns. The function vfs_write_resume allows the suspended write operations to begin again. Gating is not added by default for all filesystems as for SMP systems it adds two extra locks to such critical kernel paths as the write system call. Thus, gating should only be added as needed. Details on the use and current status of snapshots in FFS can be found in /sys/ufs/ffs/README.snapshot so for brevity and timelyness is not included here. Unless and until you create a snapshot file, these changes should have no effect on your system (famous last words).
* Fix typo (accessable --> accessible).alex2000-06-142-2/+2
| | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai
* The change to do a longword compare in the previous commit just broke anbde2000-06-031-1/+1
| | | | | | apparently-intended micro-optimization ("testb" is equivalent and smaller) and added a style bug (the size suffix for "testl" was missing). linux-2.3.35 already had the correct fix.
* Mass update of isa drivers using compatability shims to usepeter2000-05-282-2/+22
| | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
* Back out the previous change to the queue(3) interface.jake2000-05-263-3/+3
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-233-3/+3
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Fix a C-style comment that had a syntax error -- AND gas 2.9.1 accepted!obrien2000-05-221-1/+1
|
* If we are going to do a byte compare, the operands should be byte-sized.obrien2000-05-221-1/+1
| | | | | In this case, I believe we want to compare against the 32-bit operand so use a full-world compare operation.
* Fix inconsistent assembly. If byte moves are specified, a byte-sizedobrien2000-05-221-2/+2
| | | | target must be too.
* Compile in the case that anyone ever actually uses LEAVE_FREE_CHARS.hoek2000-05-211-1/+1
| | | | | | It's not clear what this does nor why they would do it, but it should compile, now. This could be a case where fixing the code so that it compiles merely masks more devious dysfunctional behaviour.
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-0518-0/+22
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Add $FreeBSD$peter2000-05-013-3/+4
|
* Remove unneeded #include <vm/vm_zone.h>phk2000-04-304-4/+0
| | | | Generated by: src/tools/tools/kerninclude
* s/biowait/bufwait/gphk2000-04-294-4/+4
| | | | Prodded by: several.
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-192-2/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* ext2fs relies on UFS support code, and as a result also requiresrwatson2000-04-1514-0/+24
| | | | | | | | | | extattr.h to be included. This fixes the broken ext2fs build as of the import of extattr code. Also added $FreeBSD: $ to a couple of files that didn't have them, without which I couldn't commit this fix. Reported by: "George W. Dinolt" <gdinolt@pacbell.net>
* Introduce extended attribute support for FFS, allowing arbitraryrwatson2000-04-154-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | (name, value) pairs to be associated with inodes. This support is used for ACLs, MAC labels, and Capabilities in the TrustedBSD security extensions, which are currently under development. In this implementation, attributes are backed to data vnodes in the style of the quota support in FFS. Support for FFS extended attributes may be enabled using the FFS_EXTATTR kernel option (disabled by default). Userland utilities and man pages will be committed in the next batch. VFS interfaces and man pages have been in the repo since 4.0-RELEASE and are unchanged. o ufs/ufs/extattr.h: UFS-specific extattr defines o ufs/ufs/ufs_extattr.c: bulk of support routines o ufs/{ufs,ffs,mfs}/*.[ch]: hooks and extattr.h includes o contrib/softupdates/ffs_softdep.c: extattr.h includes o conf/options, conf/files, i386/conf/LINT: added FFS_EXTATTR o coda/coda_vfsops.c: XXX required extattr.h due to ufsmount.h (This should not be the case, and will be fixed in a future commit) Currently attributes are not supported in MFS. This will be fixed. Reviewed by: adrian, bp, freebsd-fs, other unthanked souls Obtained from: TrustedBSD Project
* fix missing defines and prototype for emu_vdump()cg2000-04-031-3/+9
|
OpenPOWER on IntegriCloud