OpenBSD CVS

CVS log for src/sys/dev/vnd.c


[BACK] Up to [local] / src / sys / dev

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.181 / (download) - annotate - [select for diffs], Sun May 14 18:34:02 2023 UTC (12 months, 4 weeks ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.180: +4 -2 lines
Diff to previous 1.180 (colored)

Improve emulation of a disktab entry (-t) by using the type
specified in the disktab entry (:dt:) when setting the default
disklabel's d_type. This will enable installboot(8) to know the
vnd device should be treated as a floppy disk.

Feedback & improved field packing from millert@

Revision 1.180 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:08 2023 UTC (15 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.179: +1 -4 lines
Diff to previous 1.179 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.179 / (download) - annotate - [select for diffs], Sun Oct 23 14:39:19 2022 UTC (19 months, 2 weeks ago) by krw
Branch: MAIN
Changes since 1.178: +1 -2 lines
Diff to previous 1.178 (colored)

bzero(disklabel) or memset(disklabel,0) should be enough for
anyone. No need to also set d_flags to 0.

Revision 1.178 / (download) - annotate - [select for diffs], Thu Sep 1 12:28:53 2022 UTC (21 months, 1 week ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.177: +3 -1 lines
Diff to previous 1.177 (colored)

the VNDIOCSET ioctl path handling bypassed the unveil, so root (or .operator)
could read a file outside the space.
ok semarie benno tb

Revision 1.177 / (download) - annotate - [select for diffs], Thu Dec 23 10:09:16 2021 UTC (2 years, 5 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.176: +2 -1 lines
Diff to previous 1.176 (colored)

Disk lock was held when returning to userland.  Add a missing unlock
in vnd ioctl error path.
Reported-by: syzbot+6dde3fda33074a256318@syzkaller.appspotmail.com
OK jsg@ anton@

Revision 1.176 / (download) - annotate - [select for diffs], Tue Dec 21 06:12:03 2021 UTC (2 years, 5 months ago) by anton
Branch: MAIN
Changes since 1.175: +13 -5 lines
Diff to previous 1.175 (colored)

Fix another vnd race pointed out by mpi@ and make sure to not unlock the
vnode twice in the error path.

Tested in snaps for a couple of days.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Dec 21 06:11:16 2021 UTC (2 years, 5 months ago) by anton
Branch: MAIN
Changes since 1.174: +5 -4 lines
Diff to previous 1.174 (colored)

Ensure that the disk has been initialized after acquiring the lock and
not before as we might end up sleeping while acquiring the lock,
introducing a potential race.

Tested in snaps for a couple of days.

ok mpi@

Reported-by: syzbot+c87cdc2905b441c20d39@syzkaller.appspotmail.com

Revision 1.174 / (download) - annotate - [select for diffs], Sun Nov 21 23:07:11 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored)

correct the vnd-on-vnd dev_t test, and avoid leaking a cred in an
obscure condition
ok tb

Revision 1.173 / (download) - annotate - [select for diffs], Thu Nov 18 16:57:59 2021 UTC (2 years, 6 months ago) by tb
Branch: MAIN
Changes since 1.172: +3 -1 lines
Diff to previous 1.172 (colored)

vndsetcred: don't a reference to credentials in error path.

ok deraadt

Revision 1.172 / (download) - annotate - [select for diffs], Sat Oct 9 14:47:02 2021 UTC (2 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.171: +70 -50 lines
Diff to previous 1.171 (colored)

placing the same vnd underneath a vnd (with VNDIOCSET) is a lock violation,
but other circumstances are also bad, so let's block all vnd on top of vnd.
While here, fix some toctou multiple-copyin of the path, and restructure
the ioctl defer all softc updates to the end.
ok mpi

Revision 1.171 / (download) - annotate - [select for diffs], Wed Nov 27 16:12:13 2019 UTC (4 years, 6 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.170: +6 -3 lines
Diff to previous 1.170 (colored)

Re-enable IO_NOCACHE, and use is in vnd.

Ensure that io to a file backing a vnd is IO_SYNC, so IO to a
vnd device is both synchronous and not cached in the buffer cache.

This allows the "mount" regress to work repeatably, and avoids
a situation where when the buffer cache cleaner runs to clear
dirty buffers while people are waiting, it actually increases the
dirty buffers when the writes to the underlying vnd are also
delayed.

ok bluhm@

Revision 1.170 / (download) - annotate - [select for diffs], Sun Nov 3 03:20:15 2019 UTC (4 years, 7 months ago) by beck
Branch: MAIN
Changes since 1.169: +2 -1 lines
Diff to previous 1.169 (colored)

Correctly re-initialize the nameinfo struct that is re-used for
vn_open when vnconfig'ing from a read-only filesystem. This bug has
been with us for a long time and was spotted by Kawamata Yoshihiro
<kaw@on.rim.or.jp> after recent changes making vn_open more
picky about the structure it is called with.

Revision 1.169 / (download) - annotate - [select for diffs], Sun Oct 6 16:24:14 2019 UTC (4 years, 8 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.168: +2 -2 lines
Diff to previous 1.168 (colored)

Fix vn_open to require an op of 0, and 0 or KERNELPATH only as flags.

sweep tree to correct NDIINT op and flags ahead of time. document
the requirement. This allows KERNELPATH to be used to bypass
unveil for crash dumps with nosuidcoredump=2 or 3

ok visa@ deraadt@ florian@

Revision 1.168 / (download) - annotate - [select for diffs], Sat Apr 28 03:13:04 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.

OK mpi@, deraadt@

Revision 1.167 / (download) - annotate - [select for diffs], Mon Feb 19 08:59:52 2018 UTC (6 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.166: +2 -2 lines
Diff to previous 1.166 (colored)

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@

Revision 1.166 / (download) - annotate - [select for diffs], Sat Dec 30 23:08:29 2017 UTC (6 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.165: +2 -2 lines
Diff to previous 1.165 (colored)

Don't pull in <sys/file.h> just to get fcntl.h

ok deraadt@ krw@

Revision 1.165 / (download) - annotate - [select for diffs], Wed Jul 19 14:54:29 2017 UTC (6 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.164: +3 -2 lines
Diff to previous 1.164 (colored)

Avoid additional div0 in case both ntracks & nsectors passed in
via ioctl are 0.
Noticed by bluhm
ok bluhm millert

Revision 1.164 / (download) - annotate - [select for diffs], Wed Jul 19 13:38:05 2017 UTC (6 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.163: +2 -1 lines
Diff to previous 1.163 (colored)

Avoid division by zero of vnd_secsize
Found by Ilja Van Sprundel
ok claudio kettenis

Revision 1.163 / (download) - annotate - [select for diffs], Sat Jan 21 05:42:04 2017 UTC (7 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

p_comm is the process's command and isn't per thread, so move it from
struct proc to struct process.

ok deraadt@ kettenis@

Revision 1.162 / (download) - annotate - [select for diffs], Wed Dec 14 18:59:12 2016 UTC (7 years, 5 months ago) by jca
Branch: MAIN
Changes since 1.161: +1 -31 lines
Diff to previous 1.161 (colored)

Kill compat for old VNDIOCSET; ok deraadt@

Revision 1.161 / (download) - annotate - [select for diffs], Sat Nov 12 11:16:59 2016 UTC (7 years, 6 months ago) by jca
Branch: MAIN
Changes since 1.160: +3 -3 lines
Diff to previous 1.160 (colored)

Revert unrelated bits that snuck in previous.

Revision 1.160 / (download) - annotate - [select for diffs], Sat Nov 12 10:59:37 2016 UTC (7 years, 6 months ago) by jca
Branch: MAIN
Changes since 1.159: +33 -3 lines
Diff to previous 1.159 (colored)

Bump VNDNLEN from 90 to 1024 bytes, to avoid "VNDIOCSET: File name too long"

Introduce a new ioctl for VNDIOCSET, the old ioctl will stay around for
a bit to cope with old vnconfig/mount_vnd.

ok deraadt@

Revision 1.159 / (download) - annotate - [select for diffs], Sat Oct 8 05:52:06 2016 UTC (7 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.158: +4 -4 lines
Diff to previous 1.158 (colored)

Various printf claim to report the PID, so actually report that and not the TID

ok kettenis@ tedu@

Revision 1.158 / (download) - annotate - [select for diffs], Sat Mar 19 12:04:15 2016 UTC (8 years, 2 months ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored)

Remove the unused flags argument from VOP_UNLOCK().

torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt

Revision 1.157 / (download) - annotate - [select for diffs], Wed Aug 26 22:36:18 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.156: +2 -2 lines
Diff to previous 1.156 (colored)

Simple size for free().  These are a pleasure to convert when the
allocation is clearly spelled out as ptr = malloc(sizeof(*ptr), ...)

Revision 1.156 / (download) - annotate - [select for diffs], Tue Aug 25 07:01:24 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.155: +3 -3 lines
Diff to previous 1.155 (colored)

obvious sizes for free()

Revision 1.155 / (download) - annotate - [select for diffs], Sat Dec 13 21:05:32 2014 UTC (9 years, 5 months ago) by doug
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.154: +3 -4 lines
Diff to previous 1.154 (colored)

yet more mallocarray() changes.

ok tedu@ deraadt@

Revision 1.154 / (download) - annotate - [select for diffs], Fri Oct 17 02:05:06 2014 UTC (9 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.153: +5 -5 lines
Diff to previous 1.153 (colored)

convert old b functions to mem functions

Revision 1.153 / (download) - annotate - [select for diffs], Sat Jul 12 18:48:51 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.152: +4 -4 lines
Diff to previous 1.152 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Nov 12 14:11:07 2013 UTC (10 years, 7 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.151: +4 -4 lines
Diff to previous 1.151 (colored)

Use %llu+DL_GETPSIZE() to show partition size. Replace %li+(long) with
%u for u_int32_t d_secsize.

Revision 1.151 / (download) - annotate - [select for diffs], Fri Nov 1 17:36:19 2013 UTC (10 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.150: +3 -2 lines
Diff to previous 1.150 (colored)

Sprinkle (long long) casts where %lld is being used to print daddr_t
variables. Some random whitespace/knf repairs encountered on the way.

ok miod@ on inspection, feedback & more suggestions from millert@

Revision 1.150 / (download) - annotate - [select for diffs], Tue Jun 11 16:42:14 2013 UTC (11 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.149: +5 -5 lines
Diff to previous 1.149 (colored)

final removal of daddr64_t.  daddr_t has been 64 bit for a long enough
test period; i think 3 years ago the last bugs fell out.
ok otto beck others

Revision 1.149 / (download) - annotate - [select for diffs], Fri Aug 26 04:36:42 2011 UTC (12 years, 9 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.148: +10 -1 lines
Diff to previous 1.148 (colored)

Add a dmesg warning about sloppy disk I/O to vnd(4) devices to help
identify bad distrib scripts/tools.

ok deraadt@

Revision 1.148 / (download) - annotate - [select for diffs], Mon Jul 18 02:49:20 2011 UTC (12 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.147: +29 -3 lines
Diff to previous 1.147 (colored)

Revert vnd(4) to its older less strict behavior.

Verified by deraadt@ to fix distrib/sgi/iso.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Jul 12 22:51:21 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.146: +9 -2 lines
Diff to previous 1.146 (colored)

Range check vnd_secsize, vnd_ntracks, and vnd_nsectors so that later on
they do not get integer truncated on 64-bit machines.
ok matthew

Revision 1.146 / (download) - annotate - [select for diffs], Fri Jul 8 20:10:34 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.145: +2 -2 lines
Diff to previous 1.145 (colored)

Ack, my last change used size_t for file offsets, but size_t is only
32-bit on 32-bit architectures; we need off_t to support >4GB vnd(4)
images.

Discovered by, tested, and ok bluhm@

Revision 1.145 / (download) - annotate - [select for diffs], Fri Jul 8 05:27:46 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.144: +30 -57 lines
Diff to previous 1.144 (colored)

Refactor vnd(4) to use vn_rdwr() instead of setting up the uio/iovec
structs and calling vn_lock+VOP_READ/WRITE+VOP_UNLOCK.

Revision 1.144 / (download) - annotate - [select for diffs], Fri Jul 8 05:11:21 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.143: +15 -31 lines
Diff to previous 1.143 (colored)

Validate DISKUNIT(dev) in vndstrategy() like we do in other
xxstrategy() methods, and punt in validating it in vndread() and
vndwrite() (also like we do in other xx{read,write}() methods...).

Revision 1.143 / (download) - annotate - [select for diffs], Fri Jul 8 05:07:05 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.142: +11 -7 lines
Diff to previous 1.142 (colored)

Add a vndencryptbuf() function, and refactor vndstrategy() slightly to
use it instead.

Revision 1.142 / (download) - annotate - [select for diffs], Wed Jul 6 17:28:00 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.141: +3 -8 lines
Diff to previous 1.141 (colored)

vndsize() can just return -1; we don't support swapping to vnd
anymore.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Jul 6 17:26:33 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.140: +4 -4 lines
Diff to previous 1.140 (colored)

Compact the vnd sc_flags bits.

ok krw@

Revision 1.140 / (download) - annotate - [select for diffs], Wed Jul 6 05:12:46 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.139: +3 -26 lines
Diff to previous 1.139 (colored)

Eliminate some sanity checks in vndstrategy() that are now handled by
bounds_check_with_label().

Revision 1.139 / (download) - annotate - [select for diffs], Wed Jul 6 05:09:01 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.138: +15 -20 lines
Diff to previous 1.138 (colored)

vndstrategy() should fail if VNF_HAVELABEL isn't set.  This simplifies
the logic slightly and makes vnd(4) more like any other disk driver.

To avoid races, this means vndopen() can only set VNF_HAVELABEL if
dk_openmask == 0.  Otherwise, it's possible for userspace to open
rvnd0c, call VNDIOCSET, open vnd0a, then while vndreaddisklabel() (via
vndstrategy) is waiting for VOP_READ() to finish, you could issue a
read or write on the still open rvnd0c and have VNF_HAVELABEL set but
the disklabel might be in a weird state.

Note that this makes VNF_HAVELABEL nicely analogous to sd(4)/cd(4)'s
SDEV_MEDIA_LOADED flag, which is handled similarly in
{sd,cd}{open,close,strategy}.

ok dlg@, krw@, deraadt@

Revision 1.138 / (download) - annotate - [select for diffs], Wed Jul 6 04:49:36 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.137: +2 -2 lines
Diff to previous 1.137 (colored)

Eliminate redundant buf validation checks in xxstrategy() methods now
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@

Revision 1.137 / (download) - annotate - [select for diffs], Mon Jul 4 20:35:34 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.136: +2 -3 lines
Diff to previous 1.136 (colored)

move the specfs code to a place people can see it; ok guenther thib krw

Revision 1.136 / (download) - annotate - [select for diffs], Sun Jul 3 18:08:14 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.135: +11 -22 lines
Diff to previous 1.135 (colored)

Cleanup vnd(4) a bit now that it only has one mode of operation and
uses standard disk device numbering.

ok deraadt@

Revision 1.135 / (download) - annotate - [select for diffs], Sun Jul 3 17:42:42 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.134: +2 -2 lines
Diff to previous 1.134 (colored)

Fix vnd(4) support for read-only files.  We can't clear sc_flags
before closing the vnode, because VNDRW() checks for the VNF_READONLY
bit and the vnode layer doesn't like it when you close a read-only
vnode with FREAD|FWRITE.

ok deraadt@

Revision 1.134 / (download) - annotate - [select for diffs], Thu Jun 30 16:28:05 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.133: +5 -36 lines
Diff to previous 1.133 (colored)

Refactor some common open/close/detach disk driver code into
subr_disk.c.  For now just the MI disk drivers.

ok deraadt@, krw@; jsing@ liked the approach too

Revision 1.133 / (download) - annotate - [select for diffs], Tue Jun 21 01:47:15 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.132: +18 -20 lines
Diff to previous 1.132 (colored)

looks like the disk_lock method actually does work

Revision 1.132 / (download) - annotate - [select for diffs], Mon Jun 20 22:14:17 2011 UTC (12 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

explicit_bzero for the crypto key

Revision 1.131 / (download) - annotate - [select for diffs], Mon Jun 20 16:46:06 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.130: +20 -18 lines
Diff to previous 1.130 (colored)

for now, move back to a private rw_lock rather than the disk_lock.
we have problems with instantiating new disks
ok matthew

Revision 1.130 / (download) - annotate - [select for diffs], Sun Jun 19 04:55:33 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.129: +3 -4 lines
Diff to previous 1.129 (colored)

Use disk_lock_nointr() in the xxclose() routines so that they cannot
be interrupted.
ok matthew

Revision 1.129 / (download) - annotate - [select for diffs], Sun Jun 19 04:35:03 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.128: +18 -23 lines
Diff to previous 1.128 (colored)

Use disk_lock/disk_unlock directly and in the same way in these drivers,
rather than using various wrappings.  Convert vnd to using the sc_dk
rwlock instead of using one of its own.
ok matthew

Revision 1.128 / (download) - annotate - [select for diffs], Sun Jun 19 04:29:41 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.127: +2 -2 lines
Diff to previous 1.127 (colored)

and in debug code, too

Revision 1.127 / (download) - annotate - [select for diffs], Sun Jun 19 04:28:46 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.126: +108 -108 lines
Diff to previous 1.126 (colored)

stop trying to be clever with the softc name

Revision 1.126 / (download) - annotate - [select for diffs], Thu Jun 9 05:41:18 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.125: +7 -19 lines
Diff to previous 1.125 (colored)

shorted code with a lovely goto
ok matthew

Revision 1.125 / (download) - annotate - [select for diffs], Sun Jun 5 18:40:33 2011 UTC (13 years ago) by matthew
Branch: MAIN
Changes since 1.124: +1 -14 lines
Diff to previous 1.124 (colored)

Drop kernel support for the useless DIOCWLABEL ioctl and prune a lot
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.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Jun 3 21:14:11 2011 UTC (13 years ago) by matthew
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

Get rid of the wlabel argument to bounds_check_with_label().  It's
never done anything in OpenBSD and just clutters disk drivers with
silly flag handling.

More cleanup to follow.

ok deraadt@, millert@; no objections krw@

Revision 1.123 / (download) - annotate - [select for diffs], Thu Jun 2 19:18:21 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.122: +1 -2 lines
Diff to previous 1.122 (colored)

No need to set error to 0, when it is still 0 from the start of the function.
ok thib matthew

Revision 1.122 / (download) - annotate - [select for diffs], Thu Jun 2 19:17:24 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.121: +1 -13 lines
Diff to previous 1.121 (colored)

The vndbufpl is no longer used.
Spotted by matthew, verified by me.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Jun 2 19:16:28 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.120: +9 -24 lines
Diff to previous 1.120 (colored)

Initialize the dv_xname at attach time, so that we don't have to do
this work later.  Since the disk always has the same name (the different
between svnd and vnd went away), we don't need to do this late anymore.
Spotted with matthew.

Revision 1.120 / (download) - annotate - [select for diffs], Thu Jun 2 19:12:02 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.119: +2 -2 lines
Diff to previous 1.119 (colored)

In vndclear(), clear all the flag bits.  Leaving around a VNF_WLABEL bit
is stupid (verified to be the case).  Other flag bits might have lived
longer than they should as well, with unknown consequences.
Spotted with matthew, too.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Jun 2 19:10:19 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.118: +2 -1 lines
Diff to previous 1.118 (colored)

Initialize the dv_unit, because disk_attach will want it later.  Before
we were probably only ever reading labels off vnd0.  Oops.
Spotted by matthew

Revision 1.118 / (download) - annotate - [select for diffs], Thu Jun 2 19:09:29 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.117: +3 -7 lines
Diff to previous 1.117 (colored)

Do not bzero the softc when doing VNDIOCCLR, because that trashes the
rw_lock and the device_ref
Discussed with thib and matthew

Revision 1.117 / (download) - annotate - [select for diffs], Thu Jun 2 16:14:40 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.116: +2 -1 lines
Diff to previous 1.116 (colored)

device_ref() by hand, since this is a pseudo-device and was not attached
through config_attach()
ok matthew jsing

Revision 1.116 / (download) - annotate - [select for diffs], Tue May 31 17:35:35 2011 UTC (13 years ago) by matthew
Branch: MAIN
Changes since 1.115: +2 -2 lines
Diff to previous 1.115 (colored)

Change a few of the more common disk drivers (sd, cd, wd, rd, and vnd)
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@

Revision 1.115 / (download) - annotate - [select for diffs], Mon May 30 21:15:03 2011 UTC (13 years ago) by oga
Branch: MAIN
Changes since 1.114: +1 -12 lines
Diff to previous 1.114 (colored)

Remove vndshutdown. It is unused.


``sure'' deraadt@

Revision 1.114 / (download) - annotate - [select for diffs], Mon Apr 25 19:29:11 2011 UTC (13 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.113: +2 -6 lines
Diff to previous 1.113 (colored)

Remove backwards compatibility for svnd.  All new operations must use the
vnd devices nodes, which impliment svnd functionality -- that being the only
thing which vnd now supports.  Confused?  Don't worry, it is documented.
ok krw thib

Revision 1.113 / (download) - annotate - [select for diffs], Sat Apr 23 22:00:09 2011 UTC (13 years, 1 month ago) by miod
Branch: MAIN
Changes since 1.112: +1 -40 lines
Diff to previous 1.112 (colored)

Remove now unused vndiodone(). ok deraadt@

Revision 1.112 / (download) - annotate - [select for diffs], Sat Apr 23 17:01:04 2011 UTC (13 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.111: +1 -8 lines
Diff to previous 1.111 (colored)

The previous code only prevented the vnd from being opened for write in
both simple and non-simple mode. Restore this behaviour by removing the
openmask check.

Revision 1.111 / (download) - annotate - [select for diffs], Sat Apr 23 14:57:01 2011 UTC (13 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.110: +3 -5 lines
Diff to previous 1.110 (colored)

backout the miod change since it is wrong

Revision 1.110 / (download) - annotate - [select for diffs], Fri Apr 22 21:28:56 2011 UTC (13 years, 1 month ago) by miod
Branch: MAIN
Changes since 1.109: +6 -4 lines
Diff to previous 1.109 (colored)

Fix regression in vndopen() behaviour introduced in previous commit.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Apr 18 16:50:22 2011 UTC (13 years, 1 month ago) by thib
Branch: MAIN
Changes since 1.108: +51 -228 lines
Diff to previous 1.108 (colored)

remove the old style by-pass-the-buffer-cache vnd code.
this will treat vndX the same as svndX.

ok and gcc2 fixes from deraadt@

Revision 1.108 / (download) - annotate - [select for diffs], Sat Apr 2 15:24:03 2011 UTC (13 years, 2 months ago) by thib
Branch: MAIN
Changes since 1.107: +44 -87 lines
Diff to previous 1.107 (colored)

Remove bufqs from vnds, as the disk that houses the image
backing the vnd also has a bufq. So the buf is just passed
between the vnd bufq and the disk bufq (almost immediately).

Also see previous revision for more insight.

OK deraadt@, dlg@

Revision 1.107 / (download) - annotate - [select for diffs], Tue Feb 15 20:02:11 2011 UTC (13 years, 3 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.106: +7 -1 lines
Diff to previous 1.106 (colored)

A vnd buf doesn't only go through the vnd bufq but also the bufq
for the device on which the vnd image resides on, this has the
effect that a bufq_done call is done in the context of the
underlaying bufq, setting b_bq to NULL, meaning there is never
a bufq_done call done for the vnd bufq so the outstanding count
never decreses.

Add one in vndiodone. This fixes the suspsend issues krw@ was
running into.

ok tedu@, krw@
nod from miod@ on the commit.

Revision 1.106 / (download) - annotate - [select for diffs], Thu Jan 6 17:32:42 2011 UTC (13 years, 5 months ago) by thib
Branch: MAIN
Changes since 1.105: +3 -2 lines
Diff to previous 1.105 (colored)

init and destory the bufq in the ioctl handler, as
the softc is zero'ed when the vnd is unconfigured;
otherwise we blow up when configuring a vnd the second
time since the bufq structure is kaputt.

found by and OK krw@

Revision 1.105 / (download) - annotate - [select for diffs], Wed Jan 5 15:35:43 2011 UTC (13 years, 5 months ago) by thib
Branch: MAIN
Changes since 1.104: +15 -22 lines
Diff to previous 1.104 (colored)

cut vnd over to using bufq's again.

OK dlg@, beck@, krw@.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Dec 22 13:12:14 2010 UTC (13 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.103: +13 -1 lines
Diff to previous 1.103 (colored)

When configuring a vnd(4) disk, populate the disk name based on the mode
in which it was configured. If this is a "safe" vnd disk the name should
be "svndX" whereas a standard vnd disk should be named "vndX".

ok deraadt@ todd@ thib@

Revision 1.103 / (download) - annotate - [select for diffs], Wed Sep 22 01:18:57 2010 UTC (13 years, 8 months ago) by matthew
Branch: MAIN
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored)

All users of physio(9) now pass NULL as the buf pointer argument, so
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@

Revision 1.102 / (download) - annotate - [select for diffs], Wed Sep 8 14:47:12 2010 UTC (13 years, 9 months ago) by jsing
Branch: MAIN
Changes since 1.101: +1 -1 lines
Diff to previous 1.101 (colored)

Store a struct device pointer within struct disk and populate this when
disk_attach() is called by the device driver. We will be building on
this shortly.

ok deraadt@ krw@

Revision 1.101 / (download) - annotate - [select for diffs], Sat Aug 28 20:23:22 2010 UTC (13 years, 9 months ago) by matthew
Branch: MAIN
Changes since 1.100: +1 -4 lines
Diff to previous 1.100 (colored)

Garbage collect struct dkdriver.

ok miod@; "please go ahead" jsing@

Revision 1.100 / (download) - annotate - [select for diffs], Thu Jul 22 14:34:06 2010 UTC (13 years, 10 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.99: +15 -10 lines
Diff to previous 1.99 (colored)

Instead of trying to biowait on a buf that has errored, do the
right thing, throw it away by marking it as B_INVAL and setting
the B_ERROR flag and b_error to the errno that was returned.

B_RAW doesn't matter there.

Issue report my mlarkin@, this diff tested and confirmed to
fix the issue by mlarkin also, thanks!

OK krw@, beck@, deraadt@

Revision 1.99 / (download) - annotate - [select for diffs], Thu Jul 1 17:48:33 2010 UTC (13 years, 11 months ago) by thib
Branch: MAIN
Changes since 1.98: +1 -2 lines
Diff to previous 1.98 (colored)

leases have expired. (remove a comment).

Revision 1.98 / (download) - annotate - [select for diffs], Thu Jul 1 16:22:17 2010 UTC (13 years, 11 months ago) by thib
Branch: MAIN
Changes since 1.97: +2 -1 lines
Diff to previous 1.97 (colored)

for the allocated buf, set the b_bq flag to NULL so we do not
call bufq_done in biodone.

Revision 1.97 / (download) - annotate - [select for diffs], Tue May 18 04:41:14 2010 UTC (14 years ago) by dlg
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96 (colored)

dont let sys/ioctl.h imply that you get the ioctls in dkio.h. this
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include
<sys/dkio.h> to the places that actually want and use the disk
ioctls.

this became an issue when krw@'s X build failed when he was testing
a change to dkio.h.
tested by krw@
help from and ok miod@

Revision 1.96 / (download) - annotate - [select for diffs], Fri Apr 23 15:25:21 2010 UTC (14 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.95: +0 -2 lines
Diff to previous 1.95 (colored)

Recycle unused disklabel fields in order to create a disklabel unique
identifier, allowing the disk to be identified without relying on the
device name.

ok deraadt@ krw@ beck@ marco@ todd@

Revision 1.95 / (download) - annotate - [select for diffs], Mon Aug 24 08:51:18 2009 UTC (14 years, 9 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.94: +4 -4 lines
Diff to previous 1.94 (colored)

- fix format strings for values that are daddr64_t

ok otto@, agreed by deraadt@

Revision 1.94 / (download) - annotate - [select for diffs], Thu Aug 13 15:23:11 2009 UTC (14 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.93: +4 -11 lines
Diff to previous 1.93 (colored)

Replace the error strings that were being passed around with much simpler
errnos.  Note that the error strings are being ignored, since we long ago
decided to not spam the console, and there is no other nice way to use the
errors (without changing the ioctls to pass it back)
The errno is now useful, since we can pass b_error from failing IO up, and
the drive can decide how to use that
ok miod

Revision 1.93 / (download) - annotate - [select for diffs], Wed Jun 17 01:30:30 2009 UTC (14 years, 11 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.92: +14 -14 lines
Diff to previous 1.92 (colored)

Revert bufq's. this is inline with the major midlayer reverts that
have been going on. this appears to bring us back to stable state.

lots of testing by oga and ariane and my self.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Jun 4 05:57:27 2009 UTC (15 years ago) by krw
Branch: MAIN
Changes since 1.91: +11 -1 lines
Diff to previous 1.91 (colored)

Add DIOCRLDINFO to those drivers previously deprived.

Noticed by & ok deraadt@

Revision 1.91 / (download) - annotate - [select for diffs], Wed Jun 3 22:09:30 2009 UTC (15 years ago) by thib
Branch: MAIN
Changes since 1.90: +13 -13 lines
Diff to previous 1.90 (colored)

add a flexible buffer queue (bufq) api, based on the never used
one by tedu@. It doesn't do anything smart yet, it just uses
plain old disksort. we also keep the old method of queueing bufs
since some miods have crazy MD drivers that need some love.

ok beck@, art@
tested by many on many archs.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Sep 3 23:24:25 2008 UTC (15 years, 9 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.89: +11 -12 lines
Diff to previous 1.89 (colored)

Replace -s (sector size) option with more general -t (disktype)
option which makes the vnd device emulate the geometry of the
specified disktab(5) entry. No change in behaviour or geometry
unless -t is used.

API for vnd configuration ioctl (VNDIOCSET) changes, so mount_vnd
must be in sync with kernel.

Tested & ok jsing@ 'Lovely' deraadt@

Revision 1.89 / (download) - annotate - [select for diffs], Thu Aug 14 17:10:29 2008 UTC (15 years, 10 months ago) by jsing
Branch: MAIN
Changes since 1.88: +36 -15 lines
Diff to previous 1.88 (colored)

Allow the sector size to be specified by the user when configuring a
vnd(4) device, via a new -s option to vnconfig/mount_vnd. This allows us
to create disklabels and file systems that are suitable for use on
devices that have a non-512 byte sector size (eg. CDROMs).

With help from krw@ and feedback from pedro@.

ok krw@, pedro@

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jul 23 16:24:43 2008 UTC (15 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.87: +3 -1 lines
Diff to previous 1.87 (colored)


Correct cases of mishandling of pending reads and writes to prevent
them going negative - this consists of identifying a number of cases of
IO not going through the buffer cache and marking those buffers with
B_RAW - as well as fixing nfs_bio to show pending writes and reads through
the buffer cache via NFS

still has a problem with mishandling the counters I believe in the
async/sync fallback case where counters stay positive which will be
addressed seperately.

ok tedu@ deraadt@

Revision 1.87 / (download) - annotate - [select for diffs], Sun Jul 20 01:53:43 2008 UTC (15 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.86: +7 -1 lines
Diff to previous 1.86 (colored)

Add DIOCGPDINFO support. 'disklabel -d svnd0' now works.

Revision 1.86 / (download) - annotate - [select for diffs], Sun Jun 29 20:05:22 2008 UTC (15 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Use DEV_BSIZE (defined as 512) instead of 512 when initializing the
disklabel's d_secsize.

ok millert@ marco@

Revision 1.85 / (download) - annotate - [select for diffs], Mon Mar 24 01:16:58 2008 UTC (16 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.84: +6 -6 lines
Diff to previous 1.84 (colored)

Change XXgetdisklabel() to the 'normal' four parameter model to
prepare for adding missing DIOC* ioctl's.

No functional change.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Oct 15 01:37:49 2007 UTC (16 years, 8 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

more remove unneeded declarations that shadows existing vars; ok by many.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Sep 29 07:08:02 2007 UTC (16 years, 8 months ago) by fkr
Branch: MAIN
Changes since 1.82: +53 -6 lines
Diff to previous 1.82 (colored)

make safe vnds work on block devices.
from Piotr Durlej, tested by henning@, krw@, thib@ and myself
ok thib@, grunk@, krw@

Revision 1.82 / (download) - annotate - [select for diffs], Wed Sep 12 18:45:14 2007 UTC (16 years, 9 months ago) by mk
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

There is no such word as `detatch'.

ok mglocker

Revision 1.81 / (download) - annotate - [select for diffs], Tue Sep 11 13:39:33 2007 UTC (16 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

KNF

prompted and "much better" by marco@, ok pyr@

Revision 1.80 / (download) - annotate - [select for diffs], Sat Sep 8 17:59:23 2007 UTC (16 years, 9 months ago) by gilles
Branch: MAIN
Changes since 1.79: +2 -3 lines
Diff to previous 1.79 (colored)

more M_ZERO changes

ok pyr@ and krw@

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jun 20 18:15:46 2007 UTC (16 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.78: +5 -10 lines
Diff to previous 1.78 (colored)

b_cylinder does not need to be set on the callpath down into drivers.
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod

Revision 1.78 / (download) - annotate - [select for diffs], Fri Jun 8 05:27:58 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.77: +2 -1 lines
Diff to previous 1.77 (colored)

all drivers should spoof version 1 labels

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jun 6 17:15:13 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.76: +6 -6 lines
Diff to previous 1.76 (colored)

now that all partition size/offsets are potentially 64-bit, change the
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

Revision 1.76 / (download) - annotate - [select for diffs], Tue Jun 5 00:38:20 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.75: +4 -4 lines
Diff to previous 1.75 (colored)

use six new macros to access & store the 48-bit disklabel fields related
to size.  tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jun 1 00:07:48 2007 UTC (17 years ago) by krw
Branch: MAIN
Changes since 1.74: +1 -6 lines
Diff to previous 1.74 (colored)

Don't initialize d_partitions[RAW_DISK] just before calling
readdisklabel(), since all readdisklabel()'s do that already.

ok deraadt@

Revision 1.74 / (download) - annotate - [select for diffs], Sat May 12 12:19:23 2007 UTC (17 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

Use VNDLABELDEV() and not DISKLABELDEV() in writedisklabel() since
VNDLABELDEV() is used in readdisklabel(). VNDLABELDEV() preserves the
vndsimple() property encoded in the device.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Apr 29 18:59:37 2007 UTC (17 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.72: +2 -3 lines
Diff to previous 1.72 (colored)

Replace expansions of DISKLABELDEV() with DISKLABELDEV(). Shorter, and
more consistant. No change to code.

ok miod@

Revision 1.72 / (download) - annotate - [select for diffs], Sun Mar 25 21:52:27 2007 UTC (17 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

include rwlock.h ourselves, better than depending on it getting picked
up elsewhere

Revision 1.71 / (download) - annotate - [select for diffs], Sun Mar 25 18:02:37 2007 UTC (17 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.70: +8 -39 lines
Diff to previous 1.70 (colored)

use a rwlock instead of the homegrown approach
ok art pedro thib

Revision 1.70 / (download) - annotate - [select for diffs], Mon Feb 26 11:25:23 2007 UTC (17 years, 3 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.69: +7 -3 lines
Diff to previous 1.69 (colored)

Don't enforce RLIMIT_FSIZE on vnd(4) I/O operations, okay deraadt@

Revision 1.69 / (download) - annotate - [select for diffs], Wed Feb 21 19:25:40 2007 UTC (17 years, 3 months ago) by grunk
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

Don't use arbitrary 128 bytes as size of the blf key array if we know exactly
how much blowfish takes at max, which is 72 bytes.
Also define a constant for this in the include file, suggested by ray@.

ok pedro@ thib@ tedu@

Revision 1.68 / (download) - annotate - [select for diffs], Thu Feb 1 01:02:05 2007 UTC (17 years, 4 months ago) by pedro
Branch: MAIN
Changes since 1.67: +5 -53 lines
Diff to previous 1.67 (colored)

Don't throttle and serialize I/O operations, okay miod@ krw@
Fixes kern/5347

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jan 13 16:47:15 2007 UTC (17 years, 5 months ago) by thib
Branch: MAIN
Changes since 1.66: +46 -79 lines
Diff to previous 1.66 (colored)

Touch of clean up:
s/DEBUG/VNDDEBUG/ and introduce DNPRINTF, fold
all the #ifdef DEBUG <stuff> #endif into DNPRINTFs.
Use DTYPE_VND for the disklabel d_type member, dont
calcluate d_secpercyl from d_ntrack * d_nsectors, just
set it too 100 directly since we set d_ntrack and
d_nsectors to 1 and 100 respectivly.

testing and OK krw@

Revision 1.66 / (download) - annotate - [select for diffs], Sun Dec 24 09:39:27 2006 UTC (17 years, 5 months ago) by pedro
Branch: MAIN
Changes since 1.65: +24 -63 lines
Diff to previous 1.65 (colored)

ansify, no binary change, from Bret Lambert

Revision 1.65 / (download) - annotate - [select for diffs], Thu Oct 5 18:29:26 2006 UTC (17 years, 8 months ago) by thib
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

Always allow read-only opens on (s)vnd devices, despite the
type of the first open (svnd vs vnd).

ok pedro@

Revision 1.64 / (download) - annotate - [select for diffs], Tue Oct 3 19:49:06 2006 UTC (17 years, 8 months ago) by pedro
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

Introduce daddr64_t and use it for physical block numbers
Okay weingart@, "I'm game with putting my name on it" dlg@

Revision 1.63 / (download) - annotate - [select for diffs], Wed Sep 20 13:51:19 2006 UTC (17 years, 8 months ago) by pedro
Branch: MAIN
Changes since 1.62: +24 -10 lines
Diff to previous 1.62 (colored)

Make vnd(4) work on read-only file systems, from Paul Stoeber, okay tedu@

Revision 1.62 / (download) - annotate - [select for diffs], Sun Aug 13 17:55:07 2006 UTC (17 years, 10 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.61: +6 -1 lines
Diff to previous 1.61 (colored)

fix a panic when trying to fdisk vnd devices (not svnd) wich
are back by weird images (such as the ones qemu creates).

proplem found the hard way by msf@

ok mickey@, pedro@

Revision 1.61 / (download) - annotate - [select for diffs], Sat Aug 12 13:53:44 2006 UTC (17 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.60: +2 -3 lines
Diff to previous 1.60 (colored)

Setting d_secsize to DEV_BSIZE (or 1 << DEV_BSHIFT, or 512) and then
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.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Mar 15 20:20:41 2006 UTC (18 years, 3 months ago) by miod
Branch: MAIN
Changes since 1.59: +1 -2 lines
Diff to previous 1.59 (colored)

Nuke dk_establish(), no longer used.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Mar 4 22:53:32 2006 UTC (18 years, 3 months ago) by pedro
Branch: MAIN
Changes since 1.58: +3 -1 lines
Diff to previous 1.58 (colored)

Disk interrupts can cause buffers to be returned to the vnd pool, so
splbio() is required when allocating. Fixes PR kern/5041, okay tedu@.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jan 22 00:40:02 2006 UTC (18 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.57: +2 -4 lines
Diff to previous 1.57 (colored)

b_cylin -> b_cylinder; no functional change.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Dec 29 20:02:03 2005 UTC (18 years, 5 months ago) by pedro
Branch: MAIN
Changes since 1.56: +19 -9 lines
Diff to previous 1.56 (colored)

Correctly bounds check transfers passed to vndstrategy()

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jul 20 02:36:13 2005 UTC (18 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

change sc_keyctx from void * to blf_ctx *.  there's no point for it to be
void and means we can't correctly use sizeof() on the target.
error report from frank denis in pr4290.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Apr 19 15:32:12 2005 UTC (19 years, 1 month ago) by mickey
Branch: MAIN
Changes since 1.54: +13 -5 lines
Diff to previous 1.54 (colored)

use pool for struct vndbug; tested by many and pedro@ ok

Revision 1.54 / (download) - annotate - [select for diffs], Tue Apr 12 13:25:37 2005 UTC (19 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.53: +2 -3 lines
Diff to previous 1.53 (colored)



simplify vndopen() a bit.

ok pedro@

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jan 5 06:38:15 2005 UTC (19 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.52: +3 -5 lines
Diff to previous 1.52 (colored)

copyoutstr doesn't work so well with the kernel addresses

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jun 30 11:33:39 2004 UTC (19 years, 11 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.51: +3 -4 lines
Diff to previous 1.51 (colored)

since we're not using 'len' for anything, nuke it and pass null to
copyin/copyout. suggested by millert@, ok'd by him and deraadt@

Revision 1.51 / (download) - annotate - [select for diffs], Wed Jun 30 00:13:53 2004 UTC (19 years, 11 months ago) by pedro
Branch: MAIN
Changes since 1.50: +4 -3 lines
Diff to previous 1.50 (colored)

don't strlcpy() to user-space, use copyoutstr() instead. ok deraadt@

Revision 1.50 / (download) - annotate - [select for diffs], Mon Jun 28 16:43:55 2004 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.49: +12 -6 lines
Diff to previous 1.49 (colored)

You *cannot* strlcpy from userland.  Pedro, go read this and find out what
you did wrong.  Bit in other changes that were backed out.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Jun 27 22:00:59 2004 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.48: +5 -5 lines
Diff to previous 1.48 (colored)

back out crud that breaks the macppc

Revision 1.48 / (download) - annotate - [select for diffs], Sun Jun 20 18:03:03 2004 UTC (19 years, 11 months ago) by pedro
Branch: MAIN
Changes since 1.47: +40 -8 lines
Diff to previous 1.47 (colored)

add the VNDIOCGET ioctl to vnode disks, ok millert@

Revision 1.47 / (download) - annotate - [select for diffs], Sat Jun 19 14:29:20 2004 UTC (19 years, 11 months ago) by pedro
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

save curproc for further reference, otherwise we may end up in lockmgr()
with no process context. ok miod@. closes pr 3214.

Revision 1.23.8.9 / (download) - annotate - [select for diffs], Sat Jun 5 23:12:36 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.23.8.8: +50 -50 lines
Diff to previous 1.23.8.8 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

Merge with the trunk

Revision 1.46 / (download) - annotate - [select for diffs], Sat May 22 18:26:52 2004 UTC (20 years ago) by otto
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.45: +4 -4 lines
Diff to previous 1.45 (colored)

Do not truncate intermediate results computing aiov.iov_len in vndsetcred();
print size_t as unsigned long long.
ok tedu@ miod@

Revision 1.45 / (download) - annotate - [select for diffs], Thu Mar 4 01:22:50 2004 UTC (20 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.44: +9 -8 lines
Diff to previous 1.44 (colored)

3 buglets.
if keylen < 0, bad things happen.
large keys are useless, limit size and use stack for temp storage
bzero of keyctx is unrelated to keylen, wipe whole thing.
ok markus tdeval

Revision 1.44 / (download) - annotate - [select for diffs], Wed Mar 3 22:03:23 2004 UTC (20 years, 3 months ago) by miod
Branch: MAIN
Changes since 1.43: +5 -3 lines
Diff to previous 1.43 (colored)

Make sure than svnd read their disklabel as svnd, not vnd devices.

ok tedu@

Revision 1.23.8.8 / (download) - annotate - [select for diffs], Thu Feb 19 10:56:13 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.23.8.7: +8 -4 lines
Diff to previous 1.23.8.7 (colored) to branchpoint 1.23 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.43 / (download) - annotate - [select for diffs], Sun Feb 15 02:52:10 2004 UTC (20 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.42: +32 -35 lines
Diff to previous 1.42 (colored)

knf

Revision 1.42 / (download) - annotate - [select for diffs], Sun Feb 15 02:45:46 2004 UTC (20 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.41: +11 -11 lines
Diff to previous 1.41 (colored)

new arg to disk_unbusy, to record separate read/write statistics.
looked at by various, testing henning@ mcbride@ dan weeks
mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>

Revision 1.41 / (download) - annotate - [select for diffs], Fri Oct 17 23:05:39 2003 UTC (20 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.40: +6 -2 lines
Diff to previous 1.40 (colored)

vndunit() wasn't quite right after last change, limiting vnds to 16.
apply fix from tom cosgrove to get the full range.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Oct 11 03:31:07 2003 UTC (20 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

bump minor gap for svnd devices, so more vnds are allowed.
this change REQUIRES running MAKEDEV again after booting with a new kernel.
with a hint from tom cosgrove.  ok deraadt@ millert@

Revision 1.39 / (download) - annotate - [select for diffs], Fri Aug 15 20:32:16 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

change arguments to suser.  suser now takes the process, and a flags
argument.  old cred only calls user suser_ucred.  this will allow future
work to more flexibly implement the idea of a root process.  looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@  testing and further review miod@

Revision 1.23.8.7 / (download) - annotate - [select for diffs], Sat Jun 7 11:02:28 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.23.8.6: +2 -6 lines
Diff to previous 1.23.8.6 (colored) to branchpoint 1.23 (colored)

Sync SMP branch to -current

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:01 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.37: +2 -6 lines
Diff to previous 1.37 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.30.2.2 / (download) - annotate - [select for diffs], Mon May 19 22:01:42 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.30.2.1: +12 -9 lines
Diff to previous 1.30.2.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

sync

Revision 1.23.8.6 / (download) - annotate - [select for diffs], Tue May 13 19:34:56 2003 UTC (21 years, 1 month ago) by ho
Branch: SMP
Changes since 1.23.8.5: +12 -6 lines
Diff to previous 1.23.8.5 (colored) to branchpoint 1.23 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Apr 19 12:59:13 2003 UTC (21 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.36: +11 -5 lines
Diff to previous 1.36 (colored)

Some string cleanup: sprintf -> snprintf and magic numbers to sizeof
(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@

Revision 1.36 / (download) - annotate - [select for diffs], Sun Apr 6 22:01:43 2003 UTC (21 years, 2 months ago) by miod
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

The return value for bounds_check_with_label() is not set in stone, and it
turns out that some arches will return (-1) in case of error, while others
will return (0).

Until we make our minds on this, make sure that callers of this function
properly handle 0 or (-1) as failure.

ok krw@

Revision 1.23.8.5 / (download) - annotate - [select for diffs], Fri Mar 28 00:38:10 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.23.8.4: +12 -6 lines
Diff to previous 1.23.8.4 (colored) to branchpoint 1.23 (colored)

Sync the SMP branch with 3.3

Revision 1.35 / (download) - annotate - [select for diffs], Tue Feb 25 09:13:35 2003 UTC (21 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.34: +1 -4 lines
Diff to previous 1.34 (colored)

remove useless check.

ok niklas@

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:42:16 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.30: +25 -16 lines
Diff to previous 1.30 (colored)

Sync UBC branch to -current

Revision 1.34 / (download) - annotate - [select for diffs], Fri May 24 13:10:52 2002 UTC (22 years ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.33: +3 -4 lines
Diff to previous 1.33 (colored)

Make sure that b_iodone handlers are called at splbio (and splassert(IPL_BIO) in all known callers, just to make sure).

Revision 1.33 / (download) - annotate - [select for diffs], Thu May 23 22:47:16 2002 UTC (22 years ago) by art
Branch: MAIN
Changes since 1.32: +11 -1 lines
Diff to previous 1.32 (colored)

Protect biodone calls with splbio.

Revision 1.23.8.4 / (download) - annotate - [select for diffs], Thu Mar 28 15:03:52 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.23.8.3: +12 -12 lines
Diff to previous 1.23.8.3 (colored) to branchpoint 1.23 (colored)

Merge in -current from roughly a week ago

Revision 1.32 / (download) - annotate - [select for diffs], Thu Mar 14 01:26:52 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.31: +13 -13 lines
Diff to previous 1.31 (colored)

First round of __P removal in sys

Revision 1.23.8.3 / (download) - annotate - [select for diffs], Wed Mar 6 02:11:42 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.23.8.2: +32 -27 lines
Diff to previous 1.23.8.2 (colored) to branchpoint 1.23 (colored)

Merge in trunk

Revision 1.31 / (download) - annotate - [select for diffs], Wed Dec 19 08:58:06 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
Changes since 1.30: +5 -1 lines
Diff to previous 1.30 (colored)

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Dec 7 00:11:14 2001 UTC (22 years, 6 months ago) by niklas
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.29: +28 -27 lines
Diff to previous 1.29 (colored)

Make vnds larger than 2G work, mostly by Daniel Lucq <daniel@lucq.org>
toouches by me.

Revision 1.23.8.2 / (download) - annotate - [select for diffs], Wed Dec 5 00:43:29 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.23.8.1: +1 -7 lines
Diff to previous 1.23.8.1 (colored) to branchpoint 1.23 (colored)

Merge in -current

Revision 1.29 / (download) - annotate - [select for diffs], Tue Nov 27 05:27:11 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.28: +1 -5 lines
Diff to previous 1.28 (colored)

Merge in the unified buffer cache code as found in NetBSD 2001/03/10. The
code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>.

Tested for the past few weeks by many developers, should be in a pretty stable
state, but will require optimizations and additional cleanups.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Nov 15 23:15:15 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored)

Remove creds from struct buf, move the creds that nfs need into the nfs node.
While in the area, convert nfs node allocation from malloc to pool and do
some cleanups.
Based on the UBC changes in NetBSD. niklas@ ok.

Revision 1.23.8.1 / (download) - annotate - [select for diffs], Mon May 14 22:23:04 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.23: +96 -20 lines
Diff to previous 1.23 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jul 5 07:27:12 2000 UTC (23 years, 11 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.26: +16 -16 lines
Diff to previous 1.26 (colored)

Make return statements adhere to KNF

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jun 26 19:00:25 2000 UTC (23 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.25: +10 -6 lines
Diff to previous 1.25 (colored)

let svnd deal with sparse files, okay art@ deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jun 22 23:02:19 2000 UTC (23 years, 11 months ago) by fgsch
Branch: MAIN
Changes since 1.24: +4 -2 lines
Diff to previous 1.24 (colored)

on unconfig, bzero the key before free; from aazubel@core-sdi.com.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jun 20 21:29:20 2000 UTC (23 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.23: +71 -1 lines
Diff to previous 1.23 (colored)

add encryption for svnd's for Erich <hh@cyberpass.net>.  You can do a
poor man's encrypted file system with this.  Blame the Greek. okay niklas@

Revision 1.23 / (download) - annotate - [select for diffs], Sat Oct 3 21:19:00 1998 UTC (25 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Branch point for: SMP
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Add a "spoofonly" argument to readdisklabel() which will be used to
implement an ioctl to get a spoofed label even for disks that have
a label on them.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Aug 4 22:01:54 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.21: +3 -2 lines
Diff to previous 1.21 (colored)

make b_resid size_t

Revision 1.21 / (download) - annotate - [select for diffs], Tue Mar 10 17:40:37 1998 UTC (26 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

Clear dependcy list so we don't panic a soft updates kernel.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Nov 6 05:58:08 1997 UTC (26 years, 7 months ago) by csapuntz
Branch: MAIN
Changes since 1.19: +11 -9 lines
Diff to previous 1.19 (colored)

Updates for VFS Lite 2 + soft update.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Oct 18 10:37:04 1997 UTC (26 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

avoid "no disklabel" error messages

Revision 1.18 / (download) - annotate - [select for diffs], Mon Oct 6 20:19:40 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +8 -10 lines
Diff to previous 1.17 (colored)

back out vfs lite2 till after 2.2

Revision 1.17 / (download) - annotate - [select for diffs], Mon Oct 6 15:07:48 1997 UTC (26 years, 8 months ago) by csapuntz
Branch: MAIN
Changes since 1.16: +11 -9 lines
Diff to previous 1.16 (colored)

VFS Lite2 Changes

Revision 1.16 / (download) - annotate - [select for diffs], Fri Aug 8 21:47:01 1997 UTC (26 years, 10 months ago) by niklas
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

Change the bounds_check_with_label API to also take a cpu_disklabel
reference for making transferral of meta-information possible from
readdisklabel to bounds_check_with_label.  The first (and maybe only)
thing that will use this is the multi-disklabel-format code on the
alpha where the labelsector is passed via cpu_disklabel so the label
write-protection can work correctly no matter what label was found.

Also use a new macro DKBAD to get at the dkbad field of the cpu_disklabel
implementations that contain it.  This too is for multi-disklabel
architectures where the "bad" field can be inside a union.  Use this
macro as a means for a driver to check if an architecture supports
dkbad constructs.

Remove proto of bounds_check_with_label from all MD disklabel.h as it
is in sys/disklabel.h.

I have not been able to test the changes everywhere, if I break anything
I apologize, and promise to fix it as soon as I become aware of it.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 9 09:41:08 1997 UTC (27 years ago) by deraadt
Branch: MAIN
Changes since 1.14: +14 -7 lines
Diff to previous 1.14 (colored)

zone and constrain according to disklabel partition slots; part by gson@araneus.fi

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 8 17:38:29 1997 UTC (27 years ago) by deraadt
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

init d_secperunit nicely

Revision 1.13 / (download) - annotate - [select for diffs], Sun May 18 13:00:12 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.12: +2 -9 lines
Diff to previous 1.12 (colored)

null uio_procp

Revision 1.12 / (download) - annotate - [select for diffs], Sat May 17 20:09:46 1997 UTC (27 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Make comment reflect reality and fix a typo

Revision 1.11 / (download) - annotate - [select for diffs], Sat May 17 19:48:38 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

&proc0 should never be used

Revision 1.10 / (download) - annotate - [select for diffs], Fri May 16 19:11:34 1997 UTC (27 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.9: +9 -2 lines
Diff to previous 1.9 (colored)

Some buffers have NULL in b_proc when passed to vndstrategy,
however ffs_write needs a proc pointer in the uio structure, so fill in
&proc0 to avoid a NULL deref

Revision 1.9 / (download) - annotate - [select for diffs], Wed May 14 15:32:46 1997 UTC (27 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.8: +118 -17 lines
Diff to previous 1.8 (colored)

Add a new mode of operation: "safe" vnd, aka svnd, which goes
through the buffercache thus maintaining cache-coherency after unmount of
a mounted vnd.  This is good for diskimage creation, you should still use
the old vnds for swapping on, though

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 4 08:50:22 1997 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +10 -6 lines
Diff to previous 1.7 (colored)

readdisklabel() with correct dev_t

Revision 1.7 / (download) - annotate - [select for diffs], Sat Dec 21 05:21:13 1996 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +155 -37 lines
Diff to previous 1.6 (colored)

add disklabel support

Revision 1.6 / (download) - annotate - [select for diffs], Sun Apr 21 22:19:59 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.5: +5 -9 lines
Diff to previous 1.5 (colored)

partial sync with netbsd 960418, more to come

Revision 1.5 / (download) - annotate - [select for diffs], Sat Mar 2 00:29:25 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.4: +0 -0 lines
Diff to previous 1.4 (colored)

From NetBSD: sync with 960217 sources

Revision 1.4 / (download) - annotate - [select for diffs], Tue Feb 27 09:43:20 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.3: +34 -34 lines
Diff to previous 1.3 (colored)

From NetBSD: update to 960217 sources

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jan 12 20:21:15 1996 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +18 -3 lines
Diff to previous 1.2 (colored)

from netbsd;
New generic disk framework.  Highlights:
New metrics handling.  Metrics are now kept in the new `struct disk'.
Busy time is now stored as a timeval, and transfer count in bytes.
Storage for disklabels is now dynamically allocated, so that the size
of the disk structure is not machine-dependent.
Several new functions for attaching and detaching disks, and handling
metrics calculation.
Old-style instrumentation is still supported in drivers that did it
before.  However, old-style instrumentation is being deprecated, and
will go away once the userland utilities are updated for the new
framework.
For usage and architectural details, see the forthcoming disk(9)
manual page.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 14 06:20:26 1995 UTC (28 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +190 -20 lines
Diff to previous 1.1 (colored)

from netbsd:
Bring in several changes from the ccd:
        * Be a bit better with prototypes
        * Use struct dkdevice in vnd_softc.
        * Prevent the unit from being unconfigured while open.
        * Implement a simple locking mechanism and use it for sanity's
          sake.
Still needs more work; needs to support disklabels and the like.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:52:29 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:52:29 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.