Commit Graph

419 Commits

Author SHA1 Message Date
rvb
9d7a126e4f Pass2 complete 1998-09-02 19:09:53 +00:00
rvb
a085510ad5 Very Preliminary Coda 1998-08-29 21:14:52 +00:00
phk
eb85c7e691 sort the prototypes 1998-08-25 17:48:54 +00:00
phk
2eb129c515 Last commit managed to get mangled somehow. 1998-08-24 18:23:18 +00:00
phk
84bd0e1571 Remove the last remaining evidence of B_TAPE.
Reclaim 3 unused bits in b_flags
1998-08-24 17:47:25 +00:00
bde
9ba1aae697 Enabled Lite2 fix for reading from dead ttys. 1998-08-23 11:43:29 +00:00
bde
4e2d834c27 Removed unused includes. 1998-08-17 19:09:36 +00:00
bde
9e27b29fba Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
bde
0c01873b01 Fixed printf format errors. 1998-07-30 17:40:45 +00:00
alex
d48cc1feee Style fixes and a bug fix: don't remove the exit handler if unmount
fails.

Submitted by:	bde
1998-07-27 22:47:17 +00:00
alex
be85829abc A better solution to the rm_at_exit problem: Register the exit function
during first mount.  Unregister the exit function at last unmount.

Concept by:	sef
Reviewed by:	sef
Implemented by:	alex
1998-07-27 01:07:01 +00:00
alex
4ab63c85e2 Override the default VFS LKM dispatch functions so that a module
unload function can be provided (this is necessary to unregister
the at_exit handler).
1998-07-25 15:52:44 +00:00
bde
bd9ef8a24a Cast pointers to [u]intptr_t instead of to [unsigned] long. 1998-07-15 04:17:55 +00:00
bde
863d5c8b68 Cast pointers to uintptr_t/intptr_t instead of to u_long/long,
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.
1998-07-15 02:32:35 +00:00
bde
f0b863f4b5 Fixed printf format errors. 1998-07-11 07:46:16 +00:00
bde
c0cb9588c8 Quick fix for type mismatches which were fatal if longs aren't 32
bits.  We used a private, wrong, version of `struct dirent' to help
break getdirentries(), and we use a silly check that the size of this
struct is a power of 2 to help break mount() if getdirentries() would
not work.  This fix just changes the struct to match `struct dirent'
(except for the name length).
1998-07-07 04:08:44 +00:00
julian
0262543b5f There is no such thing any more as "struct bdevsw".
There is only cdevsw (which should be renamed in a later edit to deventry
or something). cdevsw contains the union of what were in both bdevsw an
cdevsw entries.  The bdevsw[] table stiff exists and is a second pointer
to the cdevsw entry of the device. it's major is in d_bmaj rather than
d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers
to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw).

rawread()/rawwrite() went away as part of this though it's not strictly
the same  patch, just that it involves all the same lines in the drivers.

cdroms no longer have write() entries (they did have rawwrite (?)).
tapes no longer have support for bdev operations.

Reviewed by: Eivind Eklund and Mike Smith
	Changes suggested by eivind.
1998-07-04 22:30:26 +00:00
julian
4363221ba2 VOP_STRATEGY grows an (struct vnode *) argument
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>
1998-07-04 20:45:42 +00:00
dt
c6c8ca45cd Remove "not hungly" panics. Cookies now used by the linux and ibcs2
emulators. The emulators assume that filesystem may just ignore cookies, and
handle this case correctly. So we just ignore cookies.

Also sync *_readdir "prototypes" with reality.
1998-06-25 16:54:41 +00:00
bde
a336cb95ff Avoid a 64-bit division in procfs_readdir(). Fixed related overflows.
Check args using the same expression as in fdesc and kernfs.  The check
was actually already correct, modulo overflow.  It could be tightened
up to either allow huge (aligned) offsets, treating them as EOF, or
disallow all offsets beyond EOF.

Didn't fix invalid address calculation &foo[i] where i may be out of
bounds.

Didn't fix shooting of foot using a private unportable dirent struct.
1998-06-14 12:53:39 +00:00
bde
cc3e00bf7a Avoid a 64-bit division in fdesc_readdir(). Fixed related overflows
and missing arg checking.

