Commit Graph

14060 Commits

Author SHA1 Message Date
Bruce Evans
fdc79256c1 Moved kernel declarations inside the KERNEL ifdef, and removed
include of <sys/queue.h> in the !KERNEL case.  The prerequisites
for <ufs/ufs/quota.h> were broken in Lite2 by converting some of
the kernel declarations to use queue macros without including
<sys/queue.h>.  <sys/queue.h> was included in applications in
/usr/src instead.  We polluted this file instead of merging the
changes in the applications.

Include <sys/queue.h> in the KERNEL case, and forward-declare all
structs that are used in prototypes, so that this file is almost
self-sufficient even in the kernel.

Obtained from:	mostly from NetBSD
1999-03-05 11:25:31 +00:00
Søren Schmidt
2e526e2ac0 Now all actual probing of both ATA & ATAPI devices are done after
interrupts are enabled, this kills the last "unwanted interrupts"
(and there is no ugly hacks like in the old driver to avoid them).
COmmand interrupt devices are now supported, this applies mostly
to older CDROM's and apparently also the ZIP.

Fixed problems:

    Number of total sectors wrong on some older drives.
        Fixed by not using the LBA size unless we know its valid.

There has also been more general code clenaups, some reorgs also.
1999-03-05 09:43:30 +00:00
Bruce Evans
abd022381d Changed the type of quotactl()'s 4th arg from char *' to void *'
so that non-sloppy applications can call it without using disgusting
casts to avoid warnings.  The 4th arg is sort of varargs -- it must
sometimes represent a filename, sometimes a struct pointer, and is
sometimes unused.  The arg type is still caddr_t in the kernel.

Obtained from:	mostly from NetBSD
1999-03-05 09:28:33 +00:00
Alan Cox
901671c028 Fix an SMP-only TLB invalidation bug. Specifically, disable
a TLB invalidation optimization that won't work given the
limitations of our current SMP support.

This patch should be applied to -stable ASAP.

Thanks to John Capo <jc@irbs.com>,
          Steve Kargl <sgk@troutmask.apl.washington.edu>, and
          Chuck Robey <chuckr@mat.net>
for testing.
1999-03-05 08:05:44 +00:00
Alan Cox
2f33b2c03e exec_aout_imgact should lock the vm_map before calling vm_map_insert.
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>,
		"John S. Dyson" <dyson@iquest.net>, and
		David Greenman <dg@root.com>
1999-03-04 18:04:40 +00:00
KATO Takenori
94709d1d93 Make loader be able to load 1.2MB fd on machines w/ 1.44MB fdd.
Sumbmitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 16:38:12 +00:00
KATO Takenori
86d0f76681 Added an entry for 1.44MB fd.
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 16:34:52 +00:00
KATO Takenori
b4531f58da Oops, forgot to read boot.config file.
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 16:31:55 +00:00
Joerg Wunsch
785c7fcba3 Adopt syscons's recent change from key_t to keyent_t (this part of
pcvt is plug-compatible to syscons to facilitate an identical
VT-switching interface), so PR misc/1247 can be closed.
1999-03-04 10:50:36 +00:00
KATO Takenori
72578dfa5a When SCSI IDs are not contiguous, the loader could not find correct
unit number for da device.  This commit fixes this problem.

Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 10:48:14 +00:00
KATO Takenori
4a1bb98b26 boot2 doesn't need to say 'Can't find file boot.config.'
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 10:45:06 +00:00
KATO Takenori
eae8225c4c Fix character code of backslash. PC98 should use 0xfc instead of 0x5c.
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 10:44:01 +00:00
KATO Takenori
bd87150cd2 Sync with sys/i386/isa/sio.c revision 1.229. 1999-03-04 10:37:30 +00:00
KATO Takenori
88a368fa84 Sync with sys/i386/conf/files.i386 revision 1.225. 1999-03-04 10:36:27 +00:00
Søren Schmidt
61f625f0f3 Add the atapi fd driver (LS120 & ZIP drive support) 1999-03-04 09:53:19 +00:00
Bill Paul
51e1b50529 arprequest() allocates an mbuf with m_gethdr() but does not initialize
m->m_pkthdr.rcvif to NULL. Bad arprequest(). No biscuit.
1999-03-04 04:03:57 +00:00
Søren Schmidt
b9bb98b32b Added driver to support ATAPI floppies ie LS-120 & ZIP drives.
Added "options ATA_STATIC_ID" that wires ATA disks like the old wd driver.

