OpenBSD CVS

CVS log for src/sys/sys/disk.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.38 / (download) - annotate - [select for diffs], Wed Nov 15 20:23:19 2023 UTC (6 months, 3 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Constify disk_map()'s path argument

The disklabel UID passed in is not modified, reflect that and allow callers
using 'const char *'.

OK miod

Revision 1.37 / (download) - annotate - [select for diffs], Sun Sep 11 19:34:40 2022 UTC (20 months, 4 weeks ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.36: +1 -2 lines
Diff to previous 1.36 (colored)

Remove the DKF_LABELVALID flag from struct disk. Instead, trust disk drivers
to always be able to provide a duid, and keep ignoring whole zero duids.

This fixes a race in vnd setup where the disk_attach callback could run
before any I/O occurs on the vnd, thus not having a label available yet.

noticed by otto@ and kn@; ok kn@

Revision 1.36 / (download) - annotate - [select for diffs], Thu May 4 22:47:27 2017 UTC (7 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, 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, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Also pass the blk offset to disk_unbusy(), so that it can pass it to
the random subsystem as entropy.  This value is pretty much unknown,
and anyways our entropy input ring does not saturate from knowns.
ok mikeb djm

Revision 1.35 / (download) - annotate - [select for diffs], Sat May 21 14:00:27 2016 UTC (8 years ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.34: +4 -1 lines
Diff to previous 1.34 (colored)

Cleanup some of the DUID code and refactor for readability.

ok krw@ kettenis@

Revision 1.34 / (download) - annotate - [select for diffs], Tue Jul 1 05:22:38 2014 UTC (9 years, 11 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.33: +1 -16 lines
Diff to previous 1.33 (colored)

there is no disksort, so there are no stats produced to fill in a
disksort_stats structure.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Dec 28 16:02:45 2011 UTC (12 years, 5 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.32: +1 -0 lines
Diff to previous 1.32 (colored)

Avoid the use of an invalid disklabel by setting a DK_LABELVALID flag
if we correctly read and validated the disklabel. Always check that this
flag is set before using the DUID from the disklabel.

Discussed with deraadt@

ok krw@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Sep 21 21:43:57 2011 UTC (12 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +3 -1 lines
Diff to previous 1.31 (colored)

Move the prototype for disk_readlabel to the .h file so that hibernate
can get at it.
ok jsing

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jun 30 16:28:05 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.30: +4 -1 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Sun Jun 19 04:51:06 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored)

Add disk_lock_nointr() as a way to acquire the disk lock without being
interrupted by signals.

ok deraadt@

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

Kill the "lockname" argument to disk_construct().

ok deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Nov 17 15:01:05 2010 UTC (13 years, 6 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Make the comment for dk_timestamp more accurate.
ok krw@, jmc@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Sep 23 13:11:37 2010 UTC (13 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.26: +3 -1 lines
Diff to previous 1.26 (colored)

Introduce a DKF_NOLABELREAD flag, which is used by a device to prevent
automatic reading of disklabel on attach.

ok deraadt@ miod@ krw@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Sep 22 05:28:59 2010 UTC (13 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.25: +2 -3 lines
Diff to previous 1.25 (colored)

Garbage collect the field dk_labelsector since there are no uses
in the tree. Update disk.9 to reflect current reality.

ok matthew@ deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Sep 8 15:16:22 2010 UTC (13 years, 9 months ago) by jsing
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Introduce a disk_lookup() function which calls device_lookup(), before
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@

Revision 1.24 / (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.23: +3 -1 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Mon Aug 30 16:53:28 2010 UTC (13 years, 9 months ago) by jsing
Branch: MAIN
Changes since 1.22: +3 -1 lines
Diff to previous 1.22 (colored)

Add a device number to struct disk and populate it on disk attach. Whilst
here also expose disklist for future use.

ok deraadt@ miod@

Revision 1.22 / (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.21: +1 -16 lines
Diff to previous 1.21 (colored)

Garbage collect struct dkdriver.

ok miod@; "please go ahead" jsing@

Revision 1.21 / (download) - annotate - [select for diffs], Mon May 3 15:27:28 2010 UTC (14 years, 1 month ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.20: +6 -0 lines
Diff to previous 1.20 (colored)

Provide a disk_map() function which attempts to map a disklabel UID to the
actual device. If successful, the real path is returned via mappath. Soon
to be used by several other diffs.

ok krw@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jun 17 01:30:32 2009 UTC (14 years, 11 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.19: +1 -3 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Wed Jun 3 22:09:30 2009 UTC (15 years ago) by thib
Branch: MAIN
Changes since 1.18: +2 -0 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Sun Dec 23 01:59:58 2007 UTC (16 years, 5 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.17: +3 -1 lines
Diff to previous 1.17 (colored)

protect the disk statistics with a mutex.

ok tedu@ kettenis@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 20 18:15:47 2007 UTC (16 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.16: +1 -3 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Fri Jun 1 18:26:29 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

more completely safe daddr_t -> daddr64_t

Revision 1.15 / (download) - annotate - [select for diffs], Sat May 5 12:43:35 2007 UTC (17 years, 1 month ago) by art
Branch: MAIN
Changes since 1.14: +1 -3 lines
Diff to previous 1.14 (colored)

Kill disk_find and disk_resetstat that noone uses. If you ever need
them, they are still in cvs.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Mar 30 00:38:56 2007 UTC (17 years, 2 months ago) by dlg
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

replace lockmgr locks with rwlocks. these are no longer recursive, but they
weren't used recursively anyway.

tested by hsoexer@ fkr@  ok pedro@

Revision 1.13 / (download) - annotate - [select for diffs], Wed Mar 15 20:20:42 2006 UTC (18 years, 3 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.12: +1 -4 lines
Diff to previous 1.12 (colored)

Nuke dk_establish(), no longer used.

Revision 1.4.16.5 / (download) - annotate - [select for diffs], Sat Jun 5 23:13:09 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.4.16.4: +13 -6 lines
Diff to previous 1.4.16.4 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Merge with the trunk

Revision 1.12 / (download) - annotate - [select for diffs], Sun Feb 15 02:45:46 2004 UTC (20 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.11: +13 -6 lines
Diff to previous 1.11 (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.4.16.4 / (download) - annotate - [select for diffs], Sat Jun 7 11:09:07 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.4.16.3: +2 -6 lines
Diff to previous 1.4.16.3 (colored) to branchpoint 1.4 (colored)

Sync SMP branch to -current

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

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

Revision 1.9.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:32:33 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.9: +20 -20 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync UBC branch to -current

Revision 1.4.16.3 / (download) - annotate - [select for diffs], Thu Mar 28 14:52:01 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.4.16.2: +20 -20 lines
Diff to previous 1.4.16.2 (colored) to branchpoint 1.4 (colored)

Merge in -current from roughly a week ago

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:14 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.9: +20 -20 lines
Diff to previous 1.9 (colored)

First round of __P removal in sys

Revision 1.4.16.2 / (download) - annotate - [select for diffs], Wed Jul 4 11:00:15 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.4.16.1: +23 -11 lines
Diff to previous 1.4.16.1 (colored) to branchpoint 1.4 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jun 22 14:10:59 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

KNF

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 3 03:22:53 2001 UTC (23 years ago) by angelos
Branch: MAIN
Changes since 1.7: +18 -7 lines
Diff to previous 1.7 (colored)

Add struct diskstats, for use by sysctl.

Revision 1.4.16.1 / (download) - annotate - [select for diffs], Mon May 14 22:45:01 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.4: +10 -2 lines
Diff to previous 1.4 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.7 / (download) - annotate - [select for diffs], Mon May 14 07:05:00 2001 UTC (23 years, 1 month ago) by angelos
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

External variable disk_change.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jan 25 03:50:53 2001 UTC (23 years, 4 months ago) by todd
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

spelling

Revision 1.5 / (download) - annotate - [select for diffs], Sun Apr 9 19:26:35 2000 UTC (24 years, 2 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.4: +9 -1 lines
Diff to previous 1.4 (colored)



Move a locking function that was spread throughout disk device drivers into
the disk structure.

The locking was mostly used in disk device drivers to prevent multiple
disklabel operations from going on simultaneously against the device.

Added disk_construct(), a constructor for the disk structure, that
initializes the lock structure in disk. It is called by default in
disk_attach() if it hasn't been called yet.

Added disk_lock and disk_unlock

Revision 1.4 / (download) - annotate - [select for diffs], Thu May 2 13:13:21 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Branch point for: SMP
Changes since 1.3: +5 -2 lines
Diff to previous 1.3 (colored)

dk_establish() is actually supposed to be void

Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 3 12:11:33 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.2: +1 -0 lines
Diff to previous 1.2 (colored)

From NetBSD: 960217 merge

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 12 20:21:36 1996 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +57 -18 lines
Diff to previous 1.1 (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.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:26 1995 UTC (28 years, 7 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:53:26 1995 UTC (28 years, 7 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.