Commit Graph

120 Commits

Author SHA1 Message Date
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
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
thorpej 37dc008ca3 Cleanup how file system configuration information is declared, grouping
related information together, with the file system code itself.

This is just low-hanging fruit -- more to come.
2002-04-16 23:14:05 +00:00
chs 0d70d731c2 use the new compatibility routines to allow mmap() to work
(in the same non-coherent fashion that it worked pre-UBC)
until someone has time to do it the right way.
2001-12-18 07:51:16 +00:00
jdolecek 563ebe0896 our NTFS seems to read Windows 2000 NTFS just fine 2001-12-16 18:29:03 +00:00
chs 5a690c92a1 add a VOP_PUTPAGES method for all the filesystems that don't have pages,
just unlock the interlock.
2001-12-06 04:27:40 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem cd13721ca0 add RCSIDs 2001-11-10 13:22:20 +00:00
simonb fa50959ec6 Remove a variable that is set but never used. 2001-11-06 07:15:34 +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
joda 210e7a63b4 fix pointer/structure mismatch in some dprintf's 2001-07-30 13:10:30 +00:00
jdolecek fc4f1858f0 update 2001-07-06 12:38:40 +00:00
jdolecek 142a3390df two more 2001-06-26 09:36:40 +00:00
jdolecek a91872d1cf ntfs_readdir(): use NTFS_ROOTINO instead of ip->i_number for '..' entry
XXX it's not correct either way
2001-06-26 09:36:06 +00:00
jdolecek 61c37aef21 Allocate the struct dirent in ntfs_readdir() via MALLOC(), rather than
on stack.
2001-06-26 09:24:36 +00:00
jdolecek 42b64d9f91 ntfs_readntvattr_plain():
Previous revision mistakely removed fix for DIAGNOSTIC "getblk: block size
invariant failed" panic, incorporated in rev. 1.5. The problem there
has been that depending on 'off', the code did bread() of 512 and after that
1024 bytes for same 'blkno'. Fix this differently than in rev. 1.5 -
if 'off' would bump the read over to next device block, trim the read to
end on block boundary and read rest in next loop iteration. This seems
to fix the problem, and avoids the performance hit rev. 1.5 incurred.

Fix bug in code handling holes for reads via read(2) - a variable
was incremented instead of decremented.
2001-06-25 18:33:14 +00:00
jdolecek 15ed017345 Fix problem introduced in rev. 1.32 - dirent d_namlen should NOT count
the final null byte.
This makes programs using fts(3) (like find(1)/du(1)) print correct
name again. Problem reported by Luke Mewburn in private e-mail, thanks.
2001-06-20 09:14:59 +00:00
jdolecek a0e44b481b Fix locking disorder in ntfs_vgetex(), which resulted in deadlock
under heavy vnode usage - vget() must be called with unlocked ntnode!
Actually check the vget() return value and DTRT if it fails (i.e. when
the vnode has been recycled for other use).
2001-06-19 22:14:14 +00:00
jdolecek ec6b53c217 ntfs_{read|write}vattr_plain(): remove NetBSD-specific code which seems
to be not needed anymore with UBC. This might also solve problems
people seen as 'Argument list too long', like kern/10119
2001-06-19 22:10:11 +00:00
mrg c13e3a6693 use _KERNEL_OPT 2001-05-30 11:40:35 +00:00
jdolecek 44cdfc6a17 Change MALLOC()/FREE() to malloc()/free() for cases where the size
argument is a variable.
2001-05-15 22:38:40 +00:00
jdolecek 634da40a5a Don't apply #pragma pack(1) to struct ntfsmount. This fixes unaligned
crash on alpha. Problem noted and fix provided in kern/12726 by Dave Huang.
2001-05-15 22:17:05 +00:00
joda 35fd1893df set debug level via patchable variable, and fix some debug printf warnings 2001-03-29 10:51:16 +00:00
joda 46d4ad76ad mnt_stat is not a pointer 2001-03-29 10:47:44 +00:00
jdolecek bee3b51a6d Add the code to recode filenames to utf8 for NTFS. 2001-02-14 08:44:24 +00:00
jdolecek f251889358 Add per-mount filename conversion and compare hooks, which can be used
to recode Unicode names to other representation, like encoding form
or national character/code sets. This replaces the ugly NTFS_U28() hack.
Use these hooks to encode the filenames to UTF-8.
2001-02-13 19:53:52 +00:00
jdolecek 6574283ff5 sort more by priority, sligh rewording 2001-02-12 21:50:02 +00:00
jdolecek 07259dae69 note MALLOC()/FREE() usage should be cleaned up 2001-02-12 21:25:30 +00:00
jdolecek f9fd3eae06 ntfs_ntlookupfile(): if the file is not found using normal scan, do full
scan of all directory entries; the mangled file name we return to
  userland on getdents(2) may end up being unsearchable otherwise

