History log of /netbsd/sys/miscfs/specfs/specdev.h (Results 1 – 25 of 54)
Revision Date Author Comments
# 22241105 22-Apr-2023 hannken <hannken@NetBSD.org>

Remove unused specdev member sd_rdev.

Ride 10.99.4


# cac4b9eb 26-Oct-2022 riastradh <riastradh@NetBSD.org>

miscfs/specfs/specdev.h: New home for extern spec_vnodeop_opv_desc.

Also use it for extern spec_vnodeop_p, which is already there.


# c402f51a 28-Mar-2022 riastradh <riastradh@NetBSD.org>

specfs: Reorder struct specnode members to save padding.

Shrinks from 40 bytes to 32 bytes on LP64 systems this way.


# ac1ff696 28-Mar-2022 riastradh <riastradh@NetBSD.org>

specfs: Let spec_node_lookup_by_dev wait for reclaim to finish.

vdevgone relies on this to ensure that if there is a concurrent
revoke in progress, it will wait for that revoke to finish -- that
way

specfs: Let spec_node_lookup_by_dev wait for reclaim to finish.

vdevgone relies on this to ensure that if there is a concurrent
revoke in progress, it will wait for that revoke to finish -- that
way, it can guarantee all I/O operations have completed and the
device is closed.

show more ...


# c5bf48ad 28-Mar-2022 riastradh <riastradh@NetBSD.org>

specfs: Prevent new opens while close is waiting to drain.

Otherwise, bdev/cdev_close could have cancelled all _existing_ opens,
and waited for them to complete (and freed resources used by them) --

specfs: Prevent new opens while close is waiting to drain.

Otherwise, bdev/cdev_close could have cancelled all _existing_ opens,
and waited for them to complete (and freed resources used by them) --
but a new one could start, and hang (e.g., a tty), at the same time
spec_close tries to drain all pending I/O operations, one of which
(the new open) is now hanging indefinitely.

Preventing the new open from even starting until bdev/cdev_close is
finished and all I/O operations have drained avoids this deadlock.

show more ...


# 24764b29 28-Mar-2022 riastradh <riastradh@NetBSD.org>

specfs: Drain all I/O operations after last .d_close call.

New kind of I/O reference on specdevs, sd_iocnt. This could be done
with psref instead; I chose a reference count instead for now because

specfs: Drain all I/O operations after last .d_close call.

New kind of I/O reference on specdevs, sd_iocnt. This could be done
with psref instead; I chose a reference count instead for now because
we already have to take a per-object lock anyway, v_interlock, for
vdead_check, so another atomic is not likely to hurt much more. We
can always change the mechanism inside spec_io_enter/exit/drain later
on.

Make sure every access to vp->v_rdev or vp->v_specnode and every call
to a devsw operation is protected either:

- by the vnode lock (with vdead_check if we unlocked/relocked),
- by positive sd_opencnt,
- by spec_io_enter/exit, or
- by sd_opencnt management in open/close.

show more ...


# e7522264 28-Mar-2022 riastradh <riastradh@NetBSD.org>

specfs: Resolve a race between close and a failing reopen.


# 91c8bb3d 28-Mar-2022 riastradh <riastradh@NetBSD.org>

specfs: Document sn_opencnt, sd_opencnt, sd_refcnt.


# 854e06da 18-Jul-2021 dholland <dholland@NetBSD.org>

Abolish all the silly indirection macros for initializing vnode ops tables.

These are things of the form #define foofs_op genfs_op, or #define
foofs_op genfs_eopnotsupp, or similar. They serve no pu

Abolish all the silly indirection macros for initializing vnode ops tables.

These are things of the form #define foofs_op genfs_op, or #define
foofs_op genfs_eopnotsupp, or similar. They serve no purpose besides
obfuscation, and have gotten cutpasted all over everywhere.

show more ...


# 84f30772 18-Jul-2021 dholland <dholland@NetBSD.org>

Use macros for the canned parts of device and fifo vnode op tables.