Fixed problems:

	Dont use more sectors/intr than the drive supports.
	Fix announce of > 8.4G disks.
	Dont call ad_interrupt/ad_transfer when no disks config'd.
	Use the right page# for CDR write mode params.
	Fix breakage when no PCI support in kernel.
	Implement DEVFS stuff.

General code clenaup.
1999-03-03 21:10:29 +00:00
Julian Elischer
90b4d77467 The tunable parameter for the scheduler quantum was inverted.
Higher numbers led to smaller quanta.
In discussion with BDE, change this parameter to be in uSecs
to make it machine independent,
and limit it to non zero multiples of 'tick' (rounding down).
Also make the variabel globally available so that the present function that
returns its value (used for posix scheduling I believe) can go away.

Submitted by: Bruce Evans <bde@freebsd.org>
1999-03-03 18:15:29 +00:00
Bruce Evans
84f79a6d3c Fixed null pointer panic for misconfigured master ports.
PR:		i386/10273
Submitted by:	Stephen Kiernan <sab@yin.vegamuse.org>
1999-03-03 14:38:07 +00:00
KATO Takenori
c1aca4d070 Added FE_8BIT_SUPPORT into the list. The fe driver includes opt_fe.h.
Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-03-03 10:40:27 +00:00
Julian Elischer
cb11191c01 Slight cleanup of code resurected for union mounts..
Submitted by: Tony Finch <dot@dotat.at>
1999-03-03 02:35:51 +00:00
Alan Cox
dd2622a8cd To avoid a conflict for the vm_map's lock with vm_fault, release
the read lock around the subyte operations in mincore.  After the lock is
reacquired, use the map's timestamp to determine if we need to restart
the scan.
1999-03-02 22:55:02 +00:00
Greg Lehey
b8d3ec490d Change SAVECONFIG ioctl: it now writes an int parameter. 1999-03-02 22:00:19 +00:00
Julian Elischer
850c9afd03 Make comment match code. 1999-03-02 21:23:38 +00:00
Warner Losh
ec0211864c Better logging when the Geometry register probe fails. 1999-03-02 20:56:07 +00:00
Julian Elischer
8b3bd42341 Remove inapropriate use of VOP_ISLOCKED()
This produced races resulting in panics and filesystem corruptions
under some circumstances.

Reviewed by: luoqi chen <luoqi@freebsd.org>
Reviewed by: Kirk McKusick <mckusick@mckusick.com>
Submitted by: Matt Dillon <dillon@freebsd.org>
1999-03-02 20:26:39 +00:00
Semen Ustimenko
7e8dac41cb Add new kernel option:
options NTFS
1999-03-02 20:26:02 +00:00
David Greenman
37cd370c97 Correct casts in vtophys and avtophys to be vm_offset_t. 1999-03-02 16:20:39 +00:00
Daniel C. Sobral
c7bf325ce2 Don't treat empty lines as end-of-file in include(). (I can't
believe this bug is still here... :-( )
1999-03-02 16:16:57 +00:00
KATO Takenori
dc461a09bb Merge with sys/i386/conf/files.i386 revision 1.224. 1999-03-02 14:03:21 +00:00
KATO Takenori
4f0282c066 Sync with sys/i386/conf/Makefile.i386 revision 1.140. 1999-03-02 14:01:33 +00:00
KATO Takenori
24d3fe2bd8 Fix for LINE30 option. This option was not tested under new console
driver.

Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-03-02 12:34:24 +00:00
Greg Lehey
587ce8d9ae Correct some diagrams
Remove pid field from struct sd, struct plex and struct volume

Add flags VF_STOPPING, VF_OPEN and VF_DAEMONOPEN
1999-03-02 06:58:09 +00:00
Greg Lehey
57f9112565 sizespec: allow negative values (which signal error conditions).
catch missing (NULL) parameters.
1999-03-02 06:57:48 +00:00
Greg Lehey
a11c3a2c73 Change the name of drive state "uninit" to "referenced": it only
occurs if we have a dangling pointer to a drive.
1999-03-02 06:57:30 +00:00
Greg Lehey
75fff3fead Change printf() calls to log() calls.
set_sd_state: allow stop command to stop a reborn subdisk.
1999-03-02 06:57:08 +00:00
Greg Lehey
72dec6f286 Change printf() calls to log() calls. 1999-03-02 06:56:39 +00:00
Greg Lehey
80035a4cf1 Add keywords "size", synonym for "length", and "max".
Check for NULL name parameters.
1999-03-02 06:56:05 +00:00
Greg Lehey
39ce6e429e Change printf() calls to log() calls.
expand_table: Zero out newly allocated tables
1999-03-02 06:55:44 +00:00
Greg Lehey
1e14d0037d Add keywords "size", synonym for "length", and "max". 1999-03-02 06:55:18 +00:00
Greg Lehey
33e00380bc Change printf() calls to log() calls.
Change VINUM_SAVECONFIG: it now requires a parameter.  0 means
"configuration updates are finished, please save", and 1 means "please
just save the config".  This second meaning is invoked by the new
"saveconfig" command to vinum(8).
1999-03-02 06:54:57 +00:00
Greg Lehey
f569eff522 Change printf() calls to log() calls.
Recognize "referenced" drives by the lack of a slash in the device
name, not by a NUL character.