This change is useful even through we will soon change to encode the
NTFS file names to utf-8 - we want to support recoding of filenames to
national 8bit charsets eventually.

while here, remove some unnecessary casts, change NTFS_U28() macro so that
the mangled filename doesn't contain control characters and use malloc()/free()
instead MALLOC()/FREE() for rdbuf buffer
2001-02-12 19:17:05 +00:00
jdolecek 266e0c4853 ntfs_unmount(): make the first 'vflush failed' printf a debug message; this
happens fairly commonly if e.g. some files are still opened
	then the unmount is attempted
	* if the second vflush() (including system vnodes) fails, we should
	  probably panic, it's too serious; for now, just add a comment
2001-02-10 14:28:51 +00:00
jdolecek d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
ad 642267bcc7 Update for hashinit() change. 2000-11-08 14:28:12 +00:00
fvdl db4108490a Adapt for VOP_FSYNC parameter change. 2000-09-19 22:01:59 +00:00
thorpej b94e29816f MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-03 03:39:52 +00:00
simonb 560ce4e272 Don't need to include <uvm/uvm_extern.h> in NetBSD case anymore. 2000-07-30 09:29:28 +00:00
mrg 8890e2439a <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 03:32:55 +00:00
mrg 2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
mrg c543a66253 remove some redundant <vm/vm_xxx.h> includes 2000-06-25 13:26:19 +00:00
augustss 169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
simonb 02042ff82c Delete redundant decl of rootvp, it's in <sys/systm.h>.
Don't need <sys/conf.h>.
2000-03-30 02:47:18 +00:00
jdolecek 89015c4648 Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.
2000-03-16 18:08:17 +00:00
jdolecek 52b9123e1a note lacking sysinst support 2000-03-13 19:00:28 +00:00
jdolecek 49fb5cf837 one more - Windows 2000 NTFS support 2000-02-19 14:42:21 +00:00
jdolecek e20ce57cd6 Store also attribute identifier in the filehandle structure, so that
proper file attribute (a.k.a. "resource fork") is picked up when
the filehandle is mapped back to filesystem object.

This should make attributes working on NFS-exported NTFS filesystems
or other layered filesystems using filehandles.
2000-02-08 16:17:58 +00:00
fvdl 655a7bf795 Always unlock the "fnode", even if we're about to free it, to keep
lock counts consistent. DIAGNOSTIC checks will barf otherwise.

XXX ntfs_ntput should not free the node, the reclaim vop should do it
XXX why does the ntfs code do its own internal locking?
1999-12-20 22:11:57 +00:00
jdolecek f8e7ae2c5b remove some staff not needed anymore after SOFTDEP is merged;
also fixes bug introduced in previous commit - the check for VBAD device node
  added in rev 1.20 was accidentaly run AFTER v_specinfo was touched,
  making the check useless
1999-11-15 19:38:14 +00:00
fvdl 0b1963121a Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O
1999-11-15 18:49:07 +00:00