Age | Commit message (Collapse) | Author |
|
cache. This shouldn't interfere with the hibernate code and makes sure we
still flush the cache for controller that don't pass DVACT_POWRDOWN down to
their children yet. This will be removed when the autoconf subsystem gets
changed to do that for us by default.
ok deraadt@
|
|
as well, but it might be wise to flush before a hibernate operation, in
case hiberate looks at blocks which are in the buffer cache.
ok krw
|
|
paths are reflexive. It is now possible to fail part-way through a
suspend sequence, and recover along the resume code path.
Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used
after hibernate (and suspend too) to finish the job. Some drivers
must be converted at the same time to use this instead of shutdown hooks
(the others will follow at a later time)
ok kettenis mlarkin
|
|
The standards gpds are jealous gods. kettenis@ and beck@ have shown
EROFS is the wrong thing to return. So revert to EACCES until a
better error code is decided on.
|
|
is attempted. This is instead of the current EACCES and is intended
to result in better error messages from mount(8).
Tweak default EROFS error text to mention fsck'ing in mount_ext2fs
and mount_msdos since they both have fsck's like ffs.
ok deraadt@ aja@ ian@ phessler@
|
|
when b_error has not already been set to something more informative,
e.g. EROFS.
DO check the result of ffs_sbupdate() and error out of a mount()
call when ffs_sbupdate() reports EROFS while attempting a rw mount.
Letting RW mounts proceed regardless of EROFS led to crashes and
usb problems for Oliver Seufer while using the RW/RO switches on
some usb devices. Fix developed using devices kindly supplied by
Oliver & Co.
ok miod@
|
|
tested by dcoppa@, ok krw@, miod@
|
|
that caused large disks to appear offline.
Discovered and tested by mlarkin@; ok dlg@
|
|
|
|
to use the fifo bufq sorting on such disks. there's no point ordering io
if the real blocks arent in the order we think they are.
ok krw@ tedu@ miod@
|
|
required vpd pages, then read them for the values we want.
we look for the max blocks per unmap, the max descriptors per unmap, and
which scsi command to use for unmapping (unmap will be preferred).
two fixes and ok matthew@
|
|
the read cap 16 data. move the read cap code into sd.c so i can get
at this bit without much contorting, and to make it trivial to get
at the other interesting things in there later.
thin disks report themselves as "thin" in dmesg along with their
size now.
ok matthew@
|
|
that they're implemented consistently in bounds_check_with_label().
Also, per krw's request, change bounds_check_with_label() to return 0
if the checks succeed, and change the drivers to test == -1 instead of
<= 0. (Man page update to follow; intentionally omitting
arch/vax/mba/hp.c from this commit because it doesn't even build
currently and miod@ promises to kill it soon.)
ok krw@
|
|
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.
ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago
|
|
subr_disk.c. For now just the MI disk drivers.
ok deraadt@, krw@; jsing@ liked the approach too
|
|
be interrupted.
ok matthew
|
|
rather than using various wrappings. Convert vnd to using the sc_dk
rwlock instead of using one of its own.
ok matthew
|
|
of silly flag twiddling code in various disk drivers.
ok deraadt@, miod@
N.B., users will need a -current disklabel(8) to be able to write new
disklabels to disk now.
|
|
never done anything in OpenBSD and just clutters disk drivers with
silly flag handling.
More cleanup to follow.
ok deraadt@, millert@; no objections krw@
|
|
to return EBUSY if the user tries to modify an open partition's offset
or size. Only sadness can result if a user tries this, and rejecting
it prevents a race between sdstart() and sdstrategy().
Curiously, there was already code in the kernel and in disklabel(8) to
detect/handle this, but it was effectively disabled because the disk
drivers always used something like "/* sc->sc_dk.dk_openmask */ 0",
and this commented out code has existed since even r1.1 in NetBSD.
I had no problems building a release and messing around with
disklabel(8) for a bit with this diff. Canarying the more common MI
disk drivers until we gain confidence that there aren't any
regressions, then we can switch the remaining drivers.
"I am surprised you got me convinced that this stuff is safe" deraadt@
ok krw@
|
|
print the "sdN:" at the start of the now empty line. Noted by
miod@.
|
|
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
|
|
Prodded repeatedly by deraadt@
|
|
ok krw@
|
|
to be in the right address space.
help from matthew and krw
|
|
delay and retry the original command rather than immediately erroring
out.
Fixes USB drives that spin themselves down due to inactivity, as
confirmed by pirofti@ and jsg@.
ok miod@, rough agreement pending more general solution dlg@.
|
|
way st(4) does. Have both decline to open read-only devices for
anything but read-only access.
Suggestion to fail opens rather than individual i/o's from deraadt@.
Problem USB device found and donated by chefren, who also tested
diffs. Thanks!
ok dlg@ marco@
|
|
geometry. it doesnt matter waht the value there is cos rigid will be NULL,
but this is clearer.
|
|
no point in keeping it around.
"i like this" thib@ (a while back); ok krw@ and oga@; reminder to
update the man page and tweaks jmc@
|
|
about the device rather than the contents of whichever disklabel
was read. Tweak whitespace in sd.c to make the code appearance
consistant.
|
|
to deactivate transactions we are currently doing.
ok dlg
|
|
need to calculate and save. Not used anywhere in tree.
|
|
512 == DEV_BSIZE units and variable-sized physical device 'sectors'.
I hope this reduces confusion a bit more. No change to .o files.
ok for intent miod@, with tweak.
|
|
a device thats now gone, or from being on the list of pending io when
the device is actually detached.
found and fix tested by jakemsr@
"go for it" jakemsr@
|
|
verifying that the resulting device is present on the disklist. This
avoids a race whereby the disk driver can be accessed as soon as the
softc has been allocated, but before the disk has completed
initialisation and has called disk_attach() (up until this point
dk_label is still a null pointer).
Cut cd(4), sd(4) and wd(4) across to disk_lookup(). All callers of
disk_attach() need to be tested and cut over in due course.
ok deraadt@ krw@
|
|
disk_attach() is called by the device driver. We will be building on
this shortly.
ok deraadt@ krw@
|
|
|
|
rather than it being a pointer to something that needs to be allocated
at attach. since all these devices need a bufq to operate, it makes
sense to have it allocated as part of the softc and get bufq_init
to just initialise all its fields. it also gets rid of the possibility
that you wont be able to allocate the bufq struct during attach,
which is something you dont want to happen.
secondly, it consistently implements a split between wrapper functions
and the per discipline implementation of the bufq handlers. it
consistently does the locking in the wrappers rather than doing
half in the wrappers and the other half in the implementations.
it also consistently handles the outstanding bufq bq pointer in the
wrappers.
this hides most of the implementation inside kern_bufq.c. the only
stuff left in buf.h is for the bits each implementation needs to
put inside struct buf.
tested by thib@ krw@ and me
ok thib@ matthew@
no objection from krw@
|
|
can expect to be used
|
|
ok miod@; "please go ahead" jsing@
|
|
breaks at least one previously working device, as discovered by
naddy@. dlg@ confirmed other kernels also avoid attempting this
operation on usb disks.
ok dlg@ deraadt@
|
|
wasn't ok deraadt & dlg.
|
|
Tested by lots of people during c2k10
ok phessler krw thib
|
|
click upon suspend that my laptop with ahci(4) has.
ok dlg@, ok marco@ on an earlier iteration of this diff
|
|
to interpret sense errors. This is initialized to the basic
interpretation routine, and specific scsi drivers (sd/st/cd) can
replace this with their own. While here kill EJUSTRETURN dance and
make more specialized interpretation routines directly call the
basic routine if desired.
Fixes by matthew@ to my first diff. Most original work by dlg@.
ok matthew@ marco@ dlg@
|
|
ok miod@, krw@
|
|
ok krw@, marco@
|
|
disk is now ready to handle I/O.
ok krw@ dlg@
|
|
SCSI_NOSLEEP flag on the xs when setting extra flags by oring them in
rather than assigning them.
from matthew dempsky
|
|
NULL'ness of the pointer to the actual page data. Fixes a NULL deref
when trying to set caching on my ASUS eeePC 1000HE's SD slot.
ok dlg@
|