ken [Sat, 3 May 2003 00:21:40 +0000 (00:21 +0000)]
Fix three problems in large (>2TB) device handling:
- Make sure we don't release the READ CAPACITY CCB twice
- If we have a device that needs a 16 byte READ CAPACITY command, make
sure we call xpt_schedule() so we can get a CCB.
- Don't unlock the peripheral until we're fully probed.
Many thanks to Julian Elischer for providing hardware and testing this.
phk [Fri, 2 May 2003 22:46:13 +0000 (22:46 +0000)]
Make bsd_disklabel_le_enc calculate the checksum and fill it in.
(If there is a legitimate need to correctly encode and pack a
disklabel with an invalid checksum custom tools can be built for
that.)
Make bsd_disklabel_le_dec() validate the magics, number of partitions
(against a new parameter) and the checksum.
Vastly simplify the logic of the GEOM::BSD class implementation:
Let g_bsd_modify() always take a byte-stream label.
This simplifies all users, except the ioctl's which now have to
convert to a byte-stream first. Their loss.
g_bsd_modify() is called with topology held now, and it returns
with it held.
Always update the md5sum in g_bsd_modify(), otherwise the check
is no use after the first modification of the label. Make the
MD5 over the bytestream version of the label.
Move the rawoffset hack to g_bsd_modify() and remove all the
inram/ondisk conversions.
Don't configure hotspots in g_bsd_modify(), do it in taste instead,
we do not support moving the label to a different location on the
fly anyway.
pdeuskar [Fri, 2 May 2003 21:17:08 +0000 (21:17 +0000)]
- Bus DMA'fy the driver
- Use htole* macros where appropriate so that the driver could work on non-x86 architectures
- Use m_getcl() instead of MGETHDR/MCLGET macros
Submitted by: sam (Sam Leffler)
phk [Fri, 2 May 2003 20:14:48 +0000 (20:14 +0000)]
Vastly simplify architecture handling: Use properties of label as
recorded in global variables, rather than checks on the architecture.
Drop horribly code to handle MBR/PC98's embedded in the BSD label area.
If you need to have an MBR or PC98 on your disk, you should not overlap
it with a BSDLABEL, if you don't need it, this code is nothing but trouble.
phk [Fri, 2 May 2003 19:14:38 +0000 (19:14 +0000)]
Remove the well-intentioned, but ill thought out check which prevents us
from dd(1)'ing the boot code off one drive and have bsdlabel write it
on another.
imp [Fri, 2 May 2003 17:38:08 +0000 (17:38 +0000)]
sysctlbyname takes a size_t as its 5th argument, not a pointer.
However, since NULL was used, and this is C++, this error went
undetected until g++ 3.3 somehow managed to whine about it.
sos [Fri, 2 May 2003 13:47:44 +0000 (13:47 +0000)]
Add flushing of devices on shutdown.
Note: this might print failure messages on some systems, unfortunatly
the info from the device, stating if flushing is supported, cannot be trusted
so the operation is always issued on all devices, just in case...
mtm [Fri, 2 May 2003 08:10:58 +0000 (08:10 +0000)]
Create a symbolic link /dev/vga -> /dev/ttyv0.
We can't remove the sourcing of /etc/rc.devfs yet in case the user
might have custom entries in it. We will have to come up with an
/etc/devfs.rules or something to make this kind of thing easier.
dougb [Fri, 2 May 2003 06:28:30 +0000 (06:28 +0000)]
* Document the -P option
* Add a paragraph suggesting that the merge option be used only for
files that users have modified. People have been using this option
for all files that are different, causing unecessary confusion.
obrien [Fri, 2 May 2003 06:24:51 +0000 (06:24 +0000)]
The is_name and is_in_name macros are FUBAR'ed.
Due to the use of signed vs. unsigned chars on our various platforms, one gets
"warning: comparison is always true due to limited range of data type"
from GCC 3.3.
grog [Fri, 2 May 2003 06:04:19 +0000 (06:04 +0000)]
check_drive: If we find an existing drive which is "up" or "down",
just return it. Don't try to reinitialize it. This should fix a
number of inconsistencies that some people encountered with "vinum
start".
dougb [Fri, 2 May 2003 05:27:35 +0000 (05:27 +0000)]
Per previous announcement, remove the old version of the rc system.
All functionality from the previous system has been preserved, and
users should still customize their system boot with the familiar
methods, rc.conf, rc.conf.local, rc.firewall, sysctl.conf, etc.
Users who have customized versions of scripts that have been removed
should take great care when upgrading, since the compatibility code
that used those old scripts has also been removed.
silby [Fri, 2 May 2003 03:43:40 +0000 (03:43 +0000)]
Add the M_FREELIST flag, which is used to detect whenever a
double free of a mbuf occurs and cause an immediate panic, rather
than allowing free list corruption to occur.
This code is trapped under INVARIANTS, so it should not cause any
change in default performance.
Reviewed by: a bunch of people on -net
MFC after: 1 week
marcel [Fri, 2 May 2003 01:36:27 +0000 (01:36 +0000)]
Unbreak alpha and ia64 builds. The previous change made the inclusion
of <machine/pc/bios.h> specific to i386 and added a conditional define
for BIOS_PADDRTOVADDR that depends on ISA_HOLE_START. The latter is
undefined on alpha and ia64. Since the former is defined the same on
both alpha and ia64, assume the ISA_HOLE_START dependent definition
is specific to amd64 and use the identity-mapping in all other cases.
tmm [Fri, 2 May 2003 01:21:37 +0000 (01:21 +0000)]
- Reduce the DVMA preallocation limit from 128kB to 32kB. 128kB were
quite excessive, and caused the available space to be used up too
easily. The new limit should be a better estimation of how much the
caller will need at most.
- Double the IOTSB size 64kB, for a DVMA area size of 64MB.
This should fix DMA problems on e450s and other large machines due
to DVMA space exhaustion, which were introduced in my last IOMMU
code revision in January.
jhb [Thu, 1 May 2003 21:21:42 +0000 (21:21 +0000)]
Remove Giant from the setuid(), seteuid(), setgid(), setegid(),
setgroups(), setreuid(), setregid(), setresuid(), and setresgid() syscalls
as well as the cred_update_thread() function.
jhb [Thu, 1 May 2003 21:16:38 +0000 (21:16 +0000)]
Initialize and destroy the struct proc mutex in the proc zone's init and
fini routines instead of in fork() and wait(). This has the nice side
benefit that the proc lock of any process on the allproc list is always
valid and sched_lock doesn't have to be used to test against PRS_NEW
anymore.