summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* Add a warning about the copyright restraints.eivind1999-01-081-0/+4
|
* Don't pass unused unused timestamp args to UFS_UPDATE() or wastebde1999-01-0711-84/+60
| | | | | time initializing them. This almost finishes centralizing (in-core) timestamp updates in ufs_itimes().
* UFS_UPDATE() takes a boolean `waitfor' arg, so don't pass it the valuebde1999-01-062-7/+7
| | | | | | MNT_WAIT when we mean boolean `true' or check for that value not being passed. There was no problem in practice because MNT_WAIT had the magic value of 1.
* Ifdefed the conditionally used variable `prtrealloc'. Declare itbde1999-01-061-2/+4
| | | | | as volatile so that there is no chance that the code that it controls is optimised away.
* Backed out rev.1.47. It just broke my optimisations for lazy syncingbde1999-01-061-5/+3
| | | | | | of timestamps in rev.1.45. The soft updates bug was elsewhere. Forgotten by: luoqi
* Remove the 'waslocked' parameter to vfs_object_create().eivind1999-01-051-3/+3
|
* Ifdefed conditionally used simplock variables.bde1999-01-021-1/+3
|
* Remove the last clients of vfs_object_create(..., waslocked=1);eivind1999-01-021-3/+7
| | | | | | waslocked will go away shortly. Reviewed by: dg
* The mount_mfs process that stays in a supervisor context handling MFSdillon1999-01-011-1/+11
| | | | | | I/O requests must be marked P_SYSTEM because if it isn't and the system decides to swap it or (god forbid) kill it, the system stands a good chance of locking up.
* Fixed null pointer panics which I introduced in rev.1.86. Vnodesbde1998-12-241-7/+19
| | | | | | | | | may be revoked, so vnop routines must be careful about accessing the vnode if they may have blocked. Fixed marking for update after successfully reading or writing 0 bytes. In this case, POSIX.1 specifies marking if and only if the requested count is nonzero, but rev.1.86 never marked.
* Remove unused file. It seems to have been a vestige of when mfs did itsbde1998-12-201-43/+0
| | | | own memory allocation.
* In ufs_setattr(), if only one of va_atime or va_mtime are != VNOVAL, thendfr1998-12-201-3/+3
| | | | | the code set the other field in the inode to VNOVAL. This can happen sometimes on an NFS server.
* Add comments to code that I was trying to understand.julian1998-12-151-5/+107
| | | | | | Hopefully will save others time. Someone who understands this better might check for correctness.
* Fix -Wuninitialized warning regarding zero-length var-args ctl element.dillon1998-12-141-2/+2
| | | | | ( this isn't really an error, but I think it is important to fix the warning ).
* Remove some compiler warnings.julian1998-12-101-9/+6
|
* Make compare correct with unsigned types. (Problem introduced by Lite/2).eivind1998-12-091-3/+3
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-2/+2
| | | | and local variables, goto labels, and functions declared but not defined.
* Don't use the strange null pointer constant `(ufs_daddr_t)0' in a callbde1998-11-291-3/+3
| | | | to VOP_BMAP(). Don't use uncast NULLs in the same call.
* Restored the "reallocblks" code to its former glory. What this does isdg1998-11-131-14/+4
| | | | | | basically do a on-the-fly defragmentation of the FFS filesystem, changing file block allocations to make them contiguous. Thanks to Kirk McKusick for providing hints on what needed to be done to get this working.
* add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE()peter1998-11-103-3/+6
|
* Change dirty block list handling to use TAILQ macros.peter1998-10-311-8/+8
|
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagspeter1998-10-313-8/+9
| | | | rather than abusing the list next pointer with a magic number.
* Clarify a rather ambiguous debugging message.jkh1998-10-281-2/+2
|
* Oops, the redundant tests for major numbers weren't redundant here.bde1998-10-272-9/+8
| | | | | | | They checked for the magic major number for the "device" behind mfs mount points. Use a more obvious check for this device. Debugged by: Andrew Gallatin <gallatin@cs.duke.edu>
* Removed redundant bitrotted checks for major numbers instead of updatingbde1998-10-261-4/+2
| | | | them.
* Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rottedbde1998-10-251-4/+5
| | | | | | | when bdevsw[] became sparse. We still depend on magic to avoid having to check that (v_rdev) device numbers in vnodes are not NODEV. Removed redundant `major(dev) < nblkdev' tests instead of updating them.
* Nitpicking and dusting performed on a train. Removes trivial warningsphk1998-10-252-6/+4
| | | | about unused variables, labels and other lint.
* Use only the correct raw partition for writing labels. Don't use thebde1998-10-171-9/+4
| | | | | | | | | | | | | | | | | | | | | partition that the label ioctl is being done on just because it has offset 0, since there is no guarantee that such a partition is large enough to contain the label. Don't use the wrong raw partition (0 instead of RAW_PART). This fixes problems rewriting bizarre labels (with a nonzero offset for the 'a' partition) in newfs(8). Such labels shouldn't normally be used, but creating them was allowed if the ioctl was done on the raw partition, and sysinstall creates them if the root partition isn't allocated first. Note that allowing write access to a partition other than the one that has been checked for write access doesn't increase security holes significantly, since write access to any partition already allows changing the in-core label. This fix should be in 3.0R. Rev.1.26 of newfs/newfs.c shouldn't be in 3.0R.
* fixup for alpha.jkh1998-10-161-1/+4
|
* Fixed bloatage of `struct inode'. We used 5 "spare" fields for ext2fs,bde1998-10-131-2/+2
| | | | | | | | | | | | | | but when i_effnlink was added to support soft updates, there was only room for 4 spares. The number of spares was not reduced, so the inode size became 260 (on i386's), or 512 after rounding up by malloc(). Use one spare field in `struct dinode' instead of the 5th spare field in the inode and reduced to 4 spares in the inode so that the size is 256 again. Changed the types of the spares in the inode from int to u_int32_t so that the inode size has more chance of being <= 256 under other arches, and downdated ext2fs to match (it was broken to use ints before rev.1.1).
* "fix" a warningpeter1998-10-121-3/+2
|
* Allow more flexible use of MFS root.jkh1998-10-101-12/+10
| | | | Submitted by: peter
* MODINFO_ADDR has real addresses now, remove the manual relocation basedpeter1998-10-091-10/+5
| | | | on cpu type.
* Add some evil temporary phys-to-kern translation for mfs.jkh1998-10-091-3/+11
|
* include proper header for Mike's new stuff.jkh1998-10-091-1/+2
|
* Allow the module area to be used in order to find the MFS imagejkh1998-10-081-96/+28
| | | | | (in addition to allowing it to be compiled in) and stop overloading the MFS_ROOT variable to store size information.
* Use vm_page_xxx() inline functions to manipulate vm_page::flags, vm_page::busy.luoqi1998-10-071-6/+6
| | | | | | | As a side effect, a few wakeup() calls are added, which might fix some of the missing vm_page wakeups people have been seeing. Reviewed by: Doug Rabson <dfr@nlsystems.com>
* Fix 'noatime' bug that was unrelated to use of noatime.nate1998-10-031-1/+10
| | | | | | | | | | | | | | | | | | | | | | | The problem is caused when a directory block is compacted. When this occurs, softdep_change_directoryentry_offset() is called to relocate each directory entry and adjust its matching diradd structure, if any, to match the new location of the entry. The bug is that while softdep_change_directoryentry_offset() correctly adjusts the offsets of the diradd structures on the pd_diraddhd[] lists (which are not yet ready to be committed to disk), it fails to adjust the offsets of the diradd structures on the pd_pendinghd list (which are ready to be committed to disk). This causes the dependency structures to be inconsistent with the buf contents. Now, if the compaction has moved a directory entry to the same offset as one of the diradd structures on the pd_pendinghd list *and* a syscall is done that tries to remove this directory entry before this directory block has been written to disk (which would empty pd_pendinghd), a sanity check in newdirrem() will call panic() when it notices that the inode number in the entry that it is to be removed doesn't match the inode number in the diradd structure with that offset of that entry. Reviewed by: Kirk McKusick <mckusick@McKusick.COM> Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>
* Do not allow a mounted on directory to be rmdir'ed. This removal canmckusick1998-09-301-2/+8
| | | | | | | happen when an NFS exported filesystem tries to remove a locally mounted on directory. PR: kern/7272 Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
* Fixed clean flag handling:bde1998-09-261-23/+33
| | | | | | | | | | | | | | - don't set the clean flag on unmount of an unclean filesystem that was (forcibly) mounted rw. - set the clean flag on rw -> ro update of a mounted initially-clean filesystem. - fixed some style bugs (mostly long lines). This uses the fs_flags field and FS_UNCLEAN state bit which were introduced in the softdep changes. NetBSD uses extra state bits in fs_clean. Reviewed by: luoqui
* Eliminate a race in VOP_FSYNC() when softupdates is enabled.luoqi1998-09-242-7/+4
| | | | | | | | | | Submitted by: Kirk McKusick <mckusick@McKusick.COM> Two minor changes are also included, 1. Remove gratuitious checks for error return from vn_lock with LK_RETRY set, vn_lock should always succeed in these cases. 2. Back out change rev. 1.36->1.37, which unnecessarily makes async mount a little more unstable. It also keeps us in sync with other BSDs. Suggested by: Bruce Evans <bde@zeta.org.au>
* Restore pre-v1.44 behavior: always copy modified in-core inode to diskluoqi1998-09-151-3/+5
| | | | | buffer. Otherwise some in-core inode changes might be lost, including important meta data (e.g. size) if softupdates is enabled.
* When a buffer is removed from a buffer queue, remember it's block numbergibbs1998-09-151-26/+52
| | | | and use it as "the currently active" buffer in doing disk sort calculations.
* Remove the SLICE code.sos1998-09-142-22/+2
| | | | | This clearly needs alot more thought, and we dont need this to hunt us down in 3.0-RELEASE.
* Don't dereference an uninitialized pointer in dead code. The deadbde1998-09-121-2/+2
| | | | code gets executed if it is compiled without optimization.
* Removed statically configured mount type numbers (MOUNT_*) and allbde1998-09-072-4/+4
| | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct.
* Put the zombie ffs sysctl node in "notyet" state together with its fewbde1998-09-073-7/+5
| | | | remaining children. Prepare it for MOUNT_UFS going away.
* Make MFS do the default on VOP_FREEBLKS().phk1998-09-071-1/+2
| | | | | XXX: we could deallocate the storage, but somebody else will have to pick up that task.
* Add a new vnode op, VOP_FREEBLKS(), which filesystems can use to informphk1998-09-051-1/+2
| | | | | | | | | | | | | device drivers about sectors no longer in use. Device-drivers receive the call through d_strategy, if they have D_CANFREE in d_flags. This allows flash based devices to erase the sectors and avoid pointlessly carrying them around in compactions. Reviewed by: Kirk Mckusick, bde Sponsored by: M-Systems (www.m-sys.com)
* Quick fix for breakage of read clustering on non-IDE drives. Readbde1998-08-181-2/+2
| | | | | | | | | | | | | | clustering is obsolescent technology so hardly anyone noticed. On a DORS 32160 SCSI drive with 4 tags, read clustering makes very little difference even for huge sequential reads. However, on a ZIP SCSI drive with 0 tags, the minimum overhead per block is about 40 msec, so very large clusters must be used to get anywhere near the maximum transfer rate. Using clusters consisting of 1 8K block reduces the transfer rate to about 250K/sec. Under msdosfs, missing read clustering is normal and a cluster size of 1 512 byte block reduces the transfer rate to about 25K/sec. Broken in: rev.1.18
OpenPOWER on IntegriCloud