History log of /src/sys/dev/dkvar.h |
Revision | | Date | Author | Comments |
1.32 |
| 01-Mar-2020 |
riastradh | Add a flag to dk_dump for virtual disk devices.
If a disk is backed by a physical medium other than itself, such as cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion detection for dk_dump.
If, however, a device represents a physical medium on its own, such as wd(4), then it passes 0 instead.
With this, I can now dump to dk on cgd on dk on wd.
|
1.31 |
| 08-Dec-2019 |
mlelstv | Drop now unused dk_lookup function.
|
1.30 |
| 01-Nov-2017 |
mlelstv | branches: 1.30.4; 1.30.10; Protect against multiple inclusion.
|
1.29 |
| 27-Apr-2017 |
jdolecek | do not attach nvme ld as randomness source - device is too fast, it overwhelms the rndq handling code, and causes system crashes; gathering rnd there is also bad idea from performance perspective
|
1.28 |
| 22-Dec-2016 |
mlelstv | branches: 1.28.6; Fix race condition in dksubr, where a dk_start from another thread or interrupt was ignored while the queue was processed.
Bump kernel revision for changed dk_softc.
|
1.27 |
| 24-Oct-2016 |
jdolecek | revert 1.90 of dksubr.c and change sc_deferred back to simple pointer; the global sc_busy flag guards against race so it's not actually necessary, and this place is unlikely to need to be parallelized in near future
discussed with mlelstv@
|
1.26 |
| 22-Oct-2016 |
jdolecek | change sc_deferred to TAILQ (reusing bufq b_actq) to avoid possible buf leak for MPSAFE drivers
|
1.25 |
| 21-Dec-2015 |
mlelstv | branches: 1.25.2; support deferral of diskstart to a separate thread.
|
1.24 |
| 28-Aug-2015 |
mlelstv | move entropy gathering into dksubr.
|
1.23 |
| 28-Aug-2015 |
mlelstv | Prevent race condition where two threads can defer a buffer.
|
1.22 |
| 27-Aug-2015 |
mlelstv | Make dksubr use a spin-mutex again, since some drivers still call dk_done from hardware interrupt. Instead, release mutex while calling start routine.
The buffer peek/use/get sequence which can no longer be atomic. So consume the buffer directly and on error privately save and retry the buffer later. The dk_drain function is used to flush such a deferred buffer together with the buffer queue. Adjust drivers to use dk_drain.
Fix an error path where dk_done was called while the lock was already held.
|
1.21 |
| 16-Aug-2015 |
mlelstv | Two changes to the dksubr interface.
- d_diskstart callback now processes a single buffer only. The new wrapper function dk_start processes the queue, performs other buffer handling and also provides locking for the the data structures.
- add d_discard callback to handle device specific function inside the new dk_discard helper function.
Replace splbio with mutex to protect queue and disk structure. Refactor common code in dk_strategy and dk_discard into dk_translate.
Adjust and simplify ld(4), cgd(4) and xbd(4) drivers accordingly.
ld(4) now becomes MP_SAFE.
Bump kernel version.
|
1.20 |
| 02-May-2015 |
mlelstv | Merge dk_intf and dkdriver interfaces. Merge common disk driver functionality in ld.c with dksubr.c. Adjust the two previous users of dk_intf (cgd and xbd) to the changes.
bump kernel version to 7.99.14
|
1.19 |
| 25-May-2014 |
bouyer | branches: 1.19.4; As proposed in https://mail-index.netbsd.org/tech-kern/2014/05/21/msg017098.html remove dk_start() and dk_iodone() from dksubr.c and move the related code to the underlying driver. This increase complexity only marginally: the underlying drivers have to do the while() loop themselves, but this can now be done properly with bufq_peek()/bufq_get(), removing the buffer from the queue at the right time. This handle both the recursion and reordering issues (the reordering issue is described here: https://mail-index.netbsd.org/tech-kern/2014/05/19/msg017089.html the recursion isssue is PR #25240).
Difference with the patch posted to tech-kern@: KASSERT() that the buffer we remove with bufq_get() is the same as the one we bufq_peek()'d just before. Hopefully this will allow more disk drivers to use dksubr.c
|
1.18 |
| 29-May-2013 |
christos | branches: 1.18.6; eliminate dk_geom
|
1.17 |
| 29-May-2013 |
christos | phase 1 of disk geometry cleanup: - centralize the geometry -> plist code so that we don't have n useless copies of it.
|
1.16 |
| 25-May-2012 |
elric | branches: 1.16.2; Modify dksubr.c to add a function that sets the disk properties in the drvctl framework. And call this new functionality from cgd(4), the consumer of dksubr.c. We do this to allow gpt(8) to be able to label cgd(4) disks. We also add in some DIOCGSECTORSIZE logic and we ensure that the WEDGE ioctls are not called on either uninitialised disks or disks which have not been opened for write access.
|
1.15 |
| 19-Nov-2010 |
dholland | branches: 1.15.8; 1.15.12; 1.15.14; Introduce struct pathbuf. This is an abstraction to hold a pathname and the metadata required to interpret it. Callers of namei must now create a pathbuf and pass it to NDINIT (instead of a string and a uio_seg), then destroy the pathbuf after the namei session is complete.
Update all namei call sites accordingly. Add a pathbuf(9) man page and update namei(9).
The pathbuf interface also now appears in a couple of related additional places that were passing string/uio_seg pairs that were later fed into NDINIT. Update other call sites accordingly.
|
1.14 |
| 07-Aug-2009 |
dyoung | branches: 1.14.4; Put the entire expression that DK_BUSY() evaluates to in parentheses for safety.
|
1.13 |
| 28-Apr-2008 |
martin | Remove clause 3 and 4 from TNF licenses
|
1.12 |
| 05-Apr-2008 |
cegger | branches: 1.12.2; 1.12.4; Allow to pass device_xname() to dk_sc_init() without build error OK joerg
|
1.11 |
| 26-Jun-2007 |
cube | branches: 1.11.28; Change dk_lookup() to accept an additional argument of the type enum uio_seg that tells whether the given path is in user space or kernel space, so it can tell NDINIT().
While the raidframe calls were ok, both ccd(4) and cgd(4) were passing pointers to user space data, which leads to strange error on i386, as reported by Jukka Salmi on current-users.
The issue has been there since last august, I'm actually a bit surprised that no one in the meantime has used ccd(4) or cgd(4) on an arch where it would have simply faulted.
|
1.10 |
| 04-Mar-2007 |
christos | branches: 1.10.2; 1.10.4; Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.9 |
| 11-Dec-2005 |
christos | branches: 1.9.24; 1.9.26; 1.9.30; merge ktrace-lwp.
|
1.8 |
| 15-Oct-2005 |
yamt | - change the way to specify a bufq strategy. (by string rather than by number) - rather than embedding bufq_state in driver softc, have a pointer to the former. - move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c. - rename method to strategy for consistency. - move some definitions which don't need to be exposed to the rest of kernel from sys/bufq.h to sys/bufq_impl.h. (is it better to move it to kern/ or somewhere?) - fix some obvious breakage in dev/qbus/ts.c. (not tested)
|
1.7 |
| 20-Aug-2005 |
yamt | add wedge support to xbd and cgd.
|
1.6 |
| 28-Jun-2005 |
drochner | branches: 1.6.2; constification fallout
|
1.5 |
| 31-May-2005 |
xtraeme | Make this build with "-Wcast-qual -Wshadow".
|
1.4 |
| 27-Mar-2004 |
elric | Modified the dksubr routines to:
o expect the disk's start routine to return an int. If the int is non-zero, we enqueue the request and try again later. o have a dk_start() routine which runs the request queue. o have a dk_iodone() function which should be called by the driver using the framwork from its iodone. dk_iodone will retry the queue since presumably further progress may be possible once a request is complete. It is required that the underlying driver have the resources to keep at least one transaction in flight at any time.
Modified cgd to:
o be able to keep one transaction in flight at any time (almost) by keeping a buffer of size MAXPHYS in its softc and use it.
We still need to make the cgd_cbufpool per device rather than global and provide a low water mark for it.
Addresses PR: kern/24715 (at least according to the submitter.)
|
1.3 |
| 29-Jun-2003 |
fvdl | branches: 1.3.2; Back out the lwp/ktrace changes. They contained a lot of colateral damage, and need to be examined and discussed more.
|
1.2 |
| 28-Jun-2003 |
darrenr | Pass lwp pointers throughtout the kernel, as required, so that the lwpid can be inserted into ktrace records. The general change has been to replace "struct proc *" with "struct lwp *" in various function prototypes, pass the lwp through and use l_proc to get the process pointer when needed.
Bump the kernel rev up to 1.6V
|
1.1 |
| 04-Oct-2002 |
elric | branches: 1.1.2; A slight abstraction for disks. This is mainly [right now] in support of the cryptographic disk which I'll be checking in shortly.
|
1.1.2.2 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.1.2.1 |
| 04-Oct-2002 |
nathanw | file dkvar.h was added on branch nathanw_sa on 2002-10-18 02:41:28 +0000
|
1.3.2.5 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.3.2.4 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.3.2.3 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.3.2.2 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.3.2.1 |
| 02-Jul-2003 |
darrenr | Apply the aborted ktrace-lwp changes to a specific branch. This is just for others to review, I'm concerned that patch fuziness may have resulted in some errant code being generated but I'll look at that later by comparing the diff from the base to the branch with the file I attempt to apply to it. This will, at the very least, put the changes in a better context for others to review them and attempt to tinker with removing passing of 'struct lwp' through the kernel.
|
1.6.2.2 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.6.2.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.9.30.1 |
| 03-Sep-2007 |
wrstuden | Sync w/ NetBSD-4-RC_1
|
1.9.26.1 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.9.24.1 |
| 01-Jul-2007 |
bouyer | Pull up following revision(s) (requested by cube in ticket #748): sys/dev/dksubr.c: revision 1.29 sys/dev/ccd.c: revision 1.120 sys/dev/raidframe/rf_disks.c: revision 1.66 sys/dev/raidframe/rf_reconstruct.c: revision 1.96 sys/dev/cgd.c: revision 1.45 sys/dev/dkvar.h: revision 1.11 sys/dev/raidframe/rf_copyback.c: revision 1.38 Change dk_lookup() to accept an additional argument of the type enum uio_seg that tells whether the given path is in user space or kernel space, so it can tell NDINIT(). While the raidframe calls were ok, both ccd(4) and cgd(4) were passing pointers to user space data, which leads to strange error on i386, as reported by Jukka Salmi on current-users.
|
1.10.4.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.10.2.1 |
| 15-Jul-2007 |
ad | Sync with head.
|
1.11.28.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.12.4.2 |
| 19-Aug-2009 |
yamt | sync with head.
|
1.12.4.1 |
| 16-May-2008 |
yamt | sync with head.
|
1.12.2.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.14.4.1 |
| 05-Mar-2011 |
rmind | sync with head
|
1.15.14.1 |
| 03-Jun-2014 |
sborrill | Pull up the following revisions(s) (requested by bouyer in ticket #1075): sys/arch/xen/xen/xbd_xenbus.c: revision 1.63 via patch sys/dev/cgd.c: revision 1.87 via patch sys/dev/dksubr.c: revision 1.50 via patch sys/dev/dkvar.h: revision 1.19 via patch
Avoid xbd(4) reordering requests, which, depending on the underlying hardware, can badly affect write performances. This can give up to a 5x performance gain in sequencial writes.
|
1.15.12.1 |
| 02-Jun-2012 |
mrg | sync to latest -current.
|
1.15.8.2 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.15.8.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.16.2.3 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.16.2.2 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.16.2.1 |
| 23-Jun-2013 |
tls | resync from head
|
1.18.6.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.19.4.5 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.19.4.4 |
| 05-Feb-2017 |
skrll | Sync with HEAD
|
1.19.4.3 |
| 27-Dec-2015 |
skrll | Sync with HEAD (as of 26th Dec)
|
1.19.4.2 |
| 22-Sep-2015 |
skrll | Sync with HEAD
|
1.19.4.1 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.25.2.2 |
| 07-Jan-2017 |
pgoyette | Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
|
1.25.2.1 |
| 04-Nov-2016 |
pgoyette | Sync with HEAD
|
1.28.6.1 |
| 02-May-2017 |
pgoyette | Sync with HEAD - tag prg-localcount2-base1
|
1.30.10.2 |
| 21-Mar-2020 |
martin | Apply patch, requested by riastradh in ticket #795, to keep ABI compatibility.
|
1.30.10.1 |
| 21-Mar-2020 |
martin | Pull up following revision(s) (requested by riastradh in ticket #795):
sys/dev/dksubr.c: revision 1.112 sys/arch/xen/xen/xbd_xenbus.c: revision 1.95 sys/dev/scsipi/sd.c: revision 1.328 sys/dev/dkvar.h: revision 1.32 sys/dev/ld.c: revision 1.109 sys/dev/cgd.c: revision 1.120 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.380 sys/dev/ata/wd.c: revision 1.458
Add a flag to dk_dump for virtual disk devices.
If a disk is backed by a physical medium other than itself, such as cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion detection for dk_dump.
If, however, a device represents a physical medium on its own, such as wd(4), then it passes 0 instead.
With this, I can now dump to dk on cgd on dk on wd.
|
1.30.4.1 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|