The NetBSD Project

CVS log for src/sys/miscfs/specfs/spec_vnops.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / miscfs / specfs

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.138 / (download) - annotate - [select for diffs], Sun Jun 16 20:46:24 2013 UTC (2 days, 15 hours ago) by dholland
Branch: MAIN
CVS Tags: HEAD
Changes since 1.137: +18 -2 lines
Diff to previous 1.137 (colored)

Hang a warning banner on some nasty code I just found.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Feb 13 14:03:48 2013 UTC (4 months ago) by hannken
Branch: MAIN
CVS Tags: tls-maxphys-nbase, tls-maxphys-base, khorben-n900, agc-symver-base, agc-symver
Changes since 1.136: +86 -3 lines
Diff to previous 1.136 (colored)

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

Revision 1.136 / (download) - annotate - [select for diffs], Thu Dec 20 08:03:43 2012 UTC (5 months, 4 weeks ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base8
Changes since 1.135: +3 -5 lines
Diff to previous 1.135 (colored)

Change bread() and breadn() to never return a buffer on
error and modify all callers to not brelse() on error.

Welcome to 6.99.16

PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)

Revision 1.135 / (download) - annotate - [select for diffs], Sun Apr 29 22:54:00 2012 UTC (13 months, 2 weeks ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored)

change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.

