dholland
890e036b3c
Implement d_discard for dk. This closes PR 47940.
2014-07-25 08:23:56 +00:00
dholland
f9228f4225
Add d_discard to all struct cdevsw instances I could find.
...
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
dholland
8c70ef39af
Add d_discard to all struct bdevsw instances I could find.
...
I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
2014-07-25 08:02:18 +00:00
christos
223a7bd55f
add dkwedge_get_parent_name().
2014-04-03 15:24:20 +00:00
martin
aad6ef8bb5
Bring back the playstation2 port - now that a toolchain for it is
...
available again.
2014-03-31 11:25:47 +00:00
dholland
a68f9396b6
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
...
designated initializers.
I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
skrll
6d3ceb1d61
Rename NetBSD/hp700 to NetBSD/hppa.
...
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
soren
dcaf98cac2
Don't complain about not being able to open empty removable media drives.
2013-08-03 18:30:57 +00:00
christos
7b845fa9dc
phase 1 of disk geometry cleanup:
...
- centralize the geometry -> plist code so that we don't have
n useless copies of it.
2013-05-29 00:47:48 +00:00
chs
cbab9cadce
split device_t/softc for all remaining drivers.
...
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
mlelstv
5741661f64
Make detection of root on wedges (dk(4)) machine independent. Remove
...
MD code for x86, xen, sparc64.
2012-06-10 17:05:18 +00:00
mlelstv
c6cfd0f5c9
Use the label's packname to create wedge names instead of the classic
...
device names. Fall back to classic device names when the label has an
empty name or the default name 'fictitious'.
2012-06-07 16:15:31 +00:00
drochner
d4145bf15d
minor mostly cosmetical fixes: use designated type for device major
...
numbers, typo in comment, misuse of minor()
(the latter one is not cosmetical, but would only affect systems
with more than 256 disk wedges)
2012-04-27 18:15:55 +00:00
christos
cc0b3c1656
recognize apple disks.
2012-04-07 05:36:10 +00:00
christos
5d992415ee
use the partition sector size.
2012-04-07 05:09:09 +00:00
jmcneill
d2b1c474ba
Add an FSILENT flag and use it to suppress "Medium Not Present" scsipi
...
spam when trying to access offline drives at boot.
2011-07-30 12:08:36 +00:00
rmind
e225b7bd09
Welcome to 5.99.53! Merge rmind-uvmplock branch:
...
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.
- Simplify locking in some pmap(9) modules by removing P->V locking.
- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).
- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.
- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.
Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
christos
b1b063f09f
check rawvp before doing ioctl or strategy.
2011-03-03 03:39:08 +00:00
christos
0437d56b01
Make error checking consistent, possibly fixes PR/44652.
2011-02-28 18:28:20 +00:00
mlelstv
9c7e989427
Make wedges aware of underlying physical block size.
2010-12-23 14:22:03 +00:00
bouyer
f5a8179a2f
Make sure to release sc_parent->dk_rawlock before calling
...
vn_close(sc->sc_parent->dk_rawvp). Avoids a lockdebug panic:
error: mutex_destroy: assertion failed: !MUTEX_OWNED(mtx->mtx_owner) && !MUTEX_HAS_WAITERS(mtx)
when the parent is a raidframe device.
See also:
http://mail-index.netbsd.org/tech-kern/2010/07/27/msg008612.html
2010-08-04 12:34:00 +00:00
hannken
1423e65b26
Clean up vnode lock operations pass 2:
...
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.
Welcome to 5.99.32.
Discussed on tech-kern.
2010-06-24 12:58:48 +00:00
jakllsch
4151797e7b
Use wput_utf8() to improve conversion of UTF-16 GPT partition names to UTF-8.
...
Drop static CRC32 function in favor of the one from libkern.
2010-05-17 23:09:52 +00:00
mlelstv
1ce16876f7
d_psize routine returns a number of blocks or -1 on error.
...
d_dump routine returns 0 or an error code.
2010-02-07 16:04:31 +00:00
mlelstv
ff9a9860d6
GPTs are defined in terms of physical blocks.
...
- Fix reading of GPT for devices with non-512byte sectors
- Fix bounds check to use DEV_BSIZE units.
2010-01-25 14:51:03 +00:00
bouyer
5d530cfdab
struct buf::b_iodone is not called at splbio() any more.
...
Make sure non-MPsafe iodone callbacks raise the SPL as appropriate.
Fix buffer corruption issue I noticed in dk(4), and probable similar
issues in vnd(4) and cgd(4).
2010-01-23 18:31:04 +00:00
jakllsch
a70f4ed596
Implement and use a dkminphys() that calls the parent device's minphys
...
function with b_dev temporarily adjusted to the parent device's dev_t.
Fixes PR/37390.
2009-12-27 01:37:17 +00:00
pooka
d6224f4507
Remove support for NetBSD/playstation2.
2009-12-05 16:29:10 +00:00
pooka
3446f432fa
dkwedge_list() is currently called only from ioctl routines where
...
l == curlwp. Since there is no perceived case where we'd ever want
to copy the list to non-curlwp, simplify the code a bit.
(the struct lwp * argument could probably be dropped too, but
that's another commit)
2009-09-08 21:14:33 +00:00
pooka
48575b808e
grow some _KERNEL_POT
2009-09-07 13:59:38 +00:00
pooka
f926eb58c3
Remove autoconf dependency on vfs and dk:
...
opendisk() -> kern/subr_disk_open.c
config_handle_wedges -> dev/dkwedge/dk.c
2009-09-06 16:18:55 +00:00
haad
a0a1dfda1b
Add support for DIOCGDISKINFO for wedges. This fixes regression after my
...
DIOCGDISKINFO commit to fsck/partutil.c.
Tested by me and adegroot@.
2009-08-06 16:00:49 +00:00
dyoung
5a4d67314b
Extract a lot of code from dkwedge_del(), and move it to dkwedge_detach()
...
to create a comprehensive detachment hook. Let that hook run at
shutdown. Now, 'drvctl -d dk0' actually deletes a wedge if it is
not in-use (otherwise fails w/ EBUSY), and wedges are gracefully
detached from their "parent" at shutdown.
2009-07-21 19:41:00 +00:00
dyoung
7242213311
Extract subroutine dklastclose(). This is a step toward detachable
...
dk(4).
2009-07-02 00:56:48 +00:00
cegger
529e91fca1
struct device * -> device_t, no functional changes intended.
2009-05-12 14:16:35 +00:00
cegger
32c4940900
struct cfdata * -> cfdata_t, no functional changes intended.
2009-05-12 12:10:29 +00:00
yamt
70de973662
g/c BUFQ_FOO() macros and use bufq_foo() directly.
2009-01-13 13:33:58 +00:00
jakllsch
76a01a44a6
Allow wedges to be created for all defined partitions on a GPT disk.
...
Use __arraycount on the GUID to type mapping array.
Add HFS to the list of types with dkw_ptypes.
reviewed by cube.
2008-10-23 19:37:40 +00:00
christos
f52ea15353
Recognize apple ufs partitions from Antoine Reilles
2008-06-29 15:13:28 +00:00
reinoud
f6a70673ba
Mark a buffer busy
in getnewbuf() when it came from the pool_cache since
...
its not on a free list.
Also change buf_init() to not automatically mark buffers `busy' since this
only makes sense for bufcache buffers.
Mark all buf_init'd buffers 'busy' on the places where they ought to be
flagged as such to not confuse the buffer cache.
Fixes PR 38923.
2008-06-17 14:53:10 +00:00
ad
a22432a7bc
dkwedge_read: don't place struct buf on the stack.
2008-06-03 12:14:08 +00:00
chris
39f46f7a42
Call buf_destroy when finished with an on-stack struct buf.
...
Spotted by LOCKDEBUG, because the condvars were already initialised.
2008-06-01 11:38:26 +00:00
plunky
fcf1772a80
after the "struct disk" is finished with, it should be
...
destroyed with disk_destroy(9) to stave off LOCKDEBUG
panics.
2008-05-03 08:23:41 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
agc
e7debae8a8
Fix a minor nit in a comment
2008-04-10 09:31:51 +00:00
cegger
b90893744b
use aprint_*_dev and device_xname
2008-04-06 08:33:31 +00:00
ad
a9ca7a3734
Catch up with descriptor handling changes. See kern_descrip.c revision
...
1.173 for details.
2008-03-21 21:54:58 +00:00
cube
5e306eb1c9
Split device_t/softc. Well, there's not much to split there, as the
...
device_t didn't contain the softc anyway.
This driver should be re-structured so it doesn't have to manage its own
set of softcs.
2008-03-04 13:51:18 +00:00
ad
df774def20
Hold v_interlock when adjust v_writecount.
2008-01-30 15:42:52 +00:00
ad
4a780c9ae2
Merge vmlocking2 to head.
2008-01-02 11:48:20 +00:00