Commit Graph

126 Commits

Author SHA1 Message Date
matt
60db16d1ff Add multiple inclusion protection for headers. Fix mismatched
variable declarations (missing const's) as needed.
2002-12-01 00:12:06 +00:00
yamt
42a8b926f9 eliminate i_ino from in-core inode
and use local variable instead.

ok'ed by Frank van der Linden.
2002-11-26 01:23:30 +00:00
thorpej
b409a344b5 Avoid strict-alias warnings. 2002-11-25 01:44:21 +00:00
jdolecek
f040fc2e24 ext2fs_remove(): use 'else' to eliminate need for goto (and improve
readibility, even)
2002-10-23 19:52:16 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
jdolecek
a120eaa3ea use ufs_balloc_range() rather than local (mostly identical, but with some
bugs) ext2fs variant
2002-09-26 11:06:36 +00:00
jdolecek
e305eb63e8 don't need <sys/conf.h> here 2002-09-22 19:32:54 +00:00
christos
6f3945a88d MNT_GETARGS support 2002-09-21 18:10:34 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
soren
178d83d503 Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.
2002-07-30 07:40:07 +00:00
wiz
645df36eff Spell '[Rr]ight' correctly. From Jim Bernard. 2002-07-26 14:11:34 +00:00
thorpej
7903aba812 #if 0 a test that is always false (and the XXX comment above it
indicates so).
2002-05-30 18:54:55 +00:00
chs
e926e6ec99 use the correct size when zeroing an array. 2002-05-05 17:01:41 +00:00
chs
fe10bac175 if the size argument to write(2) is 0, do not modify the file in any way,
including updating timestamps.  required for standards conformance.
2002-03-25 02:23:55 +00:00
chs
79c365e60e don't do any flush-behind for async mounts.
this matches the traditional behaviour.
2002-03-17 23:58:09 +00:00
thorpej
a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
chs
1b454dbb4f fix an error case. 2002-01-26 08:32:05 +00:00
chs
a4f1bc813a pick up changes from ufs_balloc_range(). 2001-11-30 07:06:19 +00:00
chs
9958c29316 VOP_PUTPAGES() requires page-aligned offsets, so be sure to provide such.
fixes PR 14759.

(while I'm here, call VOP_PUTPAGES() directly instead of indirecting through
the UVM pager op vector.)
2001-11-30 07:05:53 +00:00
chs
dc4cf974e0 track some changes in the ufs code:
update UVM's notion of the file size in *_write() rather than
*_balloc().
2001-11-10 17:48:02 +00:00
chs
c237f81065 update to track ufs_bmap.c:
don't call ufs_getlbns() for direct blocks.
2001-11-10 17:46:23 +00:00
lukem
ec6245465a add RCSID 2001-11-08 02:39:06 +00:00
simonb
c56d879335 Remove some variables that are set but never used. 2001-11-06 07:11:29 +00:00
simonb
915441c64b Use the sector size from the partition info, not a hard-coded value. 2001-11-06 07:09:39 +00:00
simonb
ecf09baab6 Remove a variable that is set but never used. 2001-11-06 07:08:09 +00:00
simonb
bb57e2c53c Remove some bogus checks for unsigned variables < 0. 2001-11-06 06:59:05 +00:00
lukem
99147a7648 remove #include <ufs/ufs/quota.h> where it was just to appease
<ufs/ufs/inode.h>, since the latter now includes the former.  leave the former
in source that obviously uses specific bits of it (for completeness.)
2001-10-26 05:56:06 +00:00
chs
520b477a5a check early for reads beyond EOF. 2001-09-22 22:44:08 +00:00
sommerfeld
181c4513dc Add fifo_putpages() placebo so that the vnode's uobj is unlocked. 2001-09-22 22:35:18 +00:00
chs
64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
chs
adf5d360a7 add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.
2001-09-15 16:12:54 +00:00
wiz
251b3464be heirarchy -> hierarchy 2001-08-24 10:24:45 +00:00
chs
f0af9f581b add getpages/putpages entries for spec vnodes. 2001-08-17 05:54:36 +00:00
assar
bec71dc090 change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it.  update callers and
file systems that implement these vnode operations
2001-07-24 15:39:30 +00:00
toshii
4866f1a22b Fix typo. s/extention/extension/ 2001-07-05 08:38:24 +00:00
chs
c31ab668df in ext2fs_balloc_range(), clear PG_RDONLY on pages which now have backing store. 2001-07-04 21:16:01 +00:00
wiz
f3f6c5b675 accessible' only has one a'. 2001-06-19 12:52:20 +00:00
mrg
67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
fvdl
ad5dcb280f Same change as in the UFS code: unlock vnode before setting v_op
to spec_vnode_ops. From Bill Studenmund.
2001-03-23 21:10:48 +00:00
chs
060e70db41 min() -> MIN(), max() -> MAX().
fixes more problems with file offsets > 4GB.
2001-02-27 04:37:44 +00:00
chs
5e3caa8b52 skip truncating a file to 0 before freeing it if it's already zero-length. 2001-02-18 20:17:04 +00:00
tsutsui
ec8b1c000e Fix nested extern declaration of prtactive. 2001-02-07 12:40:43 +00:00
jdolecek
d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
chs
3a5e4f901b in *_sync(), don't skip vnodes which have (potentially dirty) pages. 2000-12-10 19:36:31 +00:00
chs
1c89ab39ad redo ext2fs_balloc_range(), accounting for differences between ext2fs and ffs. 2000-12-10 06:38:31 +00:00
chs
b3dcb62708 fix merge error: ext2fs uses a custom balloc rather than a VOP-style one. 2000-12-01 07:02:40 +00:00
chs
aeda8d3b77 Initial integration of the Unified Buffer Cache project. 2000-11-27 08:39:39 +00:00
fvdl
db4108490a Adapt for VOP_FSYNC parameter change. 2000-09-19 22:01:59 +00:00
thorpej
7cc27a88c0 Convert namei pathname buffer allocation to use the pool allocator. 2000-08-03 20:41:05 +00:00