Panic instead of returning bogus error codes or forgetting to check
all cases if fdesc_readdir() gets called for a non-directory.  This
can't happen.
1998-06-14 08:46:41 +00:00
dfr
88b8a1bc7e Make these files compile. 1998-06-10 21:21:31 +00:00
alex
a3798e908e ENOPNOTSUPP --> EOPNOTSUPP
PR:		6906
Submitted by:	Steven G. Kargl <kargl@troutmask.apl.washington.edu>
1998-06-10 19:56:06 +00:00
dt
67afc7e5a0 Back out previous change. This behavior is at least completely
"susv2"-compliant.
1998-06-10 13:46:46 +00:00
dt
c5ee56643e Also return EOPNOTSUPP rather than EINVAL for not supported owner and group
changes.
1998-06-10 11:36:01 +00:00
peter
e18ee5bdc0 Don't silently accept attempts to change flags where they are not
supported.
1998-06-10 06:34:57 +00:00
peter
f7008b4ff1 Return EOPNOTSUPP rather than EINVAL for flags that are not supported. 1998-06-10 06:30:31 +00:00
dt
043f2beb05 Fix typo in a comment. 1998-06-09 13:20:29 +00:00
dfr
1d5f38ac22 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
dyson
d26bce6481 Make flushing dirty pages work correctly on filesystems that
unexpectedly do not complete writes even with sync I/O requests.
This should help the behavior of mmaped files when using
softupdates (and perhaps in other circumstances also.)
1998-05-21 07:47:58 +00:00
tegge
9fdbafa2fe Disallow reading the current kernel stack. Only the user structure and
the current registers should be accessible.
Reviewed by:	David Greenman <dg@root.com>
1998-05-19 00:00:14 +00:00
dt
ae01f21aed Fix priority bug in previous commit.
Submitted by:	bde
1998-05-18 10:24:26 +00:00
dt
2af99a3a7a Fix support for pre-Win95 filesystems: Make it possible to lookup just
created short file name. Don't insert "generation numbers".
1998-05-17 21:18:08 +00:00
dt
6bd34752d5 Remove bogus LK_RETRY.
Submitted by:	bde
1998-05-17 21:03:35 +00:00
bde
183e758e9a Don't forget to clean up after an error reading the directory entry
in deget().
1998-05-17 18:09:28 +00:00
bde
43a6b5d9ba Removed vestiges of pre-Lite2 locking. 1998-05-17 18:00:45 +00:00
phk
86337bf437 s/nanoruntime/nanouptime/g
s/microruntime/microuptime/g

Reviewed by:	bde
1998-05-17 11:53:46 +00:00
sos
12211e2fa7 Cleanup after Garret, include unpch.h to get at various macros.. 1998-05-17 09:37:39 +00:00
dt
c422df4943 Fix off by ane error in previous commit.
This caused following commands:
	mkdir z
	cd z
	touch A B
	mv B A
corrupt the '..' entry in 'z'.

Reported by:	bde
1998-05-09 09:36:38 +00:00
msmith
964ce778b1 In the words of the submitter:
---------
Make callers of namei() responsible for releasing references or locks
instead of having the underlying filesystems do it.  This eliminates
redundancy in all terminal filesystems and makes it possible for stacked
transport layers such as umapfs or nullfs to operate correctly.

Quality testing was done with testvn, and lat_fs from the lmbench suite.

Some NFS client testing courtesy of Patrik Kudo.

vop_mknod and vop_symlink still release the returned vpp.  vop_rename
still releases 4 vnode arguments before it returns.  These remaining cases
will be corrected in the next set of patches.
---------

Submitted by:	Michael Hancock <michaelh@cet.co.jp>
1998-05-07 04:58:58 +00:00
msmith
c645da3999 As described by the submitter:
Reverse the VFS_VRELE patch.  Reference counting of vnodes does not need
to be done per-fs.  I noticed this while fixing vfs layering violations.
Doing reference counting in generic code is also the preference cited by
John Heidemann in recent discussions with him.

The implementation of alternative vnode management per-fs is still a valid
requirement for some filesystems but will be revisited sometime later,
most likely using a different framework.

Submitted by:	Michael Hancock <michaelh@cet.co.jp>
1998-05-06 05:29:41 +00:00
dt
0e69a77105 Use DFLTBSIZE instead of MAXBSIZE for pm_fatblksize.
In msdosfs_sync: spelling fix, formatting changes; fix MNT_LAZY (sync
modified denodes, don't sync device)

Mostly submitted by (and with hints from):	bde

Increase limit for maximum disk size: as far as I can see previous limit was
gratuitously too low.
1998-04-29 12:55:51 +00:00
dyson
b5a79794cd Tighten up management of memory and swap space during map allocation,
deallocation cycles.  This should provide a measurable improvement
on swap and memory allocation on loaded systems.  It is unlikely a
complete solution.  Also, provide more map info with procfs.
Chuck Cranor spurred on this improvement.
1998-04-29 04:28:22 +00:00
julian
3f128f8b37 The 'mountroot' option is obviously pointless for an LKM
so allow LKM compilation to succeed by making it go away for that case.
Saves needing to include opt_devfs.h which an LKM cannot rely on anyhow.
1998-04-20 23:18:46 +00:00
julian
cb9166e241 Make the devfs SLICE option a standard type option.
(hopefully it will go away eventually anyhow)
1998-04-20 03:57:41 +00:00
julian
0796a5c56e Add changes and code to implement a functional DEVFS.
This code will be turned on with the TWO options
DEVFS and SLICE. (see LINT)
Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes.

/dev will be automatically mounted by init (thanks phk)
on bootup. See /sys/dev/slice/slice.4 for more info.
All code should act the same without these options enabled.

Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others

This code does not support the following:
bad144 handling.
Persistance. (My head is still hurting from the last time we discussed this)
ATAPI flopies are not handled by the SLICE code yet.

When this code is running, all major numbers are arbitrary and COULD
be dynamically assigned. (this is not done, for POLA only)
Minor numbers for disk slices ARE arbitray and dynamically assigned.
1998-04-19 23:32:49 +00:00
des
396b114475 Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
bde
b598f559b2 Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
dt
90321d41cb Add a missing LK_RETRY.
Noticed by: Bruce (almost 2 monts ago)

Remove a debugging printf.
1998-04-15 11:04:53 +00:00
phk
5394eb1aa3 Use random() rather then than homegrown stuff. 1998-04-06 11:39:04 +00:00