summaryrefslogtreecommitdiffstats
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-022-2/+4
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* unfinished sblive driver, playback/mixer only for now - not enabled incg2000-04-021-0/+666
| | | | | | | | conf/files i don't seem to be clearing the cache right resulting in a short initial burst of noise, despite doing the same as creative and alsa. i'm committing now so more eyes can pore over the code.
* Change the write-behind code to take more care when startingdillon2000-04-022-2/+6
| | | | | | | | | | | | | | async I/O's. The sequential read heuristic has been extended to cover writes as well. We continue to call cluster_write() normally, thus blocks in the file will still be reallocated for large (but still random) I/O's, but I/O will only be initiated for truely sequential writes. This solves a number of annoying situations, especially with DBM (hash method) writes, and also has the side effect of fixing a number of (stupid) benchmarks. Reviewed-by: mckusick
* Rename the existing BUF_STRATEGY() to DEV_STRATEGY()phk2000-03-204-10/+10
| | | | | | | | substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo) substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo) This patch is machine generated except for the ccd.c and buf.h parts.
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-204-4/+8
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Bug fixes for currently harmless bugs that could rise to bitemckusick2000-03-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | the unwary if the code were called in slightly different ways. 1) In ufs_bmaparray() the code for calculating 'runb' will stop one block short of the first entry in an indirect block. i.e. if an indirect block contains N block numbers b[0]..b[N-1] then the code will never check if b[0] and b[1] are sequential. For reference, compare with the equivalent code that deals with direct blocks. 2) In ufs_lookup() there is an off-by-one error in the test that checks if dp->i_diroff is outside the range of the the current directory size. This is completely harmless, since the following while-loop condition 'dp->i_offset < endsearch' is never met, so the code immediately does a second pass starting at dp->i_offset = 0. 3) Again in ufs_lookup(), the condition in a sanity check is wrong for directories that are longer than one block. This bug means that the sanity check is only effective for small directories. Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
* Don't forget to check for unsupported features when updating. It wasbde2000-03-092-2/+8
| | | | | | | possible to defeat the check for rw incompatibilty by mounting ro and updating to rw. Approved by: jkh
* MFS (ext2_lookup.c 1.17.2.2, ext2_vnops.c 1.42.2.2: fix "filetype" support).bde2000-03-034-24/+48
| | | | Approved by: jkh
* Remove #if NDGB > 0 and #if NDGM > 0peter2000-01-292-9/+0
|
* Give vn_isdisk() a second argument where it can return a suitable errno.phk2000-01-102-4/+4
| | | | Suggested by: bde
* Support filesystems with the not-so-new "filetype" feature. Thisbde2000-01-052-132/+190
| | | | | feature gives the d_type field for struct dirent. We used to panic in ext2_readdir() for filesystems with this feature.
* Don't allow mounting (or mounting R/W) of filesystems with unsupportedbde2000-01-024-38/+68
| | | | | | | | | | | features (except for file types in directory entries, which will be supported soon). Centralized the magic number and compatibility checking. Dropped support for ancient (pre-0.2b) filesystems, as in the Linux version. Our "support" consisted of printing more details in the error message before failing at mount time.
* Merged changes in ext2_fs.h between Linux 1.2.2 and Linux 2.3.35. Thebde2000-01-014-100/+344
| | | | | | | | | | main changes are: - many things are more dynamic; e.g., the inode size is a new parameter in the superblock instead of a constant. - extensions are controlled by new flags in the superblock. - directory entries may have a file type field. These changes are not used yet, except for a spelling change which affects ext2_cnv.c
* Merged cosmetic changes from the initial import on the vendor branchbde2000-01-012-124/+236
| | | | | | (mainly things that were lost or misformatted in a different way by moving them to ext2_fs_i.h and back, and ifdefs for user mode that were excessively edited).
* Use an ifdef in ext2_fs.h instead of a bogus separate file (ext2_fs_i.h)bde2000-01-015-90/+144
| | | | | | | | | | to avoid the namespace problems caused by <ufs/ufs/inode.h> #defining i_mode, etc. ext2_fs_i.h had nothing to do with the Linux version. It was a small part of the Linux version of ext2_fs.h (the part that declares extra in-core fields for an inode). We don't need it because we use the ufs in-core inode for the extra fields.
* Updated/corrected the list of GPL'ed files.bde2000-01-012-0/+10
|
* This file is not used directly. The small parts of it that are used werebde2000-01-011-780/+0
| | | | | merged into ext2_vfsops.c in rev.1.1. This broke both merging from the vendor branch and the non-GPL'ed-ness of ext2_vfsops.c.
* This file is not used directly. It was merged into ext2_linux_balloc.cbde2000-01-011-26/+0
| | | | in rev.1.1.
* This commit was generated by cvs2svn to compensate for changes in r55289,bde2000-01-012-0/+806
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import the Linux ext2fs files that our GPL'ed ext2fs files seem to bebde2000-01-017-553/+1485
| | | | | | | | | | | | based on. Obtained from: Linux 1.2.2 distribution
| * This commit was manufactured by cvs2svn to create branch 'LINUX'.cvs2svn1995-11-05119-44442/+0
| |
* | Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-294-8/+8
| | | | | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* | Second pass commit to introduce new ACL and Extended Attribute systemrwatson1999-12-192-0/+4
| | | | | | | | | | | | | | calls, vnops, vfsops, both in /kern, and to individual file systems that require a vfsop_ array entry. Reviewed by: eivind
* | Introduce NDFREE (and remove VOP_ABORTOP)eivind1999-12-154-46/+6
| |
* | struct mountlist and struct mount.mnt_list have no business beingphk1999-11-202-2/+2
| | | | | | | | | | | | | | | | | | | | a CIRCLEQ. Change them to TAILQ_HEAD and TAILQ_ENTRY respectively. This removes ugly mp != (void*)&mountlist comparisons. Requested by: phk Submitted by: Jake Burkholder jake@checker.org PR: 14967
* | Fix __asm__ clobber list abuse.obrien1999-11-152-6/+10
| | | | | | | | Submitted by: bde
* | Remove WILLRELE from VOP_SYMLINKeivind1999-11-132-2/+4
| | | | | | | | | | | | Note: Previous commit to these files (except coda_vnops and devfs_vnops) that claimed to remove WILLRELE from VOP_RENAME actually removed it from VOP_MKNOD.
* | Remove WILLRELE from VOP_RENAMEeivind1999-11-122-4/+14
| |
* | Next step in the device cleanup process.phk1999-11-092-2/+8
| | | | | | | | | | | | | | | | Correctly lock vnodes when calling VOP_OPEN() from filesystem mount code. Unify spec_open() for bdev and cdev cases. Remove the disabled bdev specific read/write code.
OpenPOWER on IntegriCloud