Add GENFS_SPECOP_ENTRIES and GENFS_FIFOOP_ENTRIES macros that contain
the portion of the vnode ops table declaration that is
(cons

Use macros for the canned parts of device and fifo vnode op tables.

Add GENFS_SPECOP_ENTRIES and GENFS_FIFOOP_ENTRIES macros that contain
the portion of the vnode ops table declaration that is
(conservatively) the same in every fs. Use these in every fs that
supports devices and/or fifos with separate ops tables.

Note that ptyfs works differently (it has one type of vnode with
open-coded dispatch to the specfs code, which I haven't changed in
this commit) and rump/librump/rumpvfs/rumpfs.c has an indirect dynamic
dispatch that already does more or less the same thing, which I also
haven't changed.

Also note that this anticipates a few bits in the next changeset here
and there, and adds missing but unreachable calls in some cases (e.g.
most fses weren't defining whiteout on devices and fifos, but it isn't
reachable there), and it changes parsepath on devices and fifos to
genfs_badop from genfs_parsepath (but it's not reachable there
either).

It appears that devices in kernfs were missing kqfilter, so it's
possible that if you try to use kqueue on /kern/rootdev that it'll
explode.

And finally note that the ops declaration tables aren't
order-dependent. (Other than vop_default_desc has to come first.)
Otherwise this wouldn't work.

show more ...


# 88940d77 23-Jun-2015 hannken <hannken@NetBSD.org>

Add a vfs_newvnode() method to deadfs and use it to create
anonymous device vnodes with bdevvp() and cdevvp().

Implement spec_inactive() and spec_reclaim() to handle these nodes.


# 68642e75 25-Jul-2014 dholland <dholland@NetBSD.org>

Implement spec_fdiscard() using bdev_discard() and cdev_discard().
Also define spec_fallocate() to genfs_eopnotsupp().


# ce2a78d3 30-Sep-2013 hannken <hannken@NetBSD.org>

Replace macro v_specmountpoint with two functions spec_node_getmountedfs()
and spec_node_setmountedfs() to manage the file system mounted on a device.
Assert the device is a block device.

Welcome to

Replace macro v_specmountpoint with two functions spec_node_getmountedfs()
and spec_node_setmountedfs() to manage the file system mounted on a device.
Assert the device is a block device.

Welcome to 6.99.24

Discussed on tech-kern@ some time ago.

Reviewed by: David Holland <dholland@netbsd.org>

show more ...


# 48fcfc3f 21-Apr-2013 dholland <dholland@NetBSD.org>

add missing spec_whiteout


# a4291e49 13-Feb-2013 hannken <hannken@NetBSD.org>

Make the spec_node table implementation private to spec_vnops.c.

To retrieve a spec_node, two new lookup functions (by device or by mount)
are implemented. Both return a referenced vnode, for an op

Make the spec_node table implementation private to spec_vnops.c.

To retrieve a spec_node, two new lookup functions (by device or by mount)
are implemented. Both return a referenced vnode, for an opened block device
the opened vnode is returned so further diagnostic checks "vp == ... sd_bdevvp"
will not fire. Otherwise any vnode matching the criteria gets returned.

No objections on tech-kern.

Welcome to 6.99.17

show more ...


# 1570e68c 14-Nov-2009 elad <elad@NetBSD.org>

- Move kauth_init() a little bit higher.

- Add spec_init() to authorize special device actions (and passthru too for
the time being). Move policy out of secmodel_suser.


# 756638cf 06-Oct-2009 elad <elad@NetBSD.org>

Factor out a block of code that appears in three places (Veriexec, keylock,
and securelevel) so that others can use it as well.


# 8583cae2 29-Dec-2008 pooka <pooka@NetBSD.org>

Rename specfs_lock as device_lock and move it from specfs to devsw.
Relaxes kernel dependency on vfs.


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# 1997a1e1 25-Jan-2008 ad <ad@NetBSD.org>

Remove VOP_LEASE. Discussed on tech-kern.


# 703069c0 24-Jan-2008 ad <ad@NetBSD.org>

specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to refe

specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
vnode can describe a block device. Instead, prohibit concurrent opens of
block devices. As a bonus remove the unreliable code that prevents
multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
goes away, instead of abusing vnode::v_usecount to tell if the device is
open.

show more ...


# 3856acaf 07-Oct-2007 hannken <hannken@NetBSD.org>

Update the file system copy-on-write handler.

- Instead of hooking the handler on the specdev of a mounted file system
hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' a

Update the file system copy-on-write handler.

- Instead of hooking the handler on the specdev of a mounted file system
hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'. Use
`mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>

show more ...


# ce3dd6b3 03-Aug-2007 pooka <pooka@NetBSD.org>

cleanup unused prototype


# 05ce20f4 22-Jul-2007 pooka <pooka@NetBSD.org>

Retire uvn_attach() - it abuses VXLOCK and its functionality,
setting vnode sizes, is handled elsewhere: file system vnode creation
or spec_open() for regular files or block special files, respective

Retire uvn_attach() - it abuses VXLOCK and its functionality,
setting vnode sizes, is handled elsewhere: file system vnode creation
or spec_open() for regular files or block special files, respectively.

Add a call to VOP_MMAP() to the pagedvn exec path, since the vnode
is being memory mapped.

reviewed by tech-kern & wrstuden

show more ...


# fc9422c9 14-May-2006 elad <elad@NetBSD.org>

integrate kauth.


123