| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
disk_attach() is called by the device driver. We will be building on
this shortly.
ok deraadt@ krw@
|
| |
|
|
|
|
| |
ok miod@; "please go ahead" jsing@
|
|
|
|
|
|
|
| |
identifier, allowing the disk to be identified without relying on the
device name.
ok deraadt@ krw@ beck@ marco@ todd@
|
|
|
|
|
|
| |
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
| |
|
|
|
|
|
|
| |
boot bsd.rd -a and want to mount the ramdisk later on.
ok otto@ krw@ millert@
|
|
|
|
|
|
|
|
|
|
|
| |
RAW_PART will always be 0 -> disksize, so the bounds check will always
pass for i/o's to valid addresses. Now the i/o will be properly truncated
if it goes past the end of the device. This prevents various adverse
impacts of issuing i/o's for data past the end of the device.
Repeatedly requested by todd@.
ok weingart@ deraadt@
|
|
|
|
|
|
|
|
|
|
|
| |
'fakerootdev' hackery. This allows us to bring back miod@'s r1.70 subr_disk.c
change to avoid the GENERIC dance when rootdev has been initialized. This
in turn re-enables raidframe root devices.
Add a nice panic if rootdev can't be initialized, displaying the name of the
device that didn't work rather than just blowing up by de-referencing NULL.
ok deraadt@
|
|
|
|
| |
ok krw@ deraadt@ dlg@
|
|
|
|
| |
prompted and "much better" by marco@, ok pyr@
|
|
|
|
| |
ok pyr@ and krw@
|
|
|
|
| |
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
|
| |
|
|
|
|
|
|
| |
avoid unnecessary rdgetdisklabel() call.
requested by & ok deraadt@
|
| |
|
|
|
|
|
|
|
| |
type of all variables to daddr64_t. this includes the APIs for XXsize()
and XXdump(), all range checks inside bio drivers, internal variables
for disklabel handling, and even uvm's swap offsets. re-read numerous
times by otto, miod, krw, thib to look for errors
|
|
|
|
|
| |
to size. tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values
|
|
|
|
|
|
| |
readdisklabel(), since all readdisklabel()'s do that already.
ok deraadt@
|
|
|
|
|
|
| |
Suggestions from miod@, KNF nit from mk@
ok miod@ millert@
|
|
|
|
|
|
|
| |
not being used in the tree for anything obviously useful. Get it done
early so we can find if there are non-obvious uses out there.
ok deraadt@ beck@
|
|
|
|
|
|
|
| |
set d_secsize instead of 1 << DEV_BSHIFT. Just for textual consistency in
setting d_secsize.
No functional change.
|
|
|
|
|
|
|
|
|
|
| |
setting RAW_PART's p_size to d_secperunit * (d_secsize / DEV_BSIZE) is
a waste of a few ops. And p_size should be in sectors anyway.
Just set RAW_PART's p_size to d_secperunit to make usage consistant
across the tree.
Should be a no-op.
|
|
|
|
| |
saves roughly 512 bytes.
|
|
|
|
|
|
| |
friends compile again.
ok tdeval@.
|
|
|
|
|
|
| |
while there.
ok tdeval@ (long ago)
|
|
|
|
| |
necessary. No functional change.
|
| |
|
|
|
|
|
|
|
|
|
| |
(remember: d_[type|pack]name do not need terminating null).
Take the opportunity to introduce some paranoia and check the device
name lengths to make sure they fit, with appropriate errors if not.
ok tedu@ tdeval@
|
|
|
|
| |
ok deraadt@
|
| |
|
| |
|
|
|
|
| |
(Look ma, I might have broken the tree)
|
|
|
|
| |
different (and thus confusing) semantics.
|
| |
|
|
|
|
|
| |
This only worked before by luck. Fixes floppy panic in -current.
Thanks to krw@ for the DDB traceback, it helped ;-)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
implement an ioctl to get a spoofed label even for disks that have
a label on them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will require changes for each machine type.
changes to MAKEDEV, suggest treating rd like sd
---
sd*|vnd*|ccd*|rd*)
...
rd*) name=rd; blk=17; chr=17;;
---
Make certain that majors and minors are correct
conf.c
add a entry in cdevsw for rd (previously was only in bdev)
---
cdev_decl(rd);
...
struct cdevsw cdevsw[] = {
...
cdev_disk_init(NRD,rd), /* 17 ram disk driver*/
---
other changes to how rdconfig is called may be appropriate,
it must now be configured using the "raw" parition typically 'c'.
|
| |
|