Commit Graph

73 Commits

Author SHA1 Message Date
Poul-Henning Kamp
2cfc47fbc8 Make ufs_reclaim free the underlying inode. 1997-10-10 18:18:13 +00:00
Poul-Henning Kamp
631821df68 Mega commit to cleanup the "remaining nits" after my malloc change.
Introduce a M_EXT2NODE for ext2fs vnodes.
Use generic ufs_reclaim instead of hijacking ffs_reclaim.
1997-10-10 18:13:06 +00:00
Bruce Evans
dab8d6e4e7 `numdirtybuffers' was not maintained properly. This caused excessive
flushing of buffers in an attempt to reduce numdirtybuffers, and
perhaps other problems.
1997-10-07 11:10:18 +00:00
KATO Takenori
7825620c11 Oops, include <sys/conf.h>.
Reminded-by:	Simon Shapiro <Shimon@i-Connect.Net>
1997-09-28 02:23:10 +00:00
KATO Takenori
81bca6ddae Clustered read and write are switched at mount-option level.
1. Clustered I/O is switched by the MNT_NOCLUSTERR and MNT_NOCLUSTERW
   bits of the mnt_flag.  The sysctl variables, vfs.foo.doclusterread
   and vfs.foo.doclusterwrite are deleted.  Only mount option can
   control clustered I/O from userland.
2. When foofs_mount mounts block device, foofs_mount checks D_CLUSTERR
   and D_CLUSTERW bits of the d_flags member in the block device switch
   table.  If D_NOCLUSTERR / D_NOCLUSTERW are set, MNT_NOCLUSTERR /
   MNT_NOCLUSTERW bits will be set.  In this case, MNT_NOCLUSTERR and
   MNT_NOCLUSTERW cannot be cleared from userland.
3. Vnode driver disables both clustered read and write.
4. Union filesystem disables clutered write.

Reviewed by:	bde
1997-09-27 13:40:20 +00:00
Joerg Wunsch
6cce995019 Make MFS a supported option, finally. 1997-09-22 21:24:03 +00:00
Peter Wemm
a6aeade2c4 Convert select -> poll.
Delete 'always succeed' select/poll handlers, replaced with generic call.
Flag missing vnode op table entries.
1997-09-14 02:58:12 +00:00
Poul-Henning Kamp
0765fd9ee9 Remove some stuff from lookup which is now handled centrally. 1997-09-10 19:39:03 +00:00
Bruce Evans
41fadeeb28 Removed yet more vestiges of config-time swap configuration and/or
cleaned up nearby cruft.
1997-09-07 16:21:11 +00:00
Bruce Evans
e4ba6a82b0 Removed unused #includes. 1997-09-02 20:06:59 +00:00
Poul-Henning Kamp
0fa2443f0e Uncut&paste cache_lookup().
This unifies several times in theory indentical 50 lines of code.

The filesystems have a new method: vop_cachedlookup, which is the
meat of the lookup, and use vfs_cache_lookup() for their vop_lookup
method.  vfs_cache_lookup() will check the namecache and pass on
to the vop_cachedlookup method in case of a miss.

It's still the task of the individual filesystems to populate the
namecache with cache_enter().

Filesystems that do not use the namecache will just provide the
vop_lookup method as usual.
1997-08-26 07:32:51 +00:00
KATO Takenori
5651ff29eb Code cleanup. Removed !FreeBSD code arround sysctl stuff. Renamed
doclusterread/doclusterwrite into ext2_doclusterread and
ext2_doclusterwrite, which are unique names.  Moved #include of
<sys/sysctl.h> to the top of the file.

Pointed out by:		Bruce Evans <bde@zeta.org.au>
1997-08-24 11:23:17 +00:00
KATO Takenori
75107779c9 Added sysctl args vfs.ext2fs.doclusterread and
vfs.ext2fs.doclusterwrite which control cluster read/write operation
on ext2fs filesystem.
1997-08-23 07:41:02 +00:00
Garrett Wollman
57bf258e3d Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs.  (Socket buffers are the one exception.)  A number
of kernel APIs needed to get fixed in order to make this happen.  Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead.  Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
1997-08-16 19:16:27 +00:00
John Dyson
5fd549b62e Fix a problem with ext2fs so that filesystems mounted at reboot don't
keep ahold of buffers, and therefore leave filesystems dirty.  I haven't
been able to test, but the code compiles.  Those who run -current, please
test and report back!!!  (Sorry :-)).

PR:		kern/3571
Submitted by:	Dirk Keunecke <dk@panda.rhein-main.de>
1997-08-04 05:10:31 +00:00
Bruce Evans
3f9d0d120a Fixed comment about i_spare. 1997-07-13 15:40:31 +00:00
John Dyson
6b195d32a1 Fix a problem with the VN device. Specifically, the VN device can
cause a problem of spiraling death due to buffer resource limitations.
The vfs_bio code in general had little ability to handle buffer resource
management, and now it does.  Also, there are a lot more knobs for tuning the
vfs_bio code now.  The knobs came free because of the need that there
always be some immediately available buffers (non-delayed or locked) for
use.  Note that the buffer cache code is much less likely to get bogged
down with lots of delayed writes, even more so than before.
1997-06-15 17:56:53 +00:00
Bruce Evans
6789b801d1 Removed unused #includes. 1997-06-14 14:17:07 +00:00
Poul-Henning Kamp
f10c6b8f35 Shrink struct inode by 20 bytes, so that malloc wastes less space.
Pointed out by:	bde
1997-05-22 07:30:55 +00:00
Doug Rabson
e7927c1ec7 Support NFS cookies in VOP_READDIR, allowing ext2fs filesystems to be
exported via NFS.

2.2 candidate.
1997-04-05 12:23:44 +00:00
Bruce Evans
be98721964 Fixed gratuitous ANSIisms.
Removed trailing newline from panic messages.
1997-04-01 15:22:59 +00:00
Bruce Evans
ada28e77e6 Use __i386__ instead of i386 in ifdefs.
Don't compile unused (debugging?) functions.
1997-04-01 15:10:38 +00:00
Bruce Evans
95e7aeb4e1 Removed nested include of <ufs/ufs/dir.h>. Use the pre-Lite2 hack of
defining doff_t both here and in <ufs/ufs/dir.h> so that this file
is independent of <ufs/ufs/dir.h>.  It still has old prerequisites
<sys/param.h> and <ufs/ufs/quota.h>, and a new Lite2 prerequisite of
<sys/lock.h>, sigh.

This might fix lsof, which was broken by namespace pollution giving
conflicting definitions of DIRBLKSIZ.
1997-04-01 08:02:00 +00:00
Bruce Evans
fce002fdef Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include
it when it is not used.  In most cases, the reasons for including it
went away when the special ioctl headers became self-sufficient.
1997-03-24 11:25:10 +00:00
Bruce Evans
3ac4d1ef0c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.
Fixed everything that depended on getting fcntl.h stuff from the wrong
place.  Most things don't depend on file.h stuff at all.
1997-03-23 03:37:54 +00:00
Bruce Evans
3c81694426 Fixed some invalid (non-atomic) accesses to `time', mostly ones of the
form `tv = time'.  Use a new function gettime().  The current version
just forces atomicicity without fixing precision or efficiency bugs.
Simplified some related valid accesses by using the central function.
1997-03-22 06:53:45 +00:00
Mike Pritchard
d0ad3d988a Update a number of routines to reflect the actual name
of the routine that caused the panic.
1997-03-09 06:10:36 +00:00
Bruce Evans
9bdc993298 Removed unused flag IN_RECURSE and unused struct member i_lockcount. 1997-03-03 16:25:46 +00:00
Bruce Evans
0d4c2cc0c7 Removed useless setting of IN_RECURSE. The (anti) locking for this needs
to be done in a different way, if at all.
1997-03-03 16:23:15 +00:00
John Dyson
626808a8f2 Correct the port of ext2fs to Lite/2. I incorrectly used ufs_reclaim
instead of ffs_reclaim.
1997-02-26 05:08:18 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Bruce Evans
5afe6df620 Fixed type mismatches. i_spare[N] in ufs/inode.h changed from long to
int.  Change ext2fs to match.  We probably already assume that ints have
>= 32 bits.
1997-02-12 15:35:18 +00:00
Mike Pritchard
724ab19569 Add function prototypes for most of the new Lite2 functions.
Also made a few of the miscfs routines static to be
consistent.  Some modules simply required some additional
#includes to remove -Wall warnings.
1997-02-12 06:52:51 +00:00
John Dyson
996c772f58 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
John Dyson
87241caa43 This commit is the embodiment of some VFS read clustering improvements.
Firstly, now our read-ahead clustering is on a file descriptor basis and not
on a per-vnode basis.  This will allow multiple processes reading the
same file to take advantage of read-ahead clustering.  Secondly, there
previously was a problem with large reads still using the ramp-up
algorithm.  Of course, that was bogus, and now we read the entire
"chunk" off of the disk in one operation.   The read-ahead clustering
algorithm should use less CPU than the previous also (I hope :-)).
1996-12-29 02:44:37 +00:00
Bruce Evans
171ed8bf14 Fixed lookup of ".." in checkpath. It always failed, so renames of
directories to a different parent directory always failed.  This bug
was caused by 4.4Lite2 changing the directory format and ext2fs not
keeping up.

Should be in 2.2.
1996-11-09 10:25:04 +00:00
Bruce Evans
68a9989171 Fixed spacefree calculation in ext2_direnter(). This bug sometimes caused
panics.

This should be in 2.2, of course.

Submitted by:	davidg
Obtained from:	bouyer@antioche.ibp.fr (Manuel BOUYER) (fix for NetBSD)
1996-11-08 19:06:34 +00:00
Bruce Evans
f886b4857a Removed gratuitous differences between ext2_readwrite.c and ufs_readwrite.c.
This fixes several bugs and one missing feature:
- cluster_read() was needlessly used for reading files of size exactly 1
  block.
- EFAULT errors for read didn't terminate the loop.  This was probably
  harmless.
- IO_VMIO handling was missing near line 275.  I don't know what this does.
- B_CLUSTEROK was only set if (doclusterwrite) nead line 293.  This was
  harmless, if only because another bug prevents doclusterwrite from being
  0.
- MNT_NOATIME wasn't implemented.

This should be in 2.2, of course.

Reviewed by:	davidg
1996-11-08 18:50:09 +00:00
Nate Williams
95a1574e4f Whoops, I should've used the LINT config file. More ts -> tv changes
for timespec structure.
1996-09-20 05:51:12 +00:00
Nate Williams
030e2e9ebb In sys/time.h, struct timespec is defined as:
/*
         * Structure defined by POSIX.4 to be like a timeval.
         */
        struct timespec {
                time_t  ts_sec;         /* seconds */
                long    ts_nsec;        /* and nanoseconds */
        };

        The correct names of the fields are tv_sec and tv_nsec.

Reminded by:	James Drobina <jdrobina@infinet.com>
1996-09-19 18:21:32 +00:00
Bruce Evans
f313170d3c Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Bruce Evans
2043dc9a22 Removed bogus _BEGIN_DECLS/_END_DECLS.
Removed unused struct tag declarations in cloned code.

Added or cleaned up idempotency ifdefs.
1996-05-01 02:16:17 +00:00
Bruce Evans
e6302eab11 Removed vestigial support for the obsolete FIFO option. In ext2fs
it caused null pointer panics for all fifo operations unless FIFO
was defined.
1996-02-25 20:12:36 +00:00
Mike Pritchard
6c5e9bbdf5 Fix a bunch of spelling errors in the comment fields of
a bunch of system include files.
1996-01-30 23:02:38 +00:00
John Dyson
bd7e5f992e Eliminated many redundant vm_map_lookup operations for vm_mmap.
Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish
	overhead for merged cache.
Efficiency improvement for vfs_cluster.  It used to do alot of redundant
	calls to cluster_rbuild.
Correct the ordering for vrele of .text and release of credentials.
Use the selective tlb update for 486/586/P6.
Numerous fixes to the size of objects allocated for files.  Additionally,
	fixes in the various pagers.
Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs.
Fixes in the swap pager for exhausted resources.  The pageout code
	will not as readily thrash.
Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into
	page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE),
	thereby improving efficiency of several routines.
Eliminate even more unnecessary vm_page_protect operations.
Significantly speed up process forks.
Make vm_object_page_clean more efficient, thereby eliminating the pause
	that happens every 30seconds.
Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the
	case of filesystems mounted async.
Fix a panic with busy pages when write clustering is done for non-VMIO
	buffers.
1996-01-19 04:00:31 +00:00
Garrett Wollman
01733a9b6d Convert QUOTA to new-style option. 1996-01-05 18:31:58 +00:00
Poul-Henning Kamp
b8dce649f1 Staticize. 1995-12-17 21:14:36 +00:00
Bruce Evans
172fc5ae28 Restored variables that are used iff QUOTA is defined.
ext2fs still uses #if in many cases where the rest of the kernel uses
#ifdef (for QUOTA...).
1995-12-10 21:38:45 +00:00