vinum_scandisk: return error indication (ENOENT if we can't find any
vinum drive, otherwise 0).

VINUM_SAVECONFIG: change parameters.
1999-03-02 06:54:30 +00:00
Greg Lehey
02dbb6666a New function return_drive_space
Add definitions of vinum_inactive and free_vinum, formerly local to
vinum.c

vinum_scandisk now returns int (error number)
1999-03-02 06:53:42 +00:00
Greg Lehey
e0e19a088b change printf() calls to log() calls.
Don't save config while we're reading it from disk.

Change the way we handle the daemon: if we can't communicate with it
for 1 second (which is possible), start a new one.  The daemon saves
its pid in daemonpid; on each iteration of the main loop the daemon
checks whether it's still in favour.  If not, it silently exits.
Also, when trying to communicate with the daemon, check daemonpid
first.  If it's set to 0, don't even try.
1999-03-02 06:53:15 +00:00
Greg Lehey
a0a8b3768e Change printf() calls to log() calls.
Rename the VF_KERNELOP to VF_DISKCONFIG and checkkernel () to
checkdiskconfig (), which better describes their function.

Disable configuration updates if we have an error reading in the
configuration.  This stops a "shoot-in-foot" problem where a mistake
can cause the configuration to be obliterated.

Tidy up some messages, which included superfluous \ns.

Recognize RAID-5 configuration information even in the non-RAID-5
version.  This fixes shoot-in-foot problems where starting the wrong
version of vinum would kill RAID-5 plexes.

Recognize drives that have been referenced, but for which no physical
location is known.  This is part of a modification which will
ultimately allow incrementally reading configurations.  Such drives
will have a device name "unknown".

New function return_drive_space () returns space to a drive.
Previously this was part of free_sd ().

give_sd_to_drive: don't do it if the subdisk needs more space than the
drive has available.

config_sd: if reading config from disk, accept plex offset, drive
offset and length specs of -1 to indicate error conditions.

parse_config: return ENOENT if the "read" command doesn't find any
drives.

remove_sd_entry: don't do it, even by force, if it's open.

If the size of a striped or RAID-5 plex is not an integral multiple of
the stripe size, trim the size until it is.

reinstate update_volume_config, which had atrophied, to recalculate
the size of a volume if a plex has shrunk due to stripe size
considerations.
1999-03-02 06:52:47 +00:00
Greg Lehey
571aa87170 Change printf() calls to log() calls.
vinumattach: Zero out tables after allocating them

Modify procedure at unload: if a vinum(8) has the superdev open, don't
close down.  If only the daemon has it open, send the daemon a stop
request and wait for it to close the superdev, then unload.

In order to do this, create a second superdev which is opened by the
daemon.  The open and close routines set a different bit in
vinum_conf.flags; otherwise the treatment is identical.

Remove opencount field in vol structure; replace by a flag bit, since
we can't count the number of opens.

Remove dead LKM grunge.
1999-03-02 06:52:11 +00:00
Greg Lehey
88c8f9c911 Change the name of drive state "uninit" to "referenced": it only
occurs if we have a dangling pointer to a drive.
1999-03-02 06:51:48 +00:00
Kirk McKusick
38e28fd66b Reorganize locking to avoid holding the lock during calls to bdwrite
and brelse (which may sleep in some systems).

Obtained from:	Matthew Dillon <dillon@apollo.backplane.com>
1999-03-02 06:38:07 +00:00
Alan Cox
e5f251d2d3 Remove the last of the share map code: struct vm_map::is_main_map.
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
1999-03-02 05:43:18 +00:00
Warner Losh
5369eb85ca Merge patch to ufs_vnops.c's ufs_rename to the copy of ufs_rename that
lives in ext2_vnops.c for ext2fs.  Also remove cast from comparision.
Bruce pointed out that it was bogus since we'd force a signed
comparision when we really wanted an unsigned comparison.
1999-03-02 05:31:47 +00:00