Revision 1.134 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:58 2011 UTC (2 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.133: +6 -6 lines
Diff to previous 1.133 (colored)

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.

Revision 1.133 / (download) - annotate - [select for diffs], Wed Apr 27 09:46:27 2011 UTC (2 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored)

Remove no longer needed flag FSYNC_VFS /* fsync: via FSYNC_VFS() */.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Apr 26 11:32:39 2011 UTC (2 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Change vflushbuf() to return an error if a synchronous write fails.

Welcome to 5.99.51.

Revision 1.131 / (download) - annotate - [select for diffs], Sat Aug 21 13:19:40 2010 UTC (2 years, 9 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.130: +2 -6 lines
Diff to previous 1.130 (colored)

Update the rest of the kernel to conform to the module subsystem's new
locking protocol.

Revision 1.130 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:17 2010 UTC (2 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.129: +8 -8 lines
Diff to previous 1.129 (colored)

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.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Apr 13 11:54:43 2010 UTC (3 years, 2 months ago) by ahoka
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

Revert my last change, it's not The Right Thing [tm].

Revision 1.128 / (download) - annotate - [select for diffs], Tue Apr 13 01:15:56 2010 UTC (3 years, 2 months ago) by ahoka
Branch: MAIN
Changes since 1.127: +3 -3 lines
Diff to previous 1.127 (colored)

Autoload modules with any class.

This fixes autoloading of pf, zfs and possibly others.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Nov 14 18:36:57 2009 UTC (3 years, 7 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.126: +30 -2 lines
Diff to previous 1.126 (colored)

- 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.

Revision 1.126 / (download) - annotate - [select for diffs], Tue Oct 6 04:28:10 2009 UTC (3 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.125: +9 -2 lines
Diff to previous 1.125 (colored)

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

Revision 1.125 / (download) - annotate - [select for diffs], Sun Oct 4 06:23:58 2009 UTC (3 years, 8 months ago) by tsutsui
Branch: MAIN
Changes since 1.124: +20 -2 lines
Diff to previous 1.124 (colored)

Put workaround fix for LOCKDEBUG panic mentioned in PR kern/41078:
 Don't try to load a driver module if the driver is already exist but just
 not attached. [bc]dev_open() could return ENXIO even if the driver exists.

XXX: Maybe this should be handled by helper functions for
XXX: module_autoload() calls on demand.

Revision 1.124 / (download) - annotate - [select for diffs], Sat Apr 25 15:06:32 2009 UTC (4 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored)

- Rearrange pg_delete() and pg_remove() (renamed pg_free), thus
  proc_enterpgrp() with proc_leavepgrp() to free process group and/or
  session without proc_lock held.
- Rename SESSHOLD() and SESSRELE() to  to proc_sesshold() and
  proc_sessrele().  The later releases proc_lock now.

Quick OK by <ad>.

Revision 1.123 / (download) - annotate - [select for diffs], Sun Feb 22 20:28:06 2009 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.122: +2 -5 lines
Diff to previous 1.122 (colored)

PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.

Revision 1.122 / (download) - annotate - [select for diffs], Mon Feb 2 14:00:27 2009 UTC (4 years, 4 months ago) by haad
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.121: +44 -5 lines
Diff to previous 1.121 (colored)

Add support for loading pseudo-device drivers. Try to autoload modules from
specs_open routine. If devsw_open fail, get driver name with devsw_getname
routine and autoload module.

For now only dm drivervcan be loaded, other pseudo drivers needs more work.

Ok by ad@.

Revision 1.121 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:54 2009 UTC (4 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.120: +4 -4 lines
Diff to previous 1.120 (colored)

merge christos-time_t

Revision 1.120 / (download) - annotate - [select for diffs], Mon Dec 29 17:41:19 2008 UTC (4 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: christos-time_t-nbase, christos-time_t-base
Changes since 1.119: +21 -22 lines
Diff to previous 1.119 (colored)

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

Revision 1.119 / (download) - annotate - [select for diffs], Fri May 16 09:22:00 2008 UTC (5 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, christos-time_t
Changes since 1.118: +5 -4 lines
Diff to previous 1.118 (colored)

Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write.  Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn().  If set the caller
  intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
  may clear the buffer and runs copy-on-write.  Process possible errors
  from getblk() or fscow_run().  Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.118 / (download) - annotate - [select for diffs], Tue Apr 29 18:18:09 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.117: +9 -2 lines
Diff to previous 1.117 (colored)

PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

Introduce VFS_FSYNC() and call it when syncing a block device, if it
has a mounted file system.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:08 2008 UTC (5 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.116: +2 -9 lines
Diff to previous 1.116 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.116 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:30 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.115: +6 -6 lines
Diff to previous 1.115 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.115 / (download) - annotate - [select for diffs], Fri Jan 25 16:21:04 2008 UTC (5 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, mjf-devfs2
Changes since 1.114: +5 -2 lines
Diff to previous 1.114 (colored)

Spec_open(): clear sd_bdevvp if bdev_open() failed.

Ok: Andrew Doran <ad@netbsd.org>

Revision 1.114 / (download) - annotate - [select for diffs], Fri Jan 25 14:32:16 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.113: +2 -3 lines
Diff to previous 1.113 (colored)

Remove VOP_LEASE. Discussed on tech-kern.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Jan 24 21:05:52 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.112: +2 -3 lines
Diff to previous 1.112 (colored)

spec_fsync: don't assert that 'vp' holds the block device open. If it's
not open, there shouldn't be dirty buffers so vinvalbuf() is harmless.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Jan 24 17:32:55 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.111: +317 -63 lines
Diff to previous 1.111 (colored)

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.

Revision 1.111 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:02 2008 UTC (5 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.110: +6 -6 lines
Diff to previous 1.110 (colored)

Merge vmlocking2 to head.

Revision 1.110 / (download) - annotate - [select for diffs], Sun Dec 2 13:56:18 2007 UTC (5 years, 6 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

Fscow_run(): add a flag "bool data_valid" to note still valid data.
Buffers run through copy-on-write are marked B_COWDONE.  This condition
is valid until the buffer has run through bwrite() and gets cleared from
biodone().

Welcome to 4.99.39.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.109 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:17 2007 UTC (5 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.108: +11 -17 lines
Diff to previous 1.108 (colored)

Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern

Revision 1.108 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:30 2007 UTC (5 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.107: +11 -11 lines
Diff to previous 1.107 (colored)

Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Oct 8 18:04:05 2007 UTC (5 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.106: +7 -14 lines
Diff to previous 1.106 (colored)

Merge brelse() changes from the vmlocking branch.

Revision 1.106 / (download) - annotate - [select for diffs], Sun Oct 7 13:39:04 2007 UTC (5 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.105: +6 -23 lines
Diff to previous 1.105 (colored)

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>

Revision 1.105 / (download) - annotate - [select for diffs], Sat Sep 1 23:40:25 2007 UTC (5 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

Make bioops a pointer and point it to the softdeps struct in softdep
init.  Decouples "options SOFTDEP" from the main kernel and ffs code.

Revision 1.104 / (download) - annotate - [select for diffs], Fri Aug 3 08:45:36 2007 UTC (5 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.103: +18 -34 lines
Diff to previous 1.103 (colored)

ANSI-fy

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jul 29 13:31:11 2007 UTC (5 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup
Changes since 1.102: +3 -4 lines
Diff to previous 1.102 (colored)

It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.

Revision 1.102 / (download) - annotate - [select for diffs], Fri Jul 27 08:32:44 2007 UTC (5 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

vop_mmap parameter change

Revision 1.101 / (download) - annotate - [select for diffs], Sun Jul 22 19:16:05 2007 UTC (5 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.100: +24 -2 lines
Diff to previous 1.100 (colored)

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

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:59 2007 UTC (5 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.99: +38 -90 lines
Diff to previous 1.99 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.99 / (download) - annotate - [select for diffs], Tue Jun 5 12:31:32 2007 UTC (6 years ago) by yamt
Branch: MAIN
Changes since 1.98: +4 -3 lines
Diff to previous 1.98 (colored)

improve post-ubc file overwrite performance in common cases.
ie. when it's safe, actually overwrite blocks rather than doing
read-modify-write.

also fixes PR/33152 and PR/36303.

Revision 1.98 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:14 2007 UTC (6 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.97: +6 -6 lines
Diff to previous 1.97 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.97 / (download) - annotate - [select for diffs], Sun Nov 26 20:27:27 2006 UTC (6 years, 6 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.96: +2 -37 lines
Diff to previous 1.96 (colored)

Implement Veriexec's raw disk policy on-top of kauth(9)'s device scope,
using both the rawio_spec and passthru actions to detect raw disk
activity. Same for kernel memory policy.

Update documentation (no longer need to expose veriexec_rawchk()) and
remove all Veriexec-related bits from specfs.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Nov 4 09:30:00 2006 UTC (6 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.95: +30 -59 lines
Diff to previous 1.95 (colored)

Change KAUTH_SYSTEM_RAWIO to KAUTH_DEVICE_RAWIO_SPEC (moving the raw i/o
requests to the device scope) and add KAUTH_DEVICE_RAWIO_PASSTHRU.

Expose iskmemdev() through sys/conf.h.

okay yamt@

Revision 1.95 / (download) - annotate - [select for diffs], Thu Nov 2 12:48:35 2006 UTC (6 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.94: +18 -16 lines
Diff to previous 1.94 (colored)

Redo Veriexec raw disk/memory access policies so they hold only if the
request is for write access.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Nov 1 09:37:28 2006 UTC (6 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.93: +23 -17 lines
Diff to previous 1.93 (colored)

Only use blkdev/bvp for the Veriexec case. While here, fix up IPS mode
restrictions on kernel memory.

okay yamt@

Revision 1.93 / (download) - annotate - [select for diffs], Mon Oct 30 12:19:23 2006 UTC (6 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.92: +2 -3 lines
Diff to previous 1.92 (colored)

oops, remove debug printf slipped in. good catch from yamt@, thanks!

Revision 1.92 / (download) - annotate - [select for diffs], Sat Sep 30 21:00:13 2006 UTC (6 years, 8 months ago) by jld
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored)

The poll routine needs to return POLLERR on error, not an errno.  Sorry
about that.  Pointed out by Juergen Hannken-Illjes in mail.

Revision 1.91 / (download) - annotate - [select for diffs], Thu Sep 21 09:28:37 2006 UTC (6 years, 8 months ago) by jld
Branch: MAIN
Changes since 1.90: +20 -4 lines
Diff to previous 1.90 (colored)

Protect spec_poll from racing against revocation and thus dereferencing a
NULL v_specinfo.  Mostly copied (with understanding) from rev 1.83's fix
to spec_ioctl, and needed for the same reason (kern/vfs_subr.c r1.231).

Revision 1.90 / (download) - annotate - [select for diffs], Tue Sep 19 16:41:57 2006 UTC (6 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.89: +5 -2 lines
Diff to previous 1.89 (colored)

For the VBLK case, we always check vfs_mountedon() and it has nothing
to do with the security model used. Move back the call to spec_open(),
which can now return the real return value from vfs_mountedon() (EBUSY)
and not EPERM, changing semantics.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Sep 8 20:58:57 2006 UTC (6 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.88: +47 -31 lines
Diff to previous 1.88 (colored)

First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)

Revision 1.88 / (download) - annotate - [select for diffs], Fri Aug 11 19:17:47 2006 UTC (6 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Changes since 1.87: +26 -2 lines
Diff to previous 1.87 (colored)

Pretending to be Elad's keyboard:

fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.

veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.

both update all relevant documentation.

veriexec concept is okay blymn@.

Revision 1.87 / (download) - annotate - [select for diffs], Sun May 14 21:32:21 2006 UTC (7 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.86: +9 -8 lines
Diff to previous 1.86 (colored)

integrate kauth.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:32 2006 UTC (7 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.85: +8 -6 lines
Diff to previous 1.85 (colored)

merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:51 2005 UTC (7 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.84: +27 -27 lines
Diff to previous 1.84 (colored)

merge ktrace-lwp.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Nov 2 12:38:59 2005 UTC (7 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.83: +2 -7 lines
Diff to previous 1.83 (colored)

merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.83 / (download) - annotate - [select for diffs], Sun Sep 11 14:18:54 2005 UTC (7 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.82: +21 -4 lines
Diff to previous 1.82 (colored)

in spec_ioctl(), don't dereference v_specinfo if it's NULL.
this is needed due to rev. 1.231 of kern/vfs_subr.c, which now sets
v_specinfo to NULL before changing the vnode's ops vector.

Revision 1.82 / (download) - annotate - [select for diffs], Tue Aug 30 20:08:01 2005 UTC (7 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored)

Remove __P()

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jun 21 14:01:13 2005 UTC (7 years, 11 months ago) by ws
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.80: +4 -3 lines
Diff to previous 1.80 (colored)

PR-30566: Poll must not return <sys/errno.h> values.
Start with those places I can easily test.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Feb 26 22:59:00 2005 UTC (8 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

nuke trailing whitespace

Revision 1.79 / (download) - annotate - [select for diffs], Tue May 25 14:54:57 2004 UTC (9 years ago) by hannken
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, matt-timespec, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.78: +15 -5 lines
Diff to previous 1.78 (colored)

Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>

Revision 1.78 / (download) - annotate - [select for diffs], Wed May 12 02:07:38 2004 UTC (9 years, 1 month ago) by jrf
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored)

caddr_t -> void * and removal of some more casts.

Revision 1.77 / (download) - annotate - [select for diffs], Sat Feb 14 00:00:56 2004 UTC (9 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-1, netbsd-2-0, netbsd-2
Changes since 1.76: +23 -11 lines
Diff to previous 1.76 (colored)

Add a generic copy-on-write hook to add/remove functions that will be
called with every buffer written through spec_strategy().

Used by fss(4). Future file-system-internal snapshots will need them too.

Welcome to 1.6ZK

Approved by: Jason R. Thorpe <thorpej@netbsd.org>

Revision 1.76 / (download) - annotate - [select for diffs], Sun Jan 25 18:06:49 2004 UTC (9 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.75: +9 -10 lines
Diff to previous 1.75 (colored)

Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.

VOP_STRATEGY(bp) is replaced by one of two new functions:

- VOP_STRATEGY(vp, bp)  Call the strategy routine of vp for bp.
- DEV_STRATEGY(bp)      Call the d_strategy routine of bp->b_dev for bp.

DEV_STRATEGY(bp) is used only for block-to-block device situations.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Dec 10 11:40:12 2003 UTC (9 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.74: +13 -3 lines
Diff to previous 1.74 (colored)

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>

Revision 1.74 / (download) - annotate - [select for diffs], Wed Nov 26 11:33:50 2003 UTC (9 years, 6 months ago) by pk
Branch: MAIN
Changes since 1.73: +2 -4 lines
Diff to previous 1.73 (colored)

spec_close: asserting that the terminal's process group be set if it is
associated with a session is too strong; a foreground group may go away
without being immediately replaced with another.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Nov 25 12:52:10 2003 UTC (9 years, 6 months ago) by pk
Branch: MAIN
Changes since 1.72: +2 -4 lines
Diff to previous 1.72 (colored)

spec_close: we don't need to lock the vnode just to make a copy of its flags.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Nov 24 14:59:38 2003 UTC (9 years, 6 months ago) by pk
Branch: MAIN
Changes since 1.71: +11 -6 lines
Diff to previous 1.71 (colored)

spec_close: controlling terminal hack: drop session reference count only if
we actually had a reference.

Revision 1.71 / (download) - annotate - [select for diffs], Thu Nov 6 08:58:04 2003 UTC (9 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.70: +12 -3 lines
Diff to previous 1.70 (colored)

When closing a process's controlling terminal, also remove the links
to the session and pgrp from the tty.  The way that the console is
handled means that the vrele() may not actually do the final close
on the tty itself.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Oct 15 08:41:26 2003 UTC (9 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.69: +17 -15 lines
Diff to previous 1.69 (colored)

Set vnode size of character disk devices to that of the partition when they
are opened (was always done for block devices).
This means that fstat will report the partition size and hence newfs
needn't grovel into the disklabel to find the filesystem size.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:44 2003 UTC (9 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.68: +3 -7 lines
Diff to previous 1.68 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:48 2003 UTC (9 years, 11 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.67: +25 -25 lines
Diff to previous 1.67 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:05 2003 UTC (9 years, 11 months ago) by darrenr
Branch: MAIN
Changes since 1.66: +27 -27 lines
Diff to previous 1.66 (colored)

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

Revision 1.66 / (download) - annotate - [select for diffs], Sat Oct 26 13:50:17 2002 UTC (10 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.65: +15 -2 lines
Diff to previous 1.65 (colored)

now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies

Revision 1.65 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:38 2002 UTC (10 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.64: +33 -2 lines
Diff to previous 1.64 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.64 / (download) - annotate - [select for diffs], Fri Sep 6 13:23:58 2002 UTC (10 years, 9 months ago) by gehenna
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.63: +78 -37 lines
Diff to previous 1.63 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Aug 26 01:32:41 2002 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Fix a signed/unsigned comparison warning from GCC 3.3.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Jul 10 23:16:33 2002 UTC (10 years, 11 months ago) by wiz
Branch: MAIN
Changes since 1.61: +3 -3 lines
Diff to previous 1.61 (colored)

Spell acquire with a 'c'.

Revision 1.61 / (download) - annotate - [select for diffs], Sun May 12 20:42:03 2002 UTC (11 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.60: +4 -2 lines
Diff to previous 1.60 (colored)

Extern speclisth

Revision 1.60 / (download) - annotate - [select for diffs], Sat Nov 10 13:33:44 2001 UTC (11 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, newlock-base, newlock, ifpoll-base, ifpoll, eeh-devprop-base, eeh-devprop
Changes since 1.59: +4 -1 lines
Diff to previous 1.59 (colored)

add RCSIDs

Revision 1.59 / (download) - annotate - [select for diffs], Sun Sep 23 04:39:25 2001 UTC (11 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.58: +7 -13 lines
Diff to previous 1.58 (colored)

change spec_{read,write}() to specify the device blkno in units of DEV_BSIZE
rather than the device's sector size.  this allows /dev/rcd0a and /dev/cd0a
to return the same data.  fixes PRs 3261 and 14026.

Revision 1.58 / (download) - annotate - [select for diffs], Fri Sep 21 08:02:55 2001 UTC (11 years, 9 months ago) by chs
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

use shared locks instead of exclusive for VOP_READ() and VOP_READDIR().

Revision 1.57 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:38 2001 UTC (11 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: post-chs-ubcperf
Changes since 1.56: +4 -27 lines
Diff to previous 1.56 (colored)

a whole bunch of changes to improve performance and robustness under load:

 - remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Aug 18 05:34:46 2001 UTC (11 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.55: +110 -33 lines
Diff to previous 1.55 (colored)

undo the part of the last revision that made user block device access
use the UBC interfaces.  too many problems with that yet.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Aug 17 05:51:53 2001 UTC (11 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.54: +67 -113 lines
Diff to previous 1.54 (colored)

initialize the UVM vnode size for block devices.
UBCify user access to block devices.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Apr 17 18:49:26 2001 UTC (12 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Don't hold vp->v_interlock when calling vcount(); vcount() calls
vgone(), which may sleep.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jan 22 12:17:40 2001 UTC (12 years, 4 months ago) by jdolecek
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const

Revision 1.52 / (download) - annotate - [select for diffs], Wed Nov 8 05:29:32 2000 UTC (12 years, 7 months ago) by chs
Branch: MAIN
Changes since 1.51: +6 -6 lines
Diff to previous 1.51 (colored)

fix an LP64BE bogon.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Oct 27 06:28:27 2000 UTC (12 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.50: +1 -2 lines
Diff to previous 1.50 (colored)

Remove usecount check in spec_open. It fails to catch VALIAS situations
and vfs_mountedon will handle them all correctly.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Sep 19 22:01:59 2000 UTC (12 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.49: +3 -1 lines
Diff to previous 1.49 (colored)

Adapt for VOP_FSYNC parameter change.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Jul 22 15:26:14 2000 UTC (12 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.48: +2 -3 lines
Diff to previous 1.48 (colored)

change the lf_advlock() arguments from

int     lf_advlock __P((struct lockf **,
           off_t, caddr_t, int, struct flock *, int));
to

int     lf_advlock __P((struct vop_advlock_args *, struct lockf **, off_t));

This matches common usage and is also compatible with similar change
in FreeBSD (though they use u_quad_t as last arg).

Revision 1.48 / (download) - annotate - [select for diffs], Thu Mar 30 12:22:14 2000 UTC (13 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.47: +10 -10 lines
Diff to previous 1.47 (colored)

Register, begone!

Revision 1.47 / (download) - annotate - [select for diffs], Wed Dec 8 19:16:52 1999 UTC (13 years, 6 months ago) by sommerfeld
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

Add appropriate VOP_FCNTL handlers to deadfs and specfs ops vectors.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Dec 8 18:57:07 1999 UTC (13 years, 6 months ago) by sommerfeld
Branch: MAIN
Changes since 1.45: +11 -1 lines
Diff to previous 1.45 (colored)

Change to comment (only) indicating what the specfs ops vector is used for.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:10 1999 UTC (13 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.44: +7 -2 lines
Diff to previous 1.44 (colored)

Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O

Revision 1.44 / (download) - annotate - [select for diffs], Sat Oct 16 23:53:27 1999 UTC (13 years, 8 months ago) by wrstuden
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.43: +35 -6 lines
Diff to previous 1.43 (colored)

In spec_close(), if we're not doing a non-blocking close and VXLOCK is
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.

Make all unmount routines lock the device vnode before calling VOP_CLOSE().

Revision 1.43 / (download) - annotate - [select for diffs], Fri Oct 2 00:21:39 1998 UTC (14 years, 8 months ago) by ross
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001, kenh-if-detach-base, kenh-if-detach, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, chs-ubc2-base, chs-ubc2, chs-ubc-base, chs-ubc
Branch point for: wrstuden-devbsize, netbsd-1-4
Changes since 1.42: +12 -6 lines
Diff to previous 1.42 (colored)

Make spec_write() process errors and return them, otherwise we don't even
notice things like hitting the end of a partition or device.  (To be sure,
writes to block special files are rare, but as long as we support them...)

Revision 1.42 / (download) - annotate - [select for diffs], Tue Aug 18 06:30:09 1998 UTC (14 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +3 -2 lines
Diff to previous 1.41 (colored)

Add some braces to make egcs happy (ambiguous else warning).

Revision 1.41 / (download) - annotate - [select for diffs], Mon Aug 3 14:20:00 1998 UTC (14 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.40: +4 -1 lines
Diff to previous 1.40 (colored)

Recognize _PC_SYNC_IO.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jun 5 19:53:00 1998 UTC (15 years ago) by kleink
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Mar 1 02:21:34 1998 UTC (15 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.38: +28 -31 lines
Diff to previous 1.38 (colored)

Merge with Lite2 + local changes

Revision 1.38 / (download) - annotate - [select for diffs], Thu Oct 16 23:57:51 1997 UTC (15 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Add missing cast to dev_t

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 9 13:00:05 1997 UTC (15 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: marc-pcmcia-base
Changes since 1.36: +8 -8 lines
Diff to previous 1.36 (colored)

Make various standard wmesg strings const.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Apr 2 17:14:32 1997 UTC (16 years, 2 months ago) by kleink
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.35: +1 -3 lines
Diff to previous 1.35 (colored)

Remove superfluous (uio_resid == 0) check.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 2 17:09:47 1997 UTC (16 years, 2 months ago) by kleink
Branch: MAIN
Changes since 1.34: +22 -1 lines
Diff to previous 1.34 (colored)

added advisory record locking support

Revision 1.34 / (download) - annotate - [select for diffs], Sun Oct 13 02:21:41 1996 UTC (16 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

backout previous kprintf changes

Revision 1.33 / (download) - annotate - [select for diffs], Thu Oct 10 22:54:19 1996 UTC (16 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.32 / (download) - annotate - [select for diffs], Sat Sep 7 12:41:19 1996 UTC (16 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +7 -9 lines
Diff to previous 1.31 (colored)

Implement poll(2).

Revision 1.31 / (download) - annotate - [select for diffs], Thu Sep 5 09:26:16 1996 UTC (16 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +1 -4 lines
Diff to previous 1.30 (colored)

Remove some unused variables.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Sep 1 23:48:28 1996 UTC (16 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.29: +9 -76 lines
Diff to previous 1.29 (colored)

Add a set of generic file system operations that most file systems use.
Also, fix some time stamp bogosities.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Apr 22 01:42:38 1996 UTC (17 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

remove include of <sys/cpu.h>

Revision 1.28 / (download) - annotate - [select for diffs], Fri Feb 9 22:40:57 1996 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.27: +97 -62 lines
Diff to previous 1.27 (colored)

miscfs prototype changes

Revision 1.27 / (download) - annotate - [select for diffs], Sun Oct 15 05:18:12 1995 UTC (17 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Implement VOP_BWRITE() using vn_bwrite(), per r_friedl@informatik.uni-kl.de.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jul 24 21:20:11 1995 UTC (17 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-1-base
Branch point for: netbsd-1-1
Changes since 1.25: +3 -6 lines
Diff to previous 1.25 (colored)

avoid unnecessary aging of buffers.  This used to make sense, when buffer
caches were much smaller, but makes little sense now, and will become more
useless as RAM (and buffer cache) sizes grow.  Suggested by Bob Baron.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Jul 8 00:42:45 1995 UTC (17 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

add missing splx(), as suggested by enami@sys.ptg.sony.co.jp.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 2 07:20:50 1995 UTC (17 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +12 -11 lines
Diff to previous 1.23 (colored)

Make spec_read() and spec_write() vaguely consistent.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Apr 10 00:48:10 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +9 -6 lines
Diff to previous 1.22 (colored)

Use the new d_type field.  Set VISTTY for vnodes of tty devices.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Dec 14 18:49:38 1994 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +3 -6 lines
Diff to previous 1.21 (colored)

Remove a_fp.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 13 20:14:46 1994 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +5 -4 lines
Diff to previous 1.20 (colored)

Turn lease_check() into a vnode op, per CSRG.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Nov 14 06:07:45 1994 UTC (18 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.19: +6 -3 lines
Diff to previous 1.19 (colored)

fixed struct comment; passed extra argument (struct file *) to open

Revision 1.19 / (download) - annotate - [select for diffs], Sat Oct 29 07:59:00 1994 UTC (18 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

light clean; make sure headers are properly included, types are OK, etc.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Oct 20 04:26:38 1994 UTC (18 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

update for new syscall args description mechanism

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jul 16 11:40:56 1994 UTC (18 years, 11 months ago) by paulus
Branch: MAIN
Changes since 1.16: +19 -11 lines
Diff to previous 1.16 (colored)

Support for block special files with sector sizes other than DEV_BSIZE -
if the device has a disklabel with a non-zero sector size value, that
value is used instead of DEV_BSIZE.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jun 29 06:35:03 1994 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 8 11:33:47 1994 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.14: +316 -189 lines
Diff to previous 1.14 (colored)

Update to 4.4-Lite fs code, with local changes.

Revision 1.14 / (download) - annotate - [select for diffs], Tue May 24 02:36:33 1994 UTC (19 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

MIN -> min, MAX -> max

Revision 1.13 / (download) - annotate - [select for diffs], Thu Apr 21 07:48:55 1994 UTC (19 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Convert mount, vnode, and buf structs to use <sys/queue.h>.  Also,
some knf and structure frobbing to do along with it.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jan 27 03:42:02 1994 UTC (19 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.11: +3 -4 lines
Diff to previous 1.11 (colored)

oops; fix that last...

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jan 27 03:16:40 1994 UTC (19 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.10: +15 -1 lines
Diff to previous 1.10 (colored)

hack from Mike Karels to deal with the last close on a controlling
terminal.  from 4.4BSD.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Dec 22 13:14:42 1993 UTC (19 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

fix return type of vnode print routine

Revision 1.9 / (download) - annotate - [select for diffs], Sat Dec 18 03:59:02 1993 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +17 -17 lines
Diff to previous 1.8 (colored)

Canonicalize all #includes.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 12 05:56:10 1993 UTC (19 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

new specfs.h and fifo.h locations

Revision 1.7 / (download) - annotate - [select for diffs], Sat Oct 30 16:11:07 1993 UTC (19 years, 7 months ago) by glass
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

fix chris typo.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Oct 29 19:25:18 1993 UTC (19 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.5: +5 -1 lines
Diff to previous 1.5 (colored)

limit block sizes requested

Revision 1.5 / (download) - annotate - [select for diffs], Mon Aug 23 05:02:06 1993 UTC (19 years, 10 months ago) by cgd
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.4: +7 -1 lines
Diff to previous 1.4 (colored)

changes from 0.9-ALPHA2 to 0.9-BETA

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:50 1993 UTC (19 years, 11 months ago) by andrew
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA
Branch point for: netbsd-0-9
Changes since 1.3: +19 -2 lines
Diff to previous 1.3 (colored)

ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 20 02:54:52 1993 UTC (20 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.2: +2 -8 lines
Diff to previous 1.2 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (20 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +9 -0 lines
Diff to previous 1.1 (colored)

after 0.2.2 "stable" patches applied

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (20 years, 3 months ago) by cgd
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.




CVSweb <webmaster@jp.NetBSD.org>