summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Removed unused includes.bde1998-08-172-5/+4
|
* "The releaseing of the reference and lock is not temporary and belongsmsmith1998-08-121-2/+1
| | | | | | | where it is. The reference and lock(s) are acquired just above the code in VREF() and relookup()." Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Handle the case of moving a directory onto the top of a sibling'sjulian1998-08-122-5/+31
| | | | | | | child of the same name. Submitted by: Kirk Mckusick with fixes from luoqi Chen Obtained from: Whistle test tree.
* Used daddr_t's, not ints, to store disk block numbers. Updated printfbde1998-07-281-9/+11
| | | | | | | | formats and args to match. Fixed old printf format errors (all related; most were hidden by calling printf indirectly). This change somehow avoids compiler bugs for 64-bit longs on i386's, although it increases the number of 64-bit calculations.
* Made lazy syncing of timestamps for special files non-optional.bde1998-07-271-3/+1
|
* Cast pointers to uintptr_t/intptr_t instead of to u_long/long,bde1998-07-151-2/+2
| | | | | | | respectively. Most of the longs should probably have been u_longs, but this changes is just to prevent warnings about casts between pointers and integers of different sizes, not to fix poorly chosen types.
* Fixed printf format errors.bde1998-07-114-28/+31
|
* Add code missed in the initial Soft updates integration.julian1998-07-101-1/+16
| | | | | Make the unallocated parts of a directry have a know state in case we need it later.
* Don't update superblock if mounted readonly,julian1998-07-081-8/+15
| | | | | | also fixes some problems with softupdates on root. More cleanups are needed here.. Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* Catch a few corner cases where FreeBSD differs enough from BSD 4.4 tojulian1998-07-081-4/+7
| | | | | confuse Soft updates.. Should solve several "dangling deps" panics.
* VOP_STRATEGY grows an (struct vnode *) argumentjulian1998-07-044-8/+10
| | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org>
* Restored revs.1.89-1.90 which I somehow clobbered in rev.1.91.bde1998-07-031-4/+4
|
* Sync timestamp changes for inodes of special files to disk as latebde1998-07-034-13/+26
| | | | | | | | | | | | | | as possible (when the inode is reclaimed). Temporarily only do this if option UFS_LAZYMOD configured and softupdates aren't enabled. UFS_LAZYMOD is intentionally left out of /sys/conf/options. This is mainly to avoid almost useless disk i/o on battery powered machines. It's silly to write to disk (on the next sync or when the inode becomes inactive) just because someone hit a key or something wrote to the screen or /dev/null. PR: 5577 Previous version reviewed by: phk
* Centralized in-core inode update. Update the in-core inode directlybde1998-07-033-39/+25
| | | | | | | | in ufs_setattr() so that there is no need to pass timestamps to UFS_UPDATE() (everything else just needs the current time). Ignore the passed-in timestamps in UFS_UPDATE() and always call ufs_itimes() (was: itimes()) to do the update. The timestamps are still passed so that all the callers don't need to be changed yet.
* Make vprint() print dev_t in hex also.phk1998-06-271-3/+3
|
* Report the type from the inode, not the vnode.phk1998-06-271-2/+2
|
* Flesh this document out just a little in response to some userjkh1998-06-261-11/+25
| | | | | questions and also recommend linking over copying since, at this stage, a stale copy is a real concern.
* Removed unused includes.bde1998-06-211-2/+1
|
* Slight change to directory cleanupjulian1998-06-141-5/+9
| | | | | Makes soft updates a bit cleaner. Eliminates some warnings about 'corrupted directories' from fsck.
* Note which version of Kirk's sources this corresponds to.julian1998-06-121-2/+2
|
OpenPOWER on IntegriCloud