aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* sync CCR register definitions with creative sourcesCameron Grant2000-08-061-1/+3
| | | | Notes: svn path=/head/; revision=64308
* This patch corrects the first round of panics and hangs reportedKirk McKusick2000-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. Notes: svn path=/head/; revision=63788
* Add snapshots to the fast filesystem. Most of the changes supportKirk McKusick2000-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). Notes: svn path=/head/; revision=62976
* Fix typo (accessable --> accessible).Alexander Langer2000-06-142-2/+2
| | | | | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai Notes: svn path=/head/; revision=61686
* The change to do a longword compare in the previous commit just broke anBruce Evans2000-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. Notes: svn path=/head/; revision=61215
* Mass update of isa drivers using compatability shims to usePeter Wemm2000-05-282-2/+22
| | | | | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table. Notes: svn path=/head/; revision=61011
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-263-3/+3
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-233-3/+3
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Fix a C-style comment that had a syntax error -- AND gas 2.9.1 accepted!David E. O'Brien2000-05-221-1/+1
| | | | Notes: svn path=/head/; revision=60802
* If we are going to do a byte compare, the operands should be byte-sized.David E. O'Brien2000-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. Notes: svn path=/head/; revision=60801
* Fix inconsistent assembly. If byte moves are specified, a byte-sizedDavid E. O'Brien2000-05-221-2/+2
| | | | | | | target must be too. Notes: svn path=/head/; revision=60800
* Compile in the case that anyone ever actually uses LEAVE_FREE_CHARS.Tim Vanderhoek2000-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. Notes: svn path=/head/; revision=60754
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-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 Notes: svn path=/head/; revision=60041
* Add $FreeBSD$Peter Wemm2000-05-013-3/+4
| | | | Notes: svn path=/head/; revision=59874
* Remove unneeded #include <vm/vm_zone.h>Poul-Henning Kamp2000-04-304-4/+0
| | | | | | | Generated by: src/tools/tools/kerninclude Notes: svn path=/head/; revision=59794
* s/biowait/bufwait/gPoul-Henning Kamp2000-04-294-4/+4
| | | | | | | Prodded by: several. Notes: svn path=/head/; revision=59762
* Remove ~25 unneeded #include <sys/conf.h>Poul-Henning Kamp2000-04-192-2/+0
| | | | | | | Remove ~60 unneeded #include <sys/malloc.h> Notes: svn path=/head/; revision=59391
* ext2fs relies on UFS support code, and as a result also requiresRobert Watson2000-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> Notes: svn path=/head/; revision=59259
* Introduce extended attribute support for FFS, allowing arbitraryRobert Watson2000-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 Notes: svn path=/head/; revision=59241
* fix missing defines and prototype for emu_vdump()Cameron Grant2000-04-031-3/+9
| | | | Notes: svn path=/head/; revision=58958
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp2000-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. Notes: svn path=/head/; revision=58934
* unfinished sblive driver, playback/mixer only for now - not enabled inCameron Grant2000-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. Notes: svn path=/head/; revision=58919
* Change the write-behind code to take more care when startingMatthew Dillon2000-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 Notes: svn path=/head/; revision=58909
* Rename the existing BUF_STRATEGY() to DEV_STRATEGY()Poul-Henning Kamp2000-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. Notes: svn path=/head/; revision=58349
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp2000-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. Notes: svn path=/head/; revision=58345
* Bug fixes for currently harmless bugs that could rise to biteKirk McKusick2000-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> Notes: svn path=/head/; revision=58088
* Don't forget to check for unsupported features when updating. It wasBruce Evans2000-03-092-2/+8
| | | | | | | | | | possible to defeat the check for rw incompatibilty by mounting ro and updating to rw. Approved by: jkh Notes: svn path=/head/; revision=57839
* MFS (ext2_lookup.c 1.17.2.2, ext2_vnops.c 1.42.2.2: fix "filetype" support).Bruce Evans2000-03-034-24/+48
| | | | | | | Approved by: jkh Notes: svn path=/head/; revision=57710
* Remove #if NDGB > 0 and #if NDGM > 0Peter Wemm2000-01-292-9/+0
| | | | Notes: svn path=/head/; revision=56874
* Give vn_isdisk() a second argument where it can return a suitable errno.Poul-Henning Kamp2000-01-102-4/+4
| | | | | | | Suggested by: bde Notes: svn path=/head/; revision=55756
* Support filesystems with the not-so-new "filetype" feature. ThisBruce Evans2000-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. Notes: svn path=/head/; revision=55477
* Don't allow mounting (or mounting R/W) of filesystems with unsupportedBruce Evans2000-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. Notes: svn path=/head/; revision=55313
* Merged changes in ext2_fs.h between Linux 1.2.2 and Linux 2.3.35. TheBruce Evans2000-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 Notes: svn path=/head/; revision=55304
* Merged cosmetic changes from the initial import on the vendor branchBruce Evans2000-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). Notes: svn path=/head/; revision=55303
* Use an ifdef in ext2_fs.h instead of a bogus separate file (ext2_fs_i.h)Bruce Evans2000-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. Notes: svn path=/head/; revision=55299
* Updated/corrected the list of GPL'ed files.Bruce Evans2000-01-012-0/+10
| | | | Notes: svn path=/head/; revision=55293
* This file is not used directly. The small parts of it that are used wereBruce Evans2000-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. Notes: svn path=/head/; revision=55292
* This file is not used directly. It was merged into ext2_linux_balloc.cBruce Evans2000-01-011-26/+0
| | | | | | | in rev.1.1. Notes: svn path=/head/; revision=55291
* This commit was generated by cvs2svn to compensate for changes in r55289,Bruce Evans2000-01-012-0/+806
|\ | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=55290
| * Import the Linux ext2fs files that our GPL'ed ext2fs files seem to beBruce Evans2000-01-017-0/+2547
| | | | | | | | | based on. Obtained from: Linux 1.2.2 distribution Notes: svn path=/vendor-sys/ext2fs/dist/; revision=55289
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-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. Notes: svn path=/head/; revision=55206
* Second pass commit to introduce new ACL and Extended Attribute systemRobert Watson1999-12-192-0/+4
| | | | | | | | | | calls, vnops, vfsops, both in /kern, and to individual file systems that require a vfsop_ array entry. Reviewed by: eivind Notes: svn path=/head/; revision=54803
* Introduce NDFREE (and remove VOP_ABORTOP)Eivind Eklund1999-12-154-46/+6
| | | | Notes: svn path=/head/; revision=54655
* struct mountlist and struct mount.mnt_list have no business beingPoul-Henning Kamp1999-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 Notes: svn path=/head/; revision=53452
* Fix __asm__ clobber list abuse.David E. O'Brien1999-11-152-6/+10
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=53201
* Remove WILLRELE from VOP_SYMLINKEivind Eklund1999-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. Notes: svn path=/head/; revision=53131
* Remove WILLRELE from VOP_RENAMEEivind Eklund1999-11-122-4/+14
| | | | Notes: svn path=/head/; revision=53101
* Next step in the device cleanup process.Poul-Henning Kamp1999-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. Notes: svn path=/head/; revision=53059
* Quick fix for breakage of ext2fs link counts as reported by stat(2) byBruce Evans1999-11-032-0/+2
| | | | | | | | | | the soft updates changes: only report the link count to be i_effnlink in ufs_getattr() for file systems that maintain i_effnlink. Tested by: Mike Dracopoulos <mdraco@math.uoa.gr> Notes: svn path=/head/; revision=52838
* Newline-terminate the complaint message about not being able to findMike Smith1999-11-012-2/+2
| | | | | | | the root vnode pointer. Notes: svn path=/head/; revision=52782