The NetBSD Project

CVS log for src/sys/kern/vfs_subr.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.500 / (download) - annotate - [select for diffs], Sun Apr 30 08:46:11 2023 UTC (10 months, 4 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.499: +6 -16 lines
Diff to previous 1.499 (colored) to selected 1.271 (colored)

kern/vfs_subr.c: Revert previous build fixes, no longer needed.

SDT_PROBE* will now DTRT here.

Revision 1.499 / (download) - annotate - [select for diffs], Sat Apr 29 23:30:18 2023 UTC (10 months, 4 weeks ago) by kre
Branch: MAIN
Changes since 1.498: +16 -6 lines
Diff to previous 1.498 (colored) to selected 1.271 (colored)


Fix builds (hopefully) when DTRACE hooks are not included.

Revision 1.498 / (download) - annotate - [select for diffs], Sat Apr 29 10:07:30 2023 UTC (11 months ago) by riastradh
Branch: MAIN
Changes since 1.497: +99 -12 lines
Diff to previous 1.497 (colored) to selected 1.271 (colored)

vfs: Sprinkle dtrace probes into syncer.

Revision 1.497 / (download) - annotate - [select for diffs], Sat Apr 29 10:06:33 2023 UTC (11 months ago) by riastradh
Branch: MAIN
Changes since 1.496: +16 -14 lines
Diff to previous 1.496 (colored) to selected 1.271 (colored)

kern/vfs_subr.c: Sort includes.  No functional change intended.

Revision 1.496 / (download) - annotate - [select for diffs], Wed Oct 26 23:39:43 2022 UTC (17 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.495: +4 -4 lines
Diff to previous 1.495 (colored) to selected 1.271 (colored)

miscfs/deadfs/deadfs.h: New home for deadfs-related externs.

XXX regen sys/kern/vnode_if.c and the others

Revision 1.495 / (download) - annotate - [select for diffs], Tue Sep 13 09:13:19 2022 UTC (18 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.494: +23 -6 lines
Diff to previous 1.494 (colored) to selected 1.271 (colored)

vfs(9): For MP-safe mounts, don't kernel lock in mount/unmount.

Revision 1.494 / (download) - annotate - [select for diffs], Tue Sep 13 08:48:20 2022 UTC (18 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.493: +6 -6 lines
Diff to previous 1.493 (colored) to selected 1.271 (colored)

vfs_subr.c: Nix trailing whitespace.

Revision 1.493 / (download) - annotate - [select for diffs], Mon Mar 28 12:38:33 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.492: +16 -2 lines
Diff to previous 1.492 (colored) to selected 1.271 (colored)

driver(9): Make vdevgone call config_detach_commit if appropriate.

Make sure to do this before spec_node_lookup_by_dev -- that might wait
for a concurrent revoke to complete, which in turn might wait for a
concurrent open to complete, which in turn might be waiting for the
device to commit to detaching.

Revision 1.492 / (download) - annotate - [select for diffs], Mon Mar 28 12:37:46 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.491: +9 -4 lines
Diff to previous 1.491 (colored) to selected 1.271 (colored)

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.

Revision 1.491 / (download) - annotate - [select for diffs], Sat Oct 16 07:12:01 2021 UTC (2 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.490: +27 -27 lines
Diff to previous 1.490 (colored) to selected 1.271 (colored)

Spinkle some KNF spaces after commas.

Revision 1.490 / (download) - annotate - [select for diffs], Thu Feb 4 21:07:06 2021 UTC (3 years, 1 month ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.489: +36 -7 lines
Diff to previous 1.489 (colored) to selected 1.271 (colored)

introduce vfs.generic.timestamp_precision sysctl to control precision
of the timer used for vfs_timestamp(); default stays the same
to use nanotime(9), but option is there to use the faster, albeit
less precise methods

code taken from FreeBSD

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html

Revision 1.489 / (download) - annotate - [select for diffs], Sun Jul 26 21:28:33 2020 UTC (3 years, 8 months ago) by christos
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.488: +3 -3 lines
Diff to previous 1.488 (colored) to selected 1.271 (colored)

use the right printing function

Revision 1.488 / (download) - annotate - [select for diffs], Tue May 26 18:38:37 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.487: +10 -13 lines
Diff to previous 1.487 (colored) to selected 1.271 (colored)

Make vcache_tryvget() lockless.  Reviewed by hannken@.

Revision 1.487 / (download) - annotate - [select for diffs], Sat May 16 18:31:50 2020 UTC (3 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.486: +49 -17 lines
Diff to previous 1.486 (colored) to selected 1.271 (colored)

Add ACL support for FFS. From FreeBSD.

Revision 1.486 / (download) - annotate - [select for diffs], Tue Apr 21 21:42:47 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.485: +7 -8 lines
Diff to previous 1.485 (colored) to selected 1.271 (colored)

Revert the changes made in February to make cwdinfo use mostly lockless,
which relied on taking extra vnode refs.

Having benchmarked various experimental changes over the past few months it
seems that it's better to avoid vnode refs as much as possible.  cwdi_lock
as a RW lock already did that to some extent for getcwd() and will permit
the same for namei() too.

Revision 1.485 / (download) - annotate - [select for diffs], Mon Apr 13 19:23:18 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.484: +3 -3 lines
Diff to previous 1.484 (colored) to selected 1.271 (colored)

Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed().  Signature matches
FreeBSD.

Revision 1.484 / (download) - annotate - [select for diffs], Sat Mar 14 20:45:23 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.483: +4 -8 lines
Diff to previous 1.483 (colored) to selected 1.271 (colored)

Make uvm_pagemarkdirty() responsible for putting vnodes onto the syncer
work list.  Proposed on tech-kern@.

Revision 1.483 / (download) - annotate - [select for diffs], Sun Mar 1 21:39:07 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp
Changes since 1.482: +4 -15 lines
Diff to previous 1.482 (colored) to selected 1.271 (colored)

reassignbuf(), brelvp(): VI_WRMAPDIRTY is always clear if the object has no
pages, so assert that instead of trying to clear it.

Revision 1.482 / (download) - annotate - [select for diffs], Thu Feb 27 22:12:54 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base3
Changes since 1.481: +16 -5 lines
Diff to previous 1.481 (colored) to selected 1.271 (colored)

Tighten up the locking around vp->v_iflag a little more after the recent
split of vmobjlock & v_interlock.

Revision 1.481 / (download) - annotate - [select for diffs], Sun Feb 23 22:14:03 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.480: +11 -10 lines
Diff to previous 1.480 (colored) to selected 1.271 (colored)

Merge from ad-namecache:

- Have a stab at clustering the members of vnode_t and vnode_impl_t in a
  more cache-conscious way.  With that done, go back to adjusting v_usecount
  with atomics and keep vi_lock directly in vnode_impl_t (saves KVA).

- Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT().
  Make sure LK_UPGRADE always comes with LK_NOWAIT.

- Make cwdinfo use mostly lockless.

Revision 1.480 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:41 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.479: +5 -5 lines
Diff to previous 1.479 (colored) to selected 1.271 (colored)

UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.

Revision 1.479 / (download) - annotate - [select for diffs], Fri Jan 17 20:08:09 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.478: +6 -6 lines
Diff to previous 1.478 (colored) to selected 1.271 (colored)

VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode.  Matches
FreeBSD.

Revision 1.478 / (download) - annotate - [select for diffs], Sun Dec 22 19:47:34 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.477: +9 -8 lines
Diff to previous 1.477 (colored) to selected 1.271 (colored)

Make mntvnode_lock per-mount, and address false sharing of struct mount.

Revision 1.477 / (download) - annotate - [select for diffs], Sun Dec 15 20:30:03 2019 UTC (4 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.476: +5 -5 lines
Diff to previous 1.476 (colored) to selected 1.271 (colored)

Teach ddb(4)'s "show vnode_lock" about matching by v_interlock.

Revision 1.476 / (download) - annotate - [select for diffs], Sun Dec 15 20:29:09 2019 UTC (4 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.475: +10 -2 lines
Diff to previous 1.475 (colored) to selected 1.271 (colored)

Teach ddb(4) about printing the full mount list.

Revision 1.475 / (download) - annotate - [select for diffs], Sun Dec 1 13:56:29 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.474: +4 -4 lines
Diff to previous 1.474 (colored) to selected 1.271 (colored)

Minor vnode locking changes:

- Stop using atomics to maniupulate v_usecount.  It was a mistake to begin
  with.  It doesn't work as intended unless the XLOCK bit is incorporated in
  v_usecount and we don't have that any more.  When I introduced this 10+
  years ago it was to reduce pressure on v_interlock but it doesn't do that,
  it just makes stuff disappear from lockstat output and introduces problems
  elsewhere.  We could do atomic usecounts on vnodes but there has to be a
  well thought out scheme.

- Resurrect LK_UPGRADE/LK_DOWNGRADE which will be needed to work effectively
  when there is increased use of shared locks on vnodes.

- Allocate the vnode lock using rw_obj_alloc() to reduce false sharing of
  struct vnode.

- Put all of the LRU lists into a single cache line, and do not requeue a
  vnode if it's already on the correct list and was requeued recently (less
  than a second ago).

Kernel build before and after:

119.63s real  1453.16s user  2742.57s system
115.29s real  1401.52s user  2690.94s system

Revision 1.474 / (download) - annotate - [select for diffs], Sat Nov 16 10:05:44 2019 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.473: +4 -3 lines
Diff to previous 1.473 (colored) to selected 1.271 (colored)

Add a NULL check on the structure (same logic as my previous change in this
file). For clarity, and to appease kUBSan.

Revision 1.473 / (download) - annotate - [select for diffs], Fri Nov 15 15:51:57 2019 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.472: +5 -3 lines
Diff to previous 1.472 (colored) to selected 1.271 (colored)

NULL-check the structure pointer, not the address of its first field. This
is clearer and also appeases syzbot.

Reported-by: syzbot+d27bc1be926b3641c0ad@syzkaller.appspotmail.com

Revision 1.472 / (download) - annotate - [select for diffs], Sun Sep 22 22:59:39 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.471: +4 -2 lines
Diff to previous 1.471 (colored) to selected 1.271 (colored)

Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=

Revision 1.471 / (download) - annotate - [select for diffs], Tue Jan 1 10:06:54 2019 UTC (5 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2
Changes since 1.470: +4 -4 lines
Diff to previous 1.470 (colored) to selected 1.271 (colored)

Add "void *extra" argument to vcache_new() so a file system may
pass more information about the file to create.

Welcome to 8.99.30

Revision 1.470 / (download) - annotate - [select for diffs], Fri Oct 27 12:25:15 2017 UTC (6 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.469: +2 -2 lines
Diff to previous 1.469 (colored) to selected 1.271 (colored)

Revert printf return value change.

Revision 1.469 / (download) - annotate - [select for diffs], Fri Oct 27 09:59:16 2017 UTC (6 years, 5 months ago) by utkarsh009
Branch: MAIN
Changes since 1.468: +4 -4 lines
Diff to previous 1.468 (colored) to selected 1.271 (colored)

[syzkaller] Cast all the printf's to (void *)
> as a result of new printf(9) declaration.

Revision 1.468 / (download) - annotate - [select for diffs], Sun Jun 4 07:58:29 2017 UTC (6 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.467: +6 -4 lines
Diff to previous 1.467 (colored) to selected 1.271 (colored)

A vnode is usually called "active", if it has an associated file system
node and a usecount greater zero.  Therefore rename state "VS_ACTIVE"
to "VS_LOADED" and add a new synthetic state "VS_ACTIVE" for VSTATE_ASSERT()
to assert an active vnode.

Add VSTATE_ASSERT_UNLOCKED() to be used with v_interlock unheld and
move the state assertion macros to sys/vnode_impl.h.

Revision 1.467 / (download) - annotate - [select for diffs], Fri May 26 14:34:19 2017 UTC (6 years, 10 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-8-base
Branch point for: netbsd-8
Changes since 1.466: +2 -3 lines
Diff to previous 1.466 (colored) to selected 1.271 (colored)

Eliminate crusty debugging sludge.

We have a mostly sane vnode lifecycle now.  If this needs debugging,
it should be done once at the call site of VOP_RECLAIM.

Revision 1.466 / (download) - annotate - [select for diffs], Wed May 24 09:53:55 2017 UTC (6 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.465: +3 -4 lines
Diff to previous 1.465 (colored) to selected 1.271 (colored)

With dounmount() working on a suspended file system remove no longer
needed fields mnt_busynest and mnt_unmounting from struct mount.

Welcome to 7.99.73

Revision 1.465 / (download) - annotate - [select for diffs], Wed May 24 09:52:59 2017 UTC (6 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.464: +2 -7 lines
Diff to previous 1.464 (colored) to selected 1.271 (colored)

Remove the syncer dance from dounmount().  The syncer skips
unmounting file systems as they are suspended.

Remove now unused syncer_mutex.

Revision 1.464 / (download) - annotate - [select for diffs], Sun May 7 08:26:58 2017 UTC (6 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2
Changes since 1.463: +3 -6 lines
Diff to previous 1.463 (colored) to selected 1.271 (colored)

Enter fstrans from _vfs_busy() and leave from vfs_unbusy().

Adapt sched_sync() and do_sys_sync().

Revision 1.463 / (download) - annotate - [select for diffs], Mon Apr 17 08:34:27 2017 UTC (6 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, bouyer-socketcan-base1
Branch point for: prg-localcount2
Changes since 1.462: +3 -3 lines
Diff to previous 1.462 (colored) to selected 1.271 (colored)

Add vfs_trybusy() and mountlist_iterator_trynext() and use it for the syncer.

Revision 1.462 / (download) - annotate - [select for diffs], Wed Apr 12 10:26:33 2017 UTC (6 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.461: +17 -30 lines
Diff to previous 1.461 (colored) to selected 1.271 (colored)

Switch vfs_vnode_lock_print() and printlockedvnodes() to _mountlist_next().

Switch sched_sync() and sysctl_kern_vnode() to mountlist iterator.

Revision 1.461 / (download) - annotate - [select for diffs], Fri Mar 31 08:38:14 2017 UTC (6 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: jdolecek-ncq-base, jdolecek-ncq
Changes since 1.460: +3 -3 lines
Diff to previous 1.460 (colored) to selected 1.271 (colored)

 Remove extra 0x. This bug was added when replacing bitmask_snprintf(9) with
snprintb(3) (in between NetBSD 5 and 6). Old bitmask_snprint(9) didn't add
0x" automatically for hexadecimal value, so old code used it with "0x%s".

Revision 1.460 / (download) - annotate - [select for diffs], Fri Feb 17 08:25:15 2017 UTC (7 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.459: +7 -3 lines
Diff to previous 1.459 (colored) to selected 1.271 (colored)

Let syncer try fstrans_start() before running VFS_SYNC() to get rid
of the syncer lock/unlock from vfs_suspend().

Revision 1.459 / (download) - annotate - [select for diffs], Wed Jan 11 14:52:02 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.458: +6 -6 lines
Diff to previous 1.458 (colored) to selected 1.271 (colored)

Adapt to the recent vnode changes.

Revision 1.458 / (download) - annotate - [select for diffs], Wed Jan 11 12:17:34 2017 UTC (7 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.457: +17 -2 lines
Diff to previous 1.457 (colored) to selected 1.271 (colored)

Add ddb command to find a vnode by the address of its lock.
This makes it much easier to convert lockstat traces into understandable
data.

Revision 1.457 / (download) - annotate - [select for diffs], Wed Jan 11 09:08:58 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.456: +3 -3 lines
Diff to previous 1.456 (colored) to selected 1.271 (colored)

Move vnode member v_lock as vi_lock to vnode_impl.h.

Revision 1.456 / (download) - annotate - [select for diffs], Wed Jan 11 09:07:57 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.455: +16 -10 lines
Diff to previous 1.455 (colored) to selected 1.271 (colored)

Move vnode member v_mntvnodes as vi_mntvnodes to vnode_impl.h.

Add an ugly hack so pstat.c may still traverse the list.

Revision 1.455 / (download) - annotate - [select for diffs], Wed Jan 11 09:06:57 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.454: +14 -12 lines
Diff to previous 1.454 (colored) to selected 1.271 (colored)

Move vnode members v_synclist_slot and v_synclist as vi_synclist_slot and
vi_synclist to vnode_impl.h.

Revision 1.454 / (download) - annotate - [select for diffs], Thu Jan 5 10:05:11 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.453: +9 -9 lines
Diff to previous 1.453 (colored) to selected 1.271 (colored)

Name all "vnode_impl_t" variables "vip".
No functional change.

Revision 1.453 / (download) - annotate - [select for diffs], Mon Jan 2 10:33:28 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.452: +3 -3 lines
Diff to previous 1.452 (colored) to selected 1.271 (colored)

Rename vget() to vcache_vget() and vcache_tryvget() respectively and
move the definitions to sys/vnode_impl.h.

No functional change intended.

Welcome to 7.99.54

Revision 1.452 / (download) - annotate - [select for diffs], Wed Dec 14 15:48:55 2016 UTC (7 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.451: +4 -4 lines
Diff to previous 1.451 (colored) to selected 1.271 (colored)

Move vnode members "v_freelisthd" and "v_freelist" from "struct vnode"
to "struct vnode_impl" and rename to "vi_lrulisthd" and "vi_lrulist".

No functional change intended.

Welcome to 7.99.48

Revision 1.451 / (download) - annotate - [select for diffs], Thu Nov 3 11:04:21 2016 UTC (7 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204
Changes since 1.450: +73 -37 lines
Diff to previous 1.450 (colored) to selected 1.271 (colored)

Add a function to print the fields of a vnode including its implementation
and use it from vprint() and vfs_vnode_print().

Move vstate_name() to vfs_subr.c.

Revision 1.450 / (download) - annotate - [select for diffs], Thu Nov 3 11:03:31 2016 UTC (7 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.449: +3 -5 lines
Diff to previous 1.449 (colored) to selected 1.271 (colored)

Split sys/vnode.h into sys/vnode.h and sys/vnode_impl.h
- Move _VFS_VNODE_PRIVATE protected operations into vnode_impl.h.
- Move struct vnode_impl definition and operations into vnode_impl.h.
- Include vnode_impl.h where we include vnode.h with _VFS_VNODE_PRIVATE defined.
- Get rid of _VFS_VNODE_PRIVATE.

Revision 1.449 / (download) - annotate - [select for diffs], Thu May 26 11:07:33 2016 UTC (7 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.448: +7 -2 lines
Diff to previous 1.448 (colored) to selected 1.271 (colored)

Merge the vnode and its corresponding vcache_node into one
vcache_node structure.

Print the vcache_node part in vprint() and vfs_vnode_print().

Presented on tech-kern@

Revision 1.448 / (download) - annotate - [select for diffs], Mon Aug 24 22:50:32 2015 UTC (8 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.447: +4 -2 lines
Diff to previous 1.447 (colored) to selected 1.271 (colored)

to garnish, dust with _KERNEL_OPT

Revision 1.447 / (download) - annotate - [select for diffs], Tue Jun 23 10:42:34 2015 UTC (8 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.446: +16 -35 lines
Diff to previous 1.446 (colored) to selected 1.271 (colored)

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.

Revision 1.446 / (download) - annotate - [select for diffs], Wed May 6 15:57:08 2015 UTC (8 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.445: +374 -6 lines
Diff to previous 1.445 (colored) to selected 1.271 (colored)

Remove miscfs/syncfs and

- move the syncer into kern/vfs_subr.c.

- change the syncer to process the mountlist and VFS_SYNC as appropriate.

- use an API for mount points similiar to the API for vnodes:
  - vfs_syncer_add_to_worklist(struct mount *mp) to add
  - vfs_syncer_remove_from_worklist(struct mount *mp) to remove a mount.

No objections on tech-kern@

Revision 1.445 / (download) - annotate - [select for diffs], Fri Sep 5 05:57:21 2014 UTC (9 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.444: +8 -8 lines
Diff to previous 1.444 (colored) to selected 1.271 (colored)

Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

Revision 1.444 / (download) - annotate - [select for diffs], Sat May 24 16:34:04 2014 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.443: +3 -3 lines
Diff to previous 1.443 (colored) to selected 1.271 (colored)

Introduce a selector function to the vfs vnode iterator so that we don't
need to vget() vnodes that we are not interested at, and optimize locking
a bit. Iterator changes reviewed by Hannken (thanks), the rest of the bugs
are mine.

Revision 1.443 / (download) - annotate - [select for diffs], Mon Mar 17 09:28:37 2014 UTC (10 years ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.442: +12 -29 lines
Diff to previous 1.442 (colored) to selected 1.271 (colored)

Change sysctl_kern_vnode() to use vfs_vnode_iterator.

Revision 1.442 / (download) - annotate - [select for diffs], Thu Feb 27 13:00:06 2014 UTC (10 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.441: +3 -3 lines
Diff to previous 1.441 (colored) to selected 1.271 (colored)

Currently dead vnodes still reside on the vnodelist of the file system
they have been removed from.

Create a "dead mount" that takes dead vnodes until they get freed.

Discussed on tech-kern.

Revision 1.441 / (download) - annotate - [select for diffs], Wed Nov 27 17:24:44 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.440: +4 -6 lines
Diff to previous 1.440 (colored) to selected 1.271 (colored)

Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQ
anymore, all the macros expand to NULL anyway, so this improves readability.
Requested by rmind@

Revision 1.440 / (download) - annotate - [select for diffs], Sat Nov 23 13:35:36 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.439: +4 -4 lines
Diff to previous 1.439 (colored) to selected 1.271 (colored)

change the mountlist CIRCLEQ into a TAILQ

Revision 1.439 / (download) - annotate - [select for diffs], Sun Oct 27 16:19:33 2013 UTC (10 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.438: +12 -12 lines
Diff to previous 1.438 (colored) to selected 1.271 (colored)

vttodt_tab: index in C99 way, makes it less error-prone.

Revision 1.438 / (download) - annotate - [select for diffs], Mon Sep 30 18:58:00 2013 UTC (10 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.437: +3 -3 lines
Diff to previous 1.437 (colored) to selected 1.271 (colored)

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>

Revision 1.437 / (download) - annotate - [select for diffs], Mon Mar 18 19:35:43 2013 UTC (11 years ago) by plunky
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.436: +3 -3 lines
Diff to previous 1.436 (colored) to selected 1.271 (colored)

C99 section 6.7.2.3 (Tags) Note 3 states that:

  A type specifier of the form

	enum identifier

  without an enumerator list shall only appear after the type it
  specifies is complete.

which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).

(ok elad@)

Revision 1.436 / (download) - annotate - [select for diffs], Wed Feb 13 14:03:48 2013 UTC (11 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.435: +7 -39 lines
Diff to previous 1.435 (colored) to selected 1.271 (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.435 / (download) - annotate - [select for diffs], Sat May 12 18:42:08 2012 UTC (11 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.434: +2 -5 lines
Diff to previous 1.434 (colored) to selected 1.271 (colored)

remove a bogus optimization introduced in the previous change.
fixes hangs in the rump/rumpvfs/t_etfs test.

Revision 1.434 / (download) - annotate - [select for diffs], Sun Apr 29 22:54:00 2012 UTC (11 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.433: +15 -8 lines
Diff to previous 1.433 (colored) to selected 1.271 (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.433 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:55 2012 UTC (12 years ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8
Changes since 1.432: +5 -3 lines
Diff to previous 1.432 (colored) to selected 1.271 (colored)

Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.

Revision 1.432 / (download) - annotate - [select for diffs], Wed Feb 1 05:34:41 2012 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.431: +3 -3 lines
Diff to previous 1.431 (colored) to selected 1.271 (colored)

Change the syscall API for quotas over to the new non-proplib one.

   - struct vfs_quotactl_args -> struct quotactl_args
   - add sys/stdint.h to sys/quotactl.h for clean userland build
   - install sys/quotactl.h in /usr/include
   - update set lists for same
   - add new marshalling code in libquota
   - add new unmarshalling code in vfs_syscalls.c
   - discard proplib interpreter code in vfs_quotactl.c
   - add dispatching code for the 14 quotactl ops in vfs_quotactl.c
   - mark the proplib quotactl syscall obsolete
   - add a new syscall number for the new quotactl syscall
   - change the name of the syscall to __quotactl()
   - remove the decl of the old quotactl from quota/quotaprop.h
   - add a decl of the new quotactl to sys/quotactl.h
   - update the libc build
   - update ktruss
   - remove proplib marshalling code from libquota
   - update copy of syscall table in gdb ppc sources
   - hack rumphijack to accomodate new quotactl name (as I recall,
     pooka wanted such a name change to simplify something, but I
     don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.

Revision 1.431 / (download) - annotate - [select for diffs], Sun Jan 29 07:14:38 2012 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.430: +4 -7 lines
Diff to previous 1.430 (colored) to selected 1.271 (colored)

Remove the extra op argument to VFS_QUOTACTL() - the op is now stored
purely in the args structure.

This change requires a kernel version bump.

Revision 1.430 / (download) - annotate - [select for diffs], Sun Jan 29 07:13:42 2012 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.429: +5 -2 lines
Diff to previous 1.429 (colored) to selected 1.271 (colored)

Tidy up the VFS_QUOTACTL interface. Renumber the command codes in a
logical order (as opposed to the previous order, which accumulated
arbitrarily), remove the separate codes for argument encoding as
there's now a 1-1 mapping between ops and argument substructures,
and assert in VFS_QUOTACTL() itself that the op in the args structure
matches the op passed directly.

This change requires a kernel version bump.

Revision 1.429 / (download) - annotate - [select for diffs], Sun Jan 29 06:36:06 2012 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.428: +4 -5 lines
Diff to previous 1.428 (colored) to selected 1.271 (colored)

Introduce struct vfs_quotactl_args. Use it.

This change uglifies vfs_quotactl some in order to make room for
moving operation-specific but FS-independent logic out of ufs_quota.c.

Note: this change requires a kernel version bump.

Revision 1.428 / (download) - annotate - [select for diffs], Sun Jan 29 06:34:57 2012 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.427: +5 -4 lines
Diff to previous 1.427 (colored) to selected 1.271 (colored)

Move the proplib-based quota command dispatching (that is, the code
that knows the magic string names for the allowed actions) out of
UFS-specific code and to fs-independent code.

This introduces QUOTACTL_* operation codes and changes the signature
of VFS_QUOTACTL() again for compile safety.

Note: this change requires a kernel version bump.

Revision 1.427 / (download) - annotate - [select for diffs], Sun Jan 29 06:32:43 2012 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.426: +4 -4 lines
Diff to previous 1.426 (colored) to selected 1.271 (colored)

Move the code for iterating over the multiple RPC calls in a quota
proplib XML packet to vfs_quotactl.c out of sys/ufs/ufs.

Add a dummy extra arg to VFS_QUOTACTL for compile safety.

Note: this change requires a kernel version bump.

Revision 1.426 / (download) - annotate - [select for diffs], Fri Dec 2 12:32:38 2011 UTC (12 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.425: +7 -2 lines
Diff to previous 1.425 (colored) to selected 1.271 (colored)

assertions

Revision 1.425 / (download) - annotate - [select for diffs], Thu Sep 1 09:04:08 2011 UTC (12 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.424: +4 -4 lines
Diff to previous 1.424 (colored) to selected 1.271 (colored)

Check for v_type before v_rdev because it is cheaper and safer.

Revision 1.424 / (download) - annotate - [select for diffs], Mon Jul 11 08:27:37 2011 UTC (12 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.423: +3 -3 lines
Diff to previous 1.423 (colored) to selected 1.271 (colored)

Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do.  Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

- change all occurences of VOP_BWRITE(bp) to VOP_BWRITE(bp->b_vp, bp).
- remove layer_bwrite().
- welcome to 5.99.55

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.

Revision 1.423 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:56 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.422: +18 -18 lines
Diff to previous 1.422 (colored) to selected 1.271 (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.422 / (download) - annotate - [select for diffs], Tue Apr 26 11:32:39 2011 UTC (12 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.421: +12 -7 lines
Diff to previous 1.421 (colored) to selected 1.271 (colored)

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

Welcome to 5.99.51.

Revision 1.421 / (download) - annotate - [select for diffs], Sat Apr 2 04:28:56 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.420: +357 -2427 lines
Diff to previous 1.420 (colored) to selected 1.271 (colored)

Split off parts of vfs_subr.c into vfs_vnode.c and vfs_mount.c modules.

No functional change.  Discussed on tech-kern@.

Revision 1.420 / (download) - annotate - [select for diffs], Sun Mar 6 17:08:36 2011 UTC (13 years ago) by bouyer
Branch: MAIN
Changes since 1.419: +4 -4 lines
Diff to previous 1.419 (colored) to selected 1.271 (colored)

merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.

Revision 1.419 / (download) - annotate - [select for diffs], Thu Feb 17 19:04:03 2011 UTC (13 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.418: +3 -6 lines
Diff to previous 1.418 (colored) to selected 1.271 (colored)

Since curlwp can't be NULL, just call vfs_shutdown1(curlwp).

Revision 1.418 / (download) - annotate - [select for diffs], Mon Jan 17 07:13:33 2011 UTC (13 years, 2 months ago) by uebayasi
Branch: MAIN
CVS Tags: bouyer-quota2-base
Branch point for: bouyer-quota2
Changes since 1.417: +3 -3 lines
Diff to previous 1.417 (colored) to selected 1.271 (colored)

Include internal definitions (uvm/uvm.h) only where necessary.

Revision 1.417 / (download) - annotate - [select for diffs], Fri Dec 17 22:04:42 2010 UTC (13 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr
Changes since 1.416: +3 -3 lines
Diff to previous 1.416 (colored) to selected 1.271 (colored)

0 -> NULL for a pointer

Revision 1.416 / (download) - annotate - [select for diffs], Thu Nov 11 13:58:58 2010 UTC (13 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.415: +3 -3 lines
Diff to previous 1.415 (colored) to selected 1.271 (colored)

vclean: fix a bug which makes getcleanvnode always cause VOP_INACTIVE.

Revision 1.415 / (download) - annotate - [select for diffs], Tue Aug 17 13:17:47 2010 UTC (13 years, 7 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3
Changes since 1.414: +5 -48 lines
Diff to previous 1.414 (colored) to selected 1.271 (colored)

Now that ffs on disk inodes get freed in the reclaim routine it is no longer
necessary for vget() to handle VI_INACTNOW as a special case.  Remove this
check and its support in vrelel().

Getting another reference while the freelist is locked is an error.  Replace
the check with a KASSERT.

Revision 1.414 / (download) - annotate - [select for diffs], Thu Jul 29 10:54:50 2010 UTC (13 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.413: +4 -4 lines
Diff to previous 1.413 (colored) to selected 1.271 (colored)

Add vm page flag PG_MARKER and use it to tag dummy marker pages
in genfs_do_putpages() and uao_put().
Use 'v_uobj.uo_npages' to check for an empty memq.
Put some assertions where these marker pages may not appear.

Ok: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.413 / (download) - annotate - [select for diffs], Wed Jul 28 11:03:47 2010 UTC (13 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.412: +7 -7 lines
Diff to previous 1.412 (colored) to selected 1.271 (colored)

ext2fs,ffs: free on disk inodes in the reclaim routine.
Remove now unneeded vnode flag VI_FREEING.

Welcome to 5.99.38.

Ok: Andrew Doran <ad@netbsd.org>

Revision 1.412 / (download) - annotate - [select for diffs], Mon Jul 26 15:22:16 2010 UTC (13 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.411: +8 -9 lines
Diff to previous 1.411 (colored) to selected 1.271 (colored)

When both vget() and vrelel() call vn_lock() we know VI_XLOCK is clear.
No need to use LK_INTERLOCK or LK_RETRY here.
The return value of vn_lock() is already examined here.

Ok: Antti Kantee <pooka@netbsd.org>

Revision 1.411 / (download) - annotate - [select for diffs], Sun Jul 25 10:23:40 2010 UTC (13 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.410: +3 -2 lines
Diff to previous 1.410 (colored) to selected 1.271 (colored)

Add an assertion: it makes no sense to call vget() with LK_RETRY.

Revision 1.410 / (download) - annotate - [select for diffs], Wed Jul 21 17:52:12 2010 UTC (13 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.409: +6 -7 lines
Diff to previous 1.409 (colored) to selected 1.271 (colored)

Make holding v_interlock mandatory for callers of vget().

Announced some time ago on tech-kern.

Revision 1.409 / (download) - annotate - [select for diffs], Wed Jul 21 09:06:38 2010 UTC (13 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.408: +18 -12 lines
Diff to previous 1.408 (colored) to selected 1.271 (colored)

Using vfinddev() leads to vnode races as it returns an unreferenced
vnode that may disappear before the caller has a chance to reference it.

Reference the vnode while the specfs cache is locked.

Welcome to 5.99.37.

No objections on tech-kern.

Revision 1.408 / (download) - annotate - [select for diffs], Thu Jul 1 13:00:56 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.407: +6 -54 lines
Diff to previous 1.407 (colored) to selected 1.271 (colored)

Remove vlockmgr().  Generic vnode lock operations now use a rwlock located
in the vnode.  All LK_* flags move from sys/lock.h to sys/vnode.h.  Calls
to vlockmgr() in file systems get replaced with VOP_LOCK() or VOP_UNLOCK().

Welcome to 5.99.34.

Discussed on tech-kern.

Revision 1.407 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:12 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.406: +6 -6 lines
Diff to previous 1.406 (colored) to selected 1.271 (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.406 / (download) - annotate - [select for diffs], Thu Jun 24 07:54:47 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.405: +5 -11 lines
Diff to previous 1.405 (colored) to selected 1.271 (colored)

Clean up vnode lock operations:

 - VOP_LOCK(vp, flags): Limit the set of allowed flags to LK_EXCLUSIVE,
   LK_SHARED and LK_NOWAIT.  LK_INTERLOCK is no longer allowed as it
   makes no sense here.

- VOP_ISLOCKED(vp): Remove the for some time unused return value
  LK_EXCLOTHER.  Mark this operation as "diagnostic only".
  Making a lock decision based on this operation is no longer allowed.

Discussed on tech-kern.

Revision 1.405 / (download) - annotate - [select for diffs], Fri Jun 18 16:29:02 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.404: +12 -28 lines
Diff to previous 1.404 (colored) to selected 1.271 (colored)

Remove the concept of recursive vnode locks by eliminating
vn_setrecurse(), vn_restorerecurse() and LK_CANRECURSE.
Welcome to 5.99.31

Discussed on tech-kern.

Revision 1.404 / (download) - annotate - [select for diffs], Sun Jun 6 08:01:31 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.403: +4 -6 lines
Diff to previous 1.403 (colored) to selected 1.271 (colored)

Change layered file systems to always pass the locking VOP's down to the
leaf file system.  Remove now unused member v_vnlock from struct vnode.
Welcome to 5.99.30

Discussed on tech-kern.

Revision 1.403 / (download) - annotate - [select for diffs], Thu May 27 23:58:38 2010 UTC (13 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.402: +7 -3 lines
Diff to previous 1.402 (colored) to selected 1.271 (colored)

.. except we need to check the flag while still clinging to iLock.

Revision 1.402 / (download) - annotate - [select for diffs], Thu May 27 23:54:35 2010 UTC (13 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.401: +7 -6 lines
Diff to previous 1.401 (colored) to selected 1.271 (colored)

Assert that a VI_CLEAN vnode is not succesfully vget'd.

Revision 1.401 / (download) - annotate - [select for diffs], Mon May 24 03:50:25 2010 UTC (13 years, 10 months ago) by pgoyette
Branch: MAIN
Changes since 1.400: +8 -2 lines
Diff to previous 1.400 (colored) to selected 1.271 (colored)

Protect against attempting to load modules from the filesystem until we
have mounted the root file-system.  This allows us to load built-in and
boot-loader-provided modules much earlier during startup.

Revision 1.400 / (download) - annotate - [select for diffs], Fri Apr 30 10:03:13 2010 UTC (13 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.399: +23 -2 lines
Diff to previous 1.399 (colored) to selected 1.271 (colored)

Add translation from vtype to dirent type.  Convert rumpfs now.
I'll convert the rest of the file servers in need after the next
version bump to avoid the coding module crisis.

Revision 1.399 / (download) - annotate - [select for diffs], Sun Apr 25 15:56:00 2010 UTC (13 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.398: +20 -12 lines
Diff to previous 1.398 (colored) to selected 1.271 (colored)

- console spam.
- atomic_dec_uint -> vfs_destroy.

Revision 1.398 / (download) - annotate - [select for diffs], Thu Feb 11 23:16:35 2010 UTC (14 years, 1 month ago) by haad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.397: +24 -3 lines
Diff to previous 1.397 (colored) to selected 1.271 (colored)

Add vrele_async routine which asynchronously release vnodes in different contex
and in some time in the future.

Ok: ad@.

Revision 1.397 / (download) - annotate - [select for diffs], Fri Jan 15 19:28:26 2010 UTC (14 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.396: +2 -0 lines
Diff to previous 1.396 (colored) to selected 1.271 (colored)

Revert previous. The KASSERT() is right and my analysis is wrong,
as pointed out by pooka@.

Revision 1.396 / (download) - annotate - [select for diffs], Thu Jan 14 22:41:52 2010 UTC (14 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.395: +2 -4 lines
Diff to previous 1.395 (colored) to selected 1.271 (colored)

Remove KASSERT(vp->v_usecount == 1) in getnewvnode() and ungetnewvnode().
Another process could be vget()ing the vnode and bump v_usecount while
getcleanvnode() is vclean()ing it (as vclean drops the interlock).
vget() will then wait for VI_XLOCK or VI_FREEING to clear; and we could test
this assertion while the other process is still slepping. We could even
end up in ungetnewvnode() before this other process got a chance to run.

Revision 1.395 / (download) - annotate - [select for diffs], Fri Jan 8 13:07:26 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.394: +2 -24 lines
Diff to previous 1.394 (colored) to selected 1.271 (colored)

vcount() lost its purpose when opening multiple block devices was
made impossible, oh, two years ago.  nuke it (yes, the interface
name is overgeneric).

Revision 1.394 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:10 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.393: +4 -4 lines
Diff to previous 1.393 (colored) to selected 1.271 (colored)

The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change

Revision 1.393 / (download) - annotate - [select for diffs], Thu Jan 7 19:54:40 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.392: +4 -3 lines
Diff to previous 1.392 (colored) to selected 1.271 (colored)

Make sure struct vattr contains no random bits of kernel memory
after vattr_null().  This is especially nice considering things
like puffs, where the contents are copied to userspace.

Revision 1.392 / (download) - annotate - [select for diffs], Sat Nov 28 10:10:17 2009 UTC (14 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.391: +20 -4 lines
Diff to previous 1.391 (colored) to selected 1.271 (colored)

Previous did cause a deadlock with layered FS: the vrele thread
can sleep on the vnode lock, while vget is sleeping on the
VI_INACTNOW flag (or the vget caller is looping on vget returning failure
because of the VI_INACTNOW flag). With layered FSes, the upper and lower
vnodes share the same lock, so the vget() caller above can be already
holding the vnode lock.

Fix by dropping VI_INACTNOW before sleeping on the vnode lock in
vrelel(), and check the ref count again once we have the lock. If the
vnode has more than one reference, donc VOP_INACTIVE it.
Fix PR kern/42318 and PR kern/42377
patch tested by Hisashi T Fujinaka, Joachim Kig, Stephen Borrill and
Matthias Scheler.

Revision 1.391 / (download) - annotate - [select for diffs], Fri Nov 27 16:43:51 2009 UTC (14 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.390: +29 -2 lines
Diff to previous 1.390 (colored) to selected 1.271 (colored)

Move rootfs-related init from init_main() to vfs_mountroot().
Reduces code re-written in rump.

Revision 1.390 / (download) - annotate - [select for diffs], Thu Nov 26 20:52:19 2009 UTC (14 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.389: +5 -2 lines
Diff to previous 1.389 (colored) to selected 1.271 (colored)

Add DV_VIRTUAL for non-backed virtual devices and allow to mount
root from a DV_VIRTUAL device.

Revision 1.389 / (download) - annotate - [select for diffs], Thu Nov 19 03:01:05 2009 UTC (14 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.388: +7 -7 lines
Diff to previous 1.388 (colored) to selected 1.271 (colored)

Fix indentation, wrap long line and remove unused variable.

Revision 1.388 / (download) - annotate - [select for diffs], Thu Nov 19 02:59:33 2009 UTC (14 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.387: +4 -2 lines
Diff to previous 1.387 (colored) to selected 1.271 (colored)

Add missing vfs_unbusy() call in error path of sysctl_kern_vnode().
This allows us to reboot machine successfully even if pstat -v fails once.

Revision 1.387 / (download) - annotate - [select for diffs], Tue Nov 17 22:20:14 2009 UTC (14 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.386: +3 -3 lines
Diff to previous 1.386 (colored) to selected 1.271 (colored)

Fix getcleanvnode() in previous: in the if (vp->v_usecount != 0)
case we didn't bump the refcount, so don't decrease it through vrelel().
call mutex_exit() on v_interlock directly instead.

Revision 1.386 / (download) - annotate - [select for diffs], Thu Nov 5 08:18:02 2009 UTC (14 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.385: +31 -2 lines
Diff to previous 1.385 (colored) to selected 1.271 (colored)

getcleanvnode(): don't vclean() the vnode if it has gained another
  reference while we were getting the v_interlock.
vget(): attempt prevent it from returning a clean vnode:
  if the vnode is being inactivated (by vrelel()), wait for
  vrelel() to complete (or return EBUSY if we can't wait), and return
  ENOENT if the vnode has been vclean'ed by vrelel()
Fix kern/41147 in a better way, hopefully fix other related race conditions.

Revision 1.385 / (download) - annotate - [select for diffs], Tue Oct 6 04:28:10 2009 UTC (14 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.384: +75 -2 lines
Diff to previous 1.384 (colored) to selected 1.271 (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.384 / (download) - annotate - [select for diffs], Sat Sep 19 16:20:41 2009 UTC (14 years, 6 months ago) by jmcneill
Branch: MAIN
Changes since 1.383: +31 -2 lines
Diff to previous 1.383 (colored) to selected 1.271 (colored)

If vfs_mountroot fails, print a list of supported file systems. If no
file systems are supported by the kernel, print a big fat warning instead.

Revision 1.383 / (download) - annotate - [select for diffs], Fri Jun 26 18:58:14 2009 UTC (14 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.382: +2 -4 lines
Diff to previous 1.382 (colored) to selected 1.271 (colored)

Cosmetic: remove #if 1 / #endif.

Revision 1.382 / (download) - annotate - [select for diffs], Fri Jun 26 18:53:07 2009 UTC (14 years, 9 months ago) by dyoung
Branch: MAIN
Changes since 1.381: +77 -9 lines
Diff to previous 1.381 (colored) to selected 1.271 (colored)

Keep a generation number, mountgen, that increases every time a
filesystem is mounted.  Synchronize access to the number with a
mutex.  When a struct mount, mp, is allocated, assign the current
generation number to mp->mnt_gen.  Introduce vfs_unmount_forceone()
that forcefully unmounts the most recently mounted filesystem.

Refactor: extract vfs_shutdown1() from vfs_shutdown().  Extract
vfs_sync_all() from vfs_shutdown1().

Print more progress indications while we're unmounting all of the
filesystems during shutdown.

We increase the reference count on mp before calling dounmount(mp),
but we do not decrease it if dounmount(mp) fails, and neither does
dounmount(mp).  So decrease the reference count if dounmount(mp)
fails.

Change the loop terminating condition in vfs_unmountall1() to (mp
!= (void *)&mountlist) from !CIRCLEQ_EMPTY(&mountlist), because we
may not ever empty the list, especially if we're not forcing the
filesystems to unmount.

Revision 1.381 / (download) - annotate - [select for diffs], Tue Jun 23 23:04:11 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.380: +3 -3 lines
Diff to previous 1.380 (colored) to selected 1.271 (colored)

Wow... too much Python.

Fix DIAGNOSTIC build breakage: print -> printf.

Pointed out by Kurt Schreiner on current-users@:

    http://mail-index.netbsd.org/current-users/2009/06/23/msg009815.html

Revision 1.380 / (download) - annotate - [select for diffs], Tue Jun 23 19:36:38 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.379: +8 -54 lines
Diff to previous 1.379 (colored) to selected 1.271 (colored)

Move the implementation of vaccess() to genfs_can_access(), in line with
the other routines of the same spirit.

Adjust file-system code to use it.

Keep vaccess() for KPI compatibility and to keep element of least
surprise. A "diagnostic" message warning that vaccess() is deprecated will
be printed when it's used (obviously, only in DIAGNOSTIC kernels).

No objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005310.html

Revision 1.379 / (download) - annotate - [select for diffs], Sat May 16 08:29:53 2009 UTC (14 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4
Changes since 1.378: +20 -7 lines
Diff to previous 1.378 (colored) to selected 1.271 (colored)

put a flag bit into v_usecount to prevent vtryget during getcleanvnode.
this fixes the following deadlock.

	a thread doing getcleanvnode:
	pick a vnode
	acqure v_interlock
	v_usecount++
	call vclean

		now, another thread doing cache_lookup:
		picks the vnode
		vtryget succeed
		vn_lock succeed

	now in vclean:
	set VI_XLOCK (too late to be noticed by the competing thread)
	wait on the vnode lock (this might violate locking order)

the use of a flag bit was suggested by Andrew Doran.  PR/41374.

Revision 1.378 / (download) - annotate - [select for diffs], Sun May 3 16:52:54 2009 UTC (14 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, jym-xensuspend-base
Changes since 1.377: +4 -4 lines
Diff to previous 1.377 (colored) to selected 1.271 (colored)

Include some debug print routines if DEBUGPRINT is defined.  This
way they can be included without having to include DDB.
(arguably all print routines should be behind #ifdef DEBUGPRINT
and options DDB should define that macro, but I'll tackle that later)

Revision 1.377 / (download) - annotate - [select for diffs], Wed Apr 29 15:44:55 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.376: +18 -11 lines
Diff to previous 1.376 (colored) to selected 1.271 (colored)

Extract vfs_unmountall1() from vfs_unmountall() for reuse.

Revision 1.376 / (download) - annotate - [select for diffs], Wed Apr 29 01:03:43 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-hppapmap-base4
Changes since 1.375: +27 -13 lines
Diff to previous 1.375 (colored) to selected 1.271 (colored)

Extract common code from vfs_rootmountalloc(9) and mount_domount() into
a new struct mount-allocation routine, vfs_mountalloc(9).  Documentation
updates will follow.

Attention: Synchronization Oversight Committee!  In mount_domount(),
I postpone the call mutex_enter(&mp->mnt_updating) until right before
the VFS_MOUNT(9) call because (1) that looks to me like the earliest
possible opportunity for mp to become visible to any other LWP, because
it was just kmem_zalloc(9)'d and (2) it made extracting the common code
much easier.  Tell me if my reasoning is faulty.

Revision 1.375 / (download) - annotate - [select for diffs], Sat Apr 25 18:53:44 2009 UTC (14 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.374: +5 -6 lines
Diff to previous 1.374 (colored) to selected 1.271 (colored)

Replace a NULL check that can never fire with a KASSERT().

Okay ad@.

(this change was originally part of the following commit:
    http://mail-index.netbsd.org/source-changes/2009/04/25/msg220346.html)

Revision 1.374 / (download) - annotate - [select for diffs], Wed Apr 22 22:57:09 2009 UTC (14 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.373: +2 -145 lines
Diff to previous 1.373 (colored) to selected 1.271 (colored)

Per discussion on tech-kern@:

  - Replace use of label/goto with returns

  - Rename, change prototype of, and move functions from vfs_subr.c to
    genfs_vnops.c

Revision 1.373 / (download) - annotate - [select for diffs], Tue Apr 21 00:02:37 2009 UTC (14 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.372: +3 -3 lines
Diff to previous 1.372 (colored) to selected 1.271 (colored)

fix an indentation error.  no functional change.

Revision 1.372 / (download) - annotate - [select for diffs], Mon Apr 20 18:06:26 2009 UTC (14 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.371: +146 -2 lines
Diff to previous 1.371 (colored) to selected 1.271 (colored)

Refactor some duplicated file-system code.

Proposed and received no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/18/msg004843.html

Revision 1.371 / (download) - annotate - [select for diffs], Fri Apr 17 20:22:52 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.370: +12 -8 lines
Diff to previous 1.370 (colored) to selected 1.271 (colored)

Make vfs_unmountall() return true if it was able to unmount any
filesystem at all, false otherwise.  This will support tearing down
stacks of filesystems, ccd(4), raid(4), and vnd(4).

Change the misleading variable name 'allerror' to 'any_error'.  Make it
a bool.

Revision 1.370 / (download) - annotate - [select for diffs], Mon Mar 30 16:38:05 2009 UTC (15 years ago) by yamt
Branch: MAIN
Changes since 1.369: +3 -3 lines
Diff to previous 1.369 (colored) to selected 1.271 (colored)

ARRAY_PRINT: 0 is a valid index.

Revision 1.369 / (download) - annotate - [select for diffs], Sun Feb 22 20:28:06 2009 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.368: +4 -5 lines
Diff to previous 1.368 (colored) to selected 1.271 (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.368 / (download) - annotate - [select for diffs], Thu Feb 5 13:37:24 2009 UTC (15 years, 1 month ago) by enami
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.367: +7 -2 lines
Diff to previous 1.367 (colored) to selected 1.271 (colored)

Make revoke(2) works as before:
- vfs_syscalls.c rev. 1.342 fails to invert condition correcly when
  then-clause and else-clause is swapped.  Since then, revoke(2) fails
  if it is issued by file owner.
- Probably since rev. 1.160 of genfs_vnops.c, revoke(2) fails if it is
  applied to non-device file and drops kernel into ddb.

Revision 1.367 / (download) - annotate - [select for diffs], Wed Jan 21 00:54:05 2009 UTC (15 years, 2 months ago) by enami
Branch: MAIN
Changes since 1.366: +3 -3 lines
Diff to previous 1.366 (colored) to selected 1.271 (colored)

Fix a bug introduced by rev. 1.311.  Make the kern.vnode sysctl to expose
correct address of each vnode to userland again.

Revision 1.366 / (download) - annotate - [select for diffs], Sat Jan 17 07:02:35 2009 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.365: +3 -5 lines
Diff to previous 1.365 (colored) to selected 1.271 (colored)

malloc -> kmem_alloc.

Revision 1.365 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:53 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.364: +7 -5 lines
Diff to previous 1.364 (colored) to selected 1.271 (colored)

merge christos-time_t

Revision 1.364 / (download) - annotate - [select for diffs], Sat Jan 3 03:31:23 2009 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: christos-time_t-nbase, christos-time_t-base
Changes since 1.363: +3 -3 lines
Diff to previous 1.363 (colored) to selected 1.271 (colored)

remove extra semicolons.

Revision 1.363 / (download) - annotate - [select for diffs], Mon Dec 29 17:41:18 2008 UTC (15 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.362: +18 -18 lines
Diff to previous 1.362 (colored) to selected 1.271 (colored)

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

Revision 1.362 / (download) - annotate - [select for diffs], Fri Dec 19 17:11:57 2008 UTC (15 years, 3 months ago) by pgoyette
Branch: MAIN
Changes since 1.361: +13 -5 lines
Diff to previous 1.361 (colored) to selected 1.271 (colored)

Store config(1)'s root filesystem type as a text string rather than
embedding the address of its xxx_mountroot() in swapnetbsd.c.  This
permits booting of kernels with hard-wired filesystem type even if the
filesystem is in a loadable module (ie, not linked into the kernel
image).

Discussed on current-users.  Tested on amd64 and i386 with both hard-
wired and '?' filesystem times, and on both modular and monolithic
kernels.

Thanks to pooka@ for code review and suggestions.

Addresses my PR kern/40167

Revision 1.361 / (download) - annotate - [select for diffs], Tue Dec 16 22:35:37 2008 UTC (15 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.360: +11 -11 lines
Diff to previous 1.360 (colored) to selected 1.271 (colored)

replace bitmask_snprintf(9) with snprintb(3)

Revision 1.360 / (download) - annotate - [select for diffs], Sun Dec 14 11:15:59 2008 UTC (15 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.359: +3 -3 lines
Diff to previous 1.359 (colored) to selected 1.271 (colored)

vclean: be paranoid and set v_tag, v_op while holding v_interlock.
FS code could check their values while scrolling through mnt_vnodelist.

Revision 1.359 / (download) - annotate - [select for diffs], Sun Dec 14 11:13:36 2008 UTC (15 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.358: +8 -5 lines
Diff to previous 1.358 (colored) to selected 1.271 (colored)

- vrelel: fix broken "dead but not clean" assertion. The vnode can be
  dead and dirty if cleaning is in progress.
- Add an assertion, fix some text.

Revision 1.358 / (download) - annotate - [select for diffs], Sun Dec 7 20:58:46 2008 UTC (15 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base
Changes since 1.357: +3 -43 lines
Diff to previous 1.357 (colored) to selected 1.271 (colored)

Move some sysctl node creations away from linksets and into the
constructors for subsystems.

XXX: CTLFLAG_PERMANENT is non-sensible.

Revision 1.357 / (download) - annotate - [select for diffs], Wed Sep 24 09:33:40 2008 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.356: +4 -3 lines
Diff to previous 1.356 (colored) to selected 1.271 (colored)

PR kern/39307 mfs will sometimes panic at umount time

In vfs_destroy, assert that the refcount is not dropping below zero.

Revision 1.356 / (download) - annotate - [select for diffs], Sun Sep 7 13:09:36 2008 UTC (15 years, 6 months ago) by tron
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.355: +2 -3 lines
Diff to previous 1.355 (colored) to selected 1.271 (colored)

Remove duplicate definition of "specfs_lock".
Patch provided by Juan RP in PR kern/39493.

Revision 1.355 / (download) - annotate - [select for diffs], Thu Jul 31 05:38:05 2008 UTC (15 years, 8 months ago) by simonb
Branch: MAIN
Changes since 1.354: +9 -3 lines
Diff to previous 1.354 (colored) to selected 1.271 (colored)

Merge the simonb-wapbl branch.  From the original branch commit:

   Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.

Revision 1.354 / (download) - annotate - [select for diffs], Sun Jul 27 15:08:37 2008 UTC (15 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.353: +3 -3 lines
Diff to previous 1.353 (colored) to selected 1.271 (colored)

Adjust comment location to make it make sense.

no functional change

Revision 1.353 / (download) - annotate - [select for diffs], Wed Jul 16 20:06:19 2008 UTC (15 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.352: +1262 -36 lines
Diff to previous 1.352 (colored) to selected 1.271 (colored)

vfs_subr2 has lost its will to live.  vfs_subr was originally split
into two parts so that some of the routines could be used by rump.
Now that rump uses both vfs_subr and vfs_subr2 and there is no
reason to keep two files lying around, re-unite them.

Revision 1.352 / (download) - annotate - [select for diffs], Mon Jul 7 14:15:41 2008 UTC (15 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.351: +4 -4 lines
Diff to previous 1.351 (colored) to selected 1.271 (colored)

Force vrele_thread to run in vflush() only if there is vrele_pending.
Makes unmounting a file system in a forcibly singlethreaded rump
invocation work.

Revision 1.351 / (download) - annotate - [select for diffs], Mon Jun 23 11:23:39 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Branch point for: haad-dm
Changes since 1.350: +18 -4 lines
Diff to previous 1.350 (colored) to selected 1.271 (colored)

PR kern/38990: Unmounting a disk fails the first time

vflush: process vrele_list at least once before looking at the mount.

Revision 1.350 / (download) - annotate - [select for diffs], Thu Jun 5 12:32:57 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.349: +10 -7 lines
Diff to previous 1.349 (colored) to selected 1.271 (colored)

Avoid "free vnode isn't" assertion.

Revision 1.349 / (download) - annotate - [select for diffs], Tue Jun 3 14:54:12 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.348: +32 -2 lines
Diff to previous 1.348 (colored) to selected 1.271 (colored)

vtryget: try to get an initial reference to a vnode without taking its
interlock. Only works if v_usecount is already non-zero, which is nearly
always true for busy files like libc.so or ld_elf.so.

Revision 1.348 / (download) - annotate - [select for diffs], Mon Jun 2 22:56:09 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.347: +5 -6 lines
Diff to previous 1.347 (colored) to selected 1.271 (colored)

Avoid assertion failures. From drochner@.

Revision 1.347 / (download) - annotate - [select for diffs], Mon Jun 2 19:20:22 2008 UTC (15 years, 9 months ago) by drochner
Branch: MAIN
Changes since 1.346: +3 -3 lines
Diff to previous 1.346 (colored) to selected 1.271 (colored)

adjust a KASSERT to reality after atomic vnode usecount changes

Revision 1.346 / (download) - annotate - [select for diffs], Mon Jun 2 16:25:34 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.345: +54 -30 lines
Diff to previous 1.345 (colored) to selected 1.271 (colored)

Use atomics to maintain v_usecount.

Revision 1.345 / (download) - annotate - [select for diffs], Tue May 27 17:49:07 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.344: +3 -3 lines
Diff to previous 1.344 (colored) to selected 1.271 (colored)

tsleep -> kpause

Revision 1.344 / (download) - annotate - [select for diffs], Tue May 6 18:43:44 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.343: +39 -138 lines
Diff to previous 1.343 (colored) to selected 1.271 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.

Revision 1.343 / (download) - annotate - [select for diffs], Tue May 6 12:39:32 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.342: +5 -2 lines
Diff to previous 1.342 (colored) to selected 1.271 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

vfs_busy: don't deadlock if curlwp is unmounting.

Revision 1.342 / (download) - annotate - [select for diffs], Tue May 6 12:37:04 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.341: +4 -6 lines
Diff to previous 1.341 (colored) to selected 1.271 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

getvnode: Use vfs_trybusy, not vfs_busy. If unmount is in progress we
could deadlock, because vnode locks can be held during getnewvnode().
dounmount() locks in the reverse order (vfs_busy -> vnode).

Revision 1.341 / (download) - annotate - [select for diffs], Mon May 5 17:08:54 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.340: +4 -2 lines
Diff to previous 1.340 (colored) to selected 1.271 (colored)

vfs_dobusy: add assertions.

Revision 1.340 / (download) - annotate - [select for diffs], Fri May 2 17:40:30 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.339: +20 -13 lines
Diff to previous 1.339 (colored) to selected 1.271 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

Until the code paths are fixed properly, put in place an ugly workaround
to make it safe to recursively acquire a read lock on a mount.

Revision 1.339 / (download) - annotate - [select for diffs], Wed Apr 30 12:49:16 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.338: +41 -19 lines
Diff to previous 1.338 (colored) to selected 1.271 (colored)

PR kern/38135 vfs_busy/vfs_trybusy confusion

The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.

Revision 1.338 / (download) - annotate - [select for diffs], Tue Apr 29 23:51:04 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.337: +62 -45 lines
Diff to previous 1.337 (colored) to selected 1.271 (colored)

kern/38135 vfs_busy/vfs_trybusy confusion

The symptom was that sometimes file systems would occasionally not appear
in output from 'df' or 'mount' if the system was busy. Resolution:

- Make mount locks work somewhat like vm_map locks.
- vfs_trybusy() now only fails if the mount is gone, or if someone is
  unmounting the file system. Simple contention on mnt_lock doesn't
  cause it to fail.
- vfs_busy() will wait even if the file system is being unmounted.

Revision 1.337 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:05 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.336: +2 -9 lines
Diff to previous 1.336 (colored) to selected 1.271 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.336 / (download) - annotate - [select for diffs], Fri Apr 4 20:13:18 2008 UTC (15 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.335: +4 -4 lines
Diff to previous 1.335 (colored) to selected 1.271 (colored)

use device_xname() where appropriate
OK martin

Revision 1.335 / (download) - annotate - [select for diffs], Sun Feb 24 23:16:24 2008 UTC (16 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: christos-time_t
Changes since 1.334: +3 -3 lines
Diff to previous 1.334 (colored) to selected 1.271 (colored)

typo patrol

Revision 1.334 / (download) - annotate - [select for diffs], Fri Feb 15 13:06:02 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.333: +19 -4 lines
Diff to previous 1.333 (colored) to selected 1.271 (colored)

vflush: yield at least every 100ms. PR kern/38034.

Revision 1.333 / (download) - annotate - [select for diffs], Tue Feb 5 15:13:25 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.332: +6 -4 lines
Diff to previous 1.332 (colored) to selected 1.271 (colored)

vrevoke: if the vnode is already being cleaned out, then ignore it. We
don't need to do anything. PR kern/27622.

Revision 1.332 / (download) - annotate - [select for diffs], Tue Feb 5 14:19:52 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.331: +3 -3 lines
Diff to previous 1.331 (colored) to selected 1.271 (colored)

Lock v_knlist with the vnode interlock. PR kern/37881.

Revision 1.331 / (download) - annotate - [select for diffs], Fri Feb 1 08:53:19 2008 UTC (16 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.330: +3 -2 lines
Diff to previous 1.330 (colored) to selected 1.271 (colored)

Initialise mnt_renamelock in vfs_rootmountalloc.

Revision 1.330 / (download) - annotate - [select for diffs], Wed Jan 30 15:00:52 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.329: +0 -6 lines
Diff to previous 1.329 (colored) to selected 1.271 (colored)

Back out previous to let rump compile. Needs to be handled differently.

Revision 1.329 / (download) - annotate - [select for diffs], Wed Jan 30 14:53:41 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.328: +8 -2 lines
Diff to previous 1.328 (colored) to selected 1.271 (colored)

vlockstatus: return LK_EXCLOTHER as appropriate, for LFS. XXX

Revision 1.328 / (download) - annotate - [select for diffs], Wed Jan 30 12:33:45 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.327: +4 -4 lines
Diff to previous 1.327 (colored) to selected 1.271 (colored)

vlockmgr: return EBUSY when trylock fails, not EDEADLK.
Pointed out by yamt@.

Revision 1.327 / (download) - annotate - [select for diffs], Wed Jan 30 11:47:01 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.326: +121 -68 lines
Diff to previous 1.326 (colored) to selected 1.271 (colored)

PR kern/37706 (forced unmount of file systems is unsafe):

- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.

Revision 1.326 / (download) - annotate - [select for diffs], Wed Jan 30 09:50:22 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.325: +66 -4 lines
Diff to previous 1.325 (colored) to selected 1.271 (colored)

Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.

Revision 1.325 / (download) - annotate - [select for diffs], Mon Jan 28 18:24:05 2008 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.324: +6 -5 lines
Diff to previous 1.324 (colored) to selected 1.271 (colored)

Don't open-code CIRCLEQ, but use CIRCLEQ_*() macros, instead.

Revision 1.324 / (download) - annotate - [select for diffs], Sun Jan 27 22:47:31 2008 UTC (16 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.323: +13 -13 lines
Diff to previous 1.323 (colored) to selected 1.271 (colored)

Replace vrelel() 010101-mania with a flags parameter.  However,
leave flags unimplemented for a while (no change in functionality).

Revision 1.323 / (download) - annotate - [select for diffs], Sat Jan 26 22:53:10 2008 UTC (16 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.322: +2 -3 lines
Diff to previous 1.322 (colored) to selected 1.271 (colored)

opt_inet.h is no longer necessary

Revision 1.322 / (download) - annotate - [select for diffs], Fri Jan 25 16:59:31 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.321: +2 -3 lines
Diff to previous 1.321 (colored) to selected 1.271 (colored)

vrelel: remove a bogus KASSERT.

Revision 1.321 / (download) - annotate - [select for diffs], Thu Jan 24 21:04:12 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.320: +4 -3 lines
Diff to previous 1.320 (colored) to selected 1.271 (colored)

Fix broken assertion.

Revision 1.320 / (download) - annotate - [select for diffs], Thu Jan 24 18:31:52 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.319: +11 -3 lines
Diff to previous 1.319 (colored) to selected 1.271 (colored)

Fix 'panic: dangling vnode'.

Revision 1.319 / (download) - annotate - [select for diffs], Thu Jan 24 17:57:14 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.318: +3 -3 lines
Diff to previous 1.318 (colored) to selected 1.271 (colored)

vclean: fix inverted test.

Revision 1.318 / (download) - annotate - [select for diffs], Thu Jan 24 17:32:54 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.317: +56 -213 lines
Diff to previous 1.317 (colored) to selected 1.271 (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.317 / (download) - annotate - [select for diffs], Thu Jan 17 19:23:13 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.316: +5 -4 lines
Diff to previous 1.316 (colored) to selected 1.271 (colored)

vrevoke: fix a couple of botches.

Revision 1.316 / (download) - annotate - [select for diffs], Thu Jan 17 17:28:55 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.315: +69 -9 lines
Diff to previous 1.315 (colored) to selected 1.271 (colored)

Fix v_freelisthd assertion failure during call to vdevdone(). No calling
VOPs without a vnode reference!

Revision 1.315 / (download) - annotate - [select for diffs], Thu Jan 17 13:06:04 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.314: +23 -8 lines
Diff to previous 1.314 (colored) to selected 1.271 (colored)

- Ignore clean vnodes in vflush(). May fix false EBUSY when unmounting.
- Use vrelel() where v_usecount might become 0. Could fix "vnode sez".
- Add some assertions, fix a lock leak.

Revision 1.314 / (download) - annotate - [select for diffs], Thu Jan 10 13:05:01 2008 UTC (16 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.313: +3 -3 lines
Diff to previous 1.313 (colored) to selected 1.271 (colored)

Terminate mntonname at [1] instead of [0].

fixes kern/37735 by Tobias Nygren

Revision 1.313 / (download) - annotate - [select for diffs], Wed Jan 9 21:29:38 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.312: +9 -7 lines
Diff to previous 1.312 (colored) to selected 1.271 (colored)

vget: don't leak a reference if LK_NOWAIT and the vnode has VI_XLOCK set.

Revision 1.312 / (download) - annotate - [select for diffs], Wed Jan 9 16:15:22 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.311: +28 -21 lines
Diff to previous 1.311 (colored) to selected 1.271 (colored)

Go back to freeing on disk inodes in the inactive routine. It would be
better not to do this, but it rules out potential side effects with softdep.

Revision 1.311 / (download) - annotate - [select for diffs], Mon Jan 7 16:12:55 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.310: +15 -8 lines
Diff to previous 1.310 (colored) to selected 1.271 (colored)

Patch up sysctl locking:

- Lock processes, credentials, filehead etc correctly.
- Acquire a read hold on sysctl_treelock if only doing a query.
- Don't wire down the output buffer. It doesn't work correctly and the code
  regularly does long term sleeps with it held - it's not worth it.
- Don't hold locks other than sysctl_lock while doing copyout().
- Drop sysctl_lock while doing copyout / allocating memory in a few places.
- Don't take kernel_lock for sysctl.
- Fix a number of bugs spotted along the way

Revision 1.310 / (download) - annotate - [select for diffs], Thu Jan 3 01:26:30 2008 UTC (16 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.309: +12 -12 lines
Diff to previous 1.309 (colored) to selected 1.271 (colored)

valloc -> vnalloc, vfree -> vnfree
Avoids collision with userland valloc(3).

no functional change
ad ok

Revision 1.309 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:56 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.308: +697 -523 lines
Diff to previous 1.308 (colored) to selected 1.271 (colored)

Merge vmlocking2 to head.

Revision 1.308 / (download) - annotate - [select for diffs], Sat Dec 1 10:36:47 2007 UTC (16 years, 4 months ago) by yamt
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.307: +2 -3 lines
Diff to previous 1.307 (colored) to selected 1.271 (colored)

getnewvnode: remove a homegrown decl. of uvm_vnodeops.

Revision 1.307 / (download) - annotate - [select for diffs], Thu Nov 29 18:07:11 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.306: +9 -8 lines
Diff to previous 1.306 (colored) to selected 1.271 (colored)

Use atomics to maintain uvmexp.{anon,exec,file}pages.

Revision 1.306 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:07 2007 UTC (16 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.305: +9 -11 lines
Diff to previous 1.305 (colored) to selected 1.271 (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.305 / (download) - annotate - [select for diffs], Sun Nov 4 17:31:16 2007 UTC (16 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs
Changes since 1.304: +3 -3 lines
Diff to previous 1.304 (colored) to selected 1.271 (colored)

fix comment: suspendsched() removes user process*es* from the runqueue

Revision 1.304 / (download) - annotate - [select for diffs], Tue Oct 23 19:40:53 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.303: +4 -3 lines
Diff to previous 1.303 (colored) to selected 1.271 (colored)

Clear VV_LOCKSWORK from the correct field.

Revision 1.303 / (download) - annotate - [select for diffs], Thu Oct 11 19:53:42 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.302: +2 -3 lines
Diff to previous 1.302 (colored) to selected 1.271 (colored)

Remove LOCK_ASSERT(!simple_lock_held(&foo));

Revision 1.302 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:27 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.301: +68 -52 lines
Diff to previous 1.301 (colored) to selected 1.271 (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.301 / (download) - annotate - [select for diffs], Sun Oct 7 13:39:03 2007 UTC (16 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.300: +2 -6 lines
Diff to previous 1.300 (colored) to selected 1.271 (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.300 / (download) - annotate - [select for diffs], Tue Aug 14 13:51:31 2007 UTC (16 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.299: +2 -361 lines
Diff to previous 1.299 (colored) to selected 1.271 (colored)

more vfs_subr -> vfs_subr2 dance for rump:
vwakeup, vinvalbuf, vtruncbuf, vflushbuf, bgetvp, brelvp, reassignbuf

Revision 1.299 / (download) - annotate - [select for diffs], Thu Aug 9 20:55:30 2007 UTC (16 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.298: +2 -90 lines
Diff to previous 1.298 (colored) to selected 1.271 (colored)

do the shuffle: move mount_specificdata stuff from vfs_subr to vfs_subr2

Revision 1.298 / (download) - annotate - [select for diffs], Thu Aug 9 08:51:21 2007 UTC (16 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.297: +32 -9 lines
Diff to previous 1.297 (colored) to selected 1.271 (colored)

Instead of having lfs muck directly about with vnode free lists,
introduce vrele2(), which allows to release vnodes the way lfs
sometimes wants it:
  + without calling inactive
  + inserting the vnode at the head of the freelist (this is a very
    questionable optimization that isn't even enabled by default,
    but I went along with the same semantics for now)

Revision 1.297 / (download) - annotate - [select for diffs], Mon Aug 6 17:09:11 2007 UTC (16 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64
Changes since 1.296: +3 -2 lines
Diff to previous 1.296 (colored) to selected 1.271 (colored)

Initialize size of outsize-of-fs device vnodes also, since they
can migrate to file systems due to checkalias() and cause KASSERT
panics.

fixes nfsroot panic reported by martin

Revision 1.296 / (download) - annotate - [select for diffs], Sun Jul 29 14:44:08 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: hpcarm-cleanup
Branch point for: jmcneill-pm
Changes since 1.295: +7 -546 lines
Diff to previous 1.295 (colored) to selected 1.271 (colored)

Split vfs_subr.c into routines which need much of the kernel
infrastructure (vfs_subr.c) and routines which need little or none
of the kernel infra (vfs_subr2.c).

Revision 1.295 / (download) - annotate - [select for diffs], Sun Jul 29 12:40:37 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.294: +9 -5 lines
Diff to previous 1.294 (colored) to selected 1.271 (colored)

Define a new lockmgr flag LK_RESURRECT which can be used in
conjunction with LK_DRAIN.  This has the same effect as LK_DRAIN
except it atomically does NOT mark the lock as drained.  This
guarantees that when we got the lock, we were the last one currently
waiting for the lock.

Use LK_DRAIN|LK_RESURRECT in vclean() to make sure there are no
waiters for the lock.  This should fix behaviour theoretized to be
caused by vfs_subr.c 1.289 which caused vclean() to run into
completion and free the vnode before all lock-waiters had been
processed.  Should therefore fix the "simple_lock: unitialized lock"
problems seen recently.

thanks to Juergen Hannken-Illjes for some analysis of the problem
and Erik Bertelsen for testing

Revision 1.294 / (download) - annotate - [select for diffs], Sun Jul 29 10:00:15 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.293: +4 -5 lines
Diff to previous 1.293 (colored) to selected 1.271 (colored)

Print also the topmost flag hex in vprint().

fun fact: this bug was introduced over 10 years ago, so I don't
think anyone has really keenly missed it.

Revision 1.293 / (download) - annotate - [select for diffs], Sat Jul 28 08:19:36 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.292: +2 -5 lines
Diff to previous 1.292 (colored) to selected 1.271 (colored)

minor header cleanup

Revision 1.292 / (download) - annotate - [select for diffs], Fri Jul 27 14:25:21 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.291: +2 -99 lines
Diff to previous 1.291 (colored) to selected 1.271 (colored)

Move vfs_attach(), vfs_detach() and vfs_reinit() from vfs_subr.c
to vfs_init.c.  This permits easier standalone compilation of these
routines.

Revision 1.291 / (download) - annotate - [select for diffs], Tue Jul 17 21:14:05 2007 UTC (16 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: nick-csl-alignment-base
Branch point for: nick-csl-alignment
Changes since 1.290: +13 -7 lines
Diff to previous 1.290 (colored) to selected 1.271 (colored)

- get rid of MFSNAMELEN
- use strlcpy instead of strncpy.
- make sure some uses of statvfs strings are NUL terminated
  XXX: more work needs to be done on that.

Revision 1.290 / (download) - annotate - [select for diffs], Tue Jul 17 11:19:34 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.289: +4 -4 lines
Diff to previous 1.289 (colored) to selected 1.271 (colored)

Make set_statvfs_info() take a parameter for the vfs name instead
of always retrieving it from mp->mnt_op->vfs_name

christos ok

Revision 1.289 / (download) - annotate - [select for diffs], Mon Jul 9 11:35:20 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: mjf-ufs-trans-base
Changes since 1.288: +9 -6 lines
Diff to previous 1.288 (colored) to selected 1.271 (colored)

Don't drain a vnode's lock when we are cleaning it out.  It still
might be used by upper layers in the vnode stack due to exported
lock pointers.  This introduces no difference to the normal case
and works around a problem where a lower layer vnode is cleaned
out before the upper layer due to forced unmount or revoke.  And
for cosmetics, set a vnode's lock export to NULL when it is cleaned
out.

per discussion with Bill Stouder-Studenmund on tech-kern

Revision 1.288 / (download) - annotate - [select for diffs], Tue Jun 5 12:31:31 2007 UTC (16 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.287: +5 -5 lines
Diff to previous 1.287 (colored) to selected 1.271 (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.287 / (download) - annotate - [select for diffs], Mon Apr 16 05:14:54 2007 UTC (16 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.286: +3 -3 lines
Diff to previous 1.286 (colored) to selected 1.271 (colored)

define a pager flag PGO_RECLAIM, similar to FSYNC_RECLAIM, and use it
to skip unnecessary flushing when layered file system vnodes are recycled.
this also prevents a deadlock with the dodgy LFS putpages routine.
fixes the non-LFS part of PR 36150.

Revision 1.286 / (download) - annotate - [select for diffs], Sun Apr 8 11:20:43 2007 UTC (16 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.285: +2 -5 lines
Diff to previous 1.285 (colored) to selected 1.271 (colored)

Remove now obsolete vn_start_write() and vn_finished_write() and
corresponding flags.

Revert softdep_trackbufs() to its state before vn_start_write() was added.

Remove from struct mount now unneeded flags IMNT_SUSPEND* and
members mnt_writeopcountupper, mnt_writeopcountlower and mnt_leaf.

Welcome to 4.99.17

Revision 1.285 / (download) - annotate - [select for diffs], Tue Apr 3 16:11:31 2007 UTC (16 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.284: +3 -10 lines
Diff to previous 1.284 (colored) to selected 1.271 (colored)

Remove calls to now obsolete vn_start_write() and vn_finished_write().

Revision 1.284 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:35 2007 UTC (17 years ago) by ad
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.283: +3 -3 lines
Diff to previous 1.283 (colored) to selected 1.271 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.283 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:11 2007 UTC (17 years ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.282: +10 -10 lines
Diff to previous 1.282 (colored) to selected 1.271 (colored)

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

Revision 1.282 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:05 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.281: +3 -3 lines
Diff to previous 1.281 (colored) to selected 1.271 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.281 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:32 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.280: +7 -11 lines
Diff to previous 1.280 (colored) to selected 1.271 (colored)

Merge newlock2 to head.

Revision 1.280 / (download) - annotate - [select for diffs], Fri Jan 19 14:49:10 2007 UTC (17 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.279: +2 -56 lines
Diff to previous 1.279 (colored) to selected 1.271 (colored)

New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE.  This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).

Revision 1.279 / (download) - annotate - [select for diffs], Mon Jan 15 19:13:30 2007 UTC (17 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.278: +4 -9 lines
Diff to previous 1.278 (colored) to selected 1.271 (colored)

TAILQ_INIT a mountpoint's vnode queue and always add vnodes to the
tail instead of an explicit check to add to the head for an empty
queue.  Apparently TAILQ_INSERT_HEAD happens to work for a
non-initialized head and does implicit initialization so that
TAILQ_INSERT_TAIL works after that.

Revision 1.278 / (download) - annotate - [select for diffs], Thu Jan 4 17:38:27 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.277: +3 -3 lines
Diff to previous 1.277 (colored) to selected 1.271 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.277 / (download) - annotate - [select for diffs], Wed Dec 27 12:22:14 2006 UTC (17 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.276: +2 -3 lines
Diff to previous 1.276 (colored) to selected 1.271 (colored)

remove now unused vnode::v_lease.

Revision 1.276 / (download) - annotate - [select for diffs], Fri Nov 17 17:05:18 2006 UTC (17 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.275: +79 -2 lines
Diff to previous 1.275 (colored) to selected 1.271 (colored)

Add specificdata support to mount points.

Welcome to NetBSD 4.99.4

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

Revision 1.275 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:59 2006 UTC (17 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.274: +3 -3 lines
Diff to previous 1.274 (colored) to selected 1.271 (colored)

remove some __unused from function parameters.

Revision 1.274 / (download) - annotate - [select for diffs], Sun Oct 22 00:48:14 2006 UTC (17 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.273: +4 -2 lines
Diff to previous 1.273 (colored) to selected 1.271 (colored)

avoid yet another GCC warning only exposed at -O3.

Revision 1.273 / (download) - annotate - [select for diffs], Fri Oct 20 20:29:52 2006 UTC (17 years, 5 months ago) by reinoud
Branch: MAIN
Changes since 1.272: +9 -4 lines
Diff to previous 1.272 (colored) to selected 1.271 (colored)

Back out TAILQ_FOREACH in the vflush() since vgone() and vclean() are
called, the TAILQ_NEXT() derefers 0xdeadbeef....

Implemented again using an explicit `for' loop that keep the next pointer
available.

Revision 1.272 / (download) - annotate - [select for diffs], Fri Oct 20 18:58:12 2006 UTC (17 years, 5 months ago) by reinoud
Branch: MAIN
Changes since 1.271: +23 -22 lines
Diff to previous 1.271 (colored)

Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.

Revision 1.271 / (download) - annotate - [selected], Thu Oct 12 01:32:19 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.270: +3 -3 lines
Diff to previous 1.270 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.270 / (download) - annotate - [select for diffs], Thu Oct 5 14:48:32 2006 UTC (17 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.269: +4 -4 lines
Diff to previous 1.269 (colored) to selected 1.271 (colored)

add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).

Revision 1.269 / (download) - annotate - [select for diffs], Thu Aug 24 01:08:00 2006 UTC (17 years, 7 months ago) by jld
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.268: +15 -15 lines
Diff to previous 1.268 (colored) to selected 1.271 (colored)

Add %'s to go with PRI format constants.

Revision 1.268 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:12 2006 UTC (17 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored) to selected 1.271 (colored)

Use the LWP cached credentials where sane.

Revision 1.267 / (download) - annotate - [select for diffs], Fri Jun 23 14:13:02 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6
Changes since 1.266: +7 -0 lines
Diff to previous 1.266 (colored) to selected 1.271 (colored)

fix a simonb-timecounters regression.
the precision of getnanotime() is not suitable for file timestamps.
esp. when it's nfs-exported.

- introduce vfs_timestamp().
  (the name is from freebsd.  currently merely a wrapper of nanotime())
- for ufs-like filesystems, use it rather than getnanotime().

XXX check other filesystems.

Revision 1.266 / (download) - annotate - [select for diffs], Sun May 14 21:15:12 2006 UTC (17 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: gdamore-uart
Changes since 1.265: +13 -8 lines
Diff to previous 1.265 (colored) to selected 1.271 (colored)

integrate kauth.

Revision 1.265 / (download) - annotate - [select for diffs], Sat Feb 25 07:11:31 2006 UTC (18 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, 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.264: +7 -7 lines
Diff to previous 1.264 (colored) to selected 1.271 (colored)

Fix PR 32923 by ensuring we have non-NULL LWP in vfs_shutdown.

Revision 1.264 / (download) - annotate - [select for diffs], Tue Feb 21 04:32:39 2006 UTC (18 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.263: +5 -5 lines
Diff to previous 1.263 (colored) to selected 1.271 (colored)

Use device_class() instead of accessing dv_class directly.

Revision 1.263 / (download) - annotate - [select for diffs], Sun Feb 12 01:32:06 2006 UTC (18 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.262: +9 -2 lines
Diff to previous 1.262 (colored) to selected 1.271 (colored)

convert "magiclinks" from a per-fs mount option to a system-wide sysctl.
as discussed on tech-kern quite some time ago.

Revision 1.262 / (download) - annotate - [select for diffs], Sat Feb 4 12:01:26 2006 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.261: +5 -4 lines
Diff to previous 1.261 (colored) to selected 1.271 (colored)

vfs_buf_print: print b_rawblkno as well.

Revision 1.261 / (download) - annotate - [select for diffs], Wed Jan 18 14:26:55 2006 UTC (18 years, 2 months ago) by reinoud
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.260: +4 -2 lines
Diff to previous 1.260 (colored) to selected 1.271 (colored)

vfs_mountedon() can only and only handle special device nodes and will
otherwise generate an UVM trap or will access random memory. This is due to
the dereference of vp->v_specmountpoint that is really
vp->v_specinfo->si_mountpoint. The field v_specinfo is multiplexed with
other structs in the vun union in struct vnode like struct socket.

The patch adds a sanity check for accessing the specinfo fields by only
allowing VBLK nodes to be passed. In theory also VCHR could be valid since
its also a special node though mounting is only done on VBLK so be strict.

Ok'd by yamt.

Revision 1.260 / (download) - annotate - [select for diffs], Mon Jan 16 21:44:46 2006 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.259: +8 -10 lines
Diff to previous 1.259 (colored) to selected 1.271 (colored)

make some functions static.

Revision 1.259 / (download) - annotate - [select for diffs], Sat Dec 31 14:05:01 2005 UTC (18 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.258: +8 -5 lines
Diff to previous 1.258 (colored) to selected 1.271 (colored)

checkalias: redo rev.1.231 differently.
check v_specinfo rather than using LK_SLEEPFAIL.

Revision 1.258 / (download) - annotate - [select for diffs], Tue Dec 27 04:06:46 2005 UTC (18 years, 3 months ago) by chs
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.257: +4 -4 lines
Diff to previous 1.257 (colored) to selected 1.271 (colored)

changes for making DIAGNOSTIC not change the kernel ABI:
 - for structure fields that are conditionally present,
   make those fields always present.
 - for functions which are conditionally inline, make them never inline.
 - remove some other functions which are conditionally defined but
   don't actually do anything anymore.
 - make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.

Revision 1.257 / (download) - annotate - [select for diffs], Fri Dec 23 15:31:40 2005 UTC (18 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.256: +4 -29 lines
Diff to previous 1.256 (colored) to selected 1.271 (colored)

prevent in-core vnode being freed from getting new references.
otherwise, once the corresponding bit in the inode bitmap is cleared,
an unrelated inode with the same inode number can be allocated and
ufs_ihashget() picks a stale in-core vnode for it.

PR/32301 by Matthias Scheler.

Revision 1.256 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:30 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.255: +46 -46 lines
Diff to previous 1.255 (colored) to selected 1.271 (colored)

merge ktrace-lwp.

Revision 1.255 / (download) - annotate - [select for diffs], Tue Nov 29 22:52:02 2005 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.254: +7 -2 lines
Diff to previous 1.254 (colored) to selected 1.271 (colored)

merge yamt-readahead branch.

Revision 1.254 / (download) - annotate - [select for diffs], Fri Sep 23 12:10:33 2005 UTC (18 years, 6 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead
Changes since 1.253: +2 -320 lines
Diff to previous 1.253 (colored) to selected 1.271 (colored)

Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.

Revision 1.253 / (download) - annotate - [select for diffs], Tue Sep 13 01:45:14 2005 UTC (18 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.252: +2 -62 lines
Diff to previous 1.252 (colored) to selected 1.271 (colored)

move compat code to the compat tree.

Revision 1.252 / (download) - annotate - [select for diffs], Sat Jul 23 12:18:41 2005 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.251: +6 -6 lines
Diff to previous 1.251 (colored) to selected 1.271 (colored)

update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

Revision 1.251 / (download) - annotate - [select for diffs], Sun Jul 10 22:10:00 2005 UTC (18 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.250: +2 -48 lines
Diff to previous 1.250 (colored) to selected 1.271 (colored)

Move the rest of the extattr stuff into vfs_xattr.c

Revision 1.250 / (download) - annotate - [select for diffs], Sun Jun 19 18:22:36 2005 UTC (18 years, 9 months ago) by elad
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.249: +2 -6 lines
Diff to previous 1.249 (colored) to selected 1.271 (colored)

- Avoid pollution of struct vnode. Save the fingerprint evaluation status
  in the veriexec table entry; the lookups are very cheap now. Suggested
  by Chuq.

- Handle non-regular (!VREG) files correctly).

- Remove (no longer needed) FINGERPRINT_NOENTRY.

Revision 1.249 / (download) - annotate - [select for diffs], Wed Jun 15 16:59:27 2005 UTC (18 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.248: +3 -2 lines
Diff to previous 1.248 (colored) to selected 1.271 (colored)

Set the veriexec table entry pointer to NULL in getnewvnode().

Revision 1.248 / (download) - annotate - [select for diffs], Mon Jun 6 12:09:19 2005 UTC (18 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.247: +4 -8 lines
Diff to previous 1.247 (colored) to selected 1.271 (colored)

introduce a macro to initialize uvm_object and use it.

Revision 1.247 / (download) - annotate - [select for diffs], Sun Jun 5 23:47:48 2005 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.246: +66 -168 lines
Diff to previous 1.246 (colored) to selected 1.271 (colored)

Use ANSI function decls.

Revision 1.246 / (download) - annotate - [select for diffs], Mon May 30 22:15:38 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.245: +7 -7 lines
Diff to previous 1.245 (colored) to selected 1.271 (colored)

rename delay.

Revision 1.245 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.244: +23 -23 lines
Diff to previous 1.244 (colored) to selected 1.271 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.244 / (download) - annotate - [select for diffs], Wed Apr 20 13:44:46 2005 UTC (18 years, 11 months ago) by blymn
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.243: +3 -3 lines
Diff to previous 1.243 (colored) to selected 1.271 (colored)

Rototill of the verified exec functionality.
  * We now use hash tables instead of a list to store the in kernel
    fingerprints.
  * Fingerprint methods handling has been made more flexible, it is now
    even simpler to add new methods.
  * the loader no longer passes in magic numbers representing the
    fingerprint method so veriexecctl is not longer kernel specific.
  * fingerprint methods can be tailored out using options in the kernel
    config file.
  * more fingerprint methods added - rmd160, sha256/384/512
  * veriexecctl can now report the fingerprint methods supported by the
    running kernel.
  * regularised the naming of some portions of veriexec.

Revision 1.243 / (download) - annotate - [select for diffs], Wed Mar 2 11:05:34 2005 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.242: +5 -3 lines
Diff to previous 1.242 (colored) to selected 1.271 (colored)

Copyright maintenance.

Revision 1.242 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:56 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
Changes since 1.241: +4 -4 lines
Diff to previous 1.241 (colored) to selected 1.271 (colored)

nuke trailing whitespace

Revision 1.241 / (download) - annotate - [select for diffs], Sun Jan 23 18:41:56 2005 UTC (19 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km
Changes since 1.240: +4 -3 lines
Diff to previous 1.240 (colored) to selected 1.271 (colored)

Change initialzie of domains to use link sets.  Switch to using STAILQ.
Add a convenience macro DOMAIN_FOREACH to interate through the domain.

Revision 1.240 / (download) - annotate - [select for diffs], Wed Jan 12 21:51:52 2005 UTC (19 years, 2 months ago) by christos
Branch: MAIN
Branch point for: kent-audio2
Changes since 1.239: +3 -3 lines
Diff to previous 1.239 (colored) to selected 1.271 (colored)

s/vp->v_uobj.vmobjlock/vp->v_interlock/. This is the last instance in kern/*.c

Revision 1.239 / (download) - annotate - [select for diffs], Sun Jan 9 03:11:48 2005 UTC (19 years, 2 months ago) by mycroft
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Changes since 1.238: +24 -7 lines
Diff to previous 1.238 (colored) to selected 1.271 (colored)

Rework the mountroot interface so that vfs_mountroot() opens the root device
and just passes it on to the file system functions.  This avoids opening and
closing the device several times.

Mentioned on tech-kern some time ago, IIRC.  I've been running this for a
long time.

Revision 1.238 / (download) - annotate - [select for diffs], Sun Jan 2 16:08:29 2005 UTC (19 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.237: +48 -2 lines
Diff to previous 1.237 (colored) to selected 1.271 (colored)

Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.

Revision 1.237 / (download) - annotate - [select for diffs], Sat Dec 18 03:07:40 2004 UTC (19 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.236: +18 -80 lines
Diff to previous 1.236 (colored) to selected 1.271 (colored)

- Move string array definitions and bitmap array definitions to the appropriate
  header files, so that they don't become out of sync (again).
- Use bitmask_snprintf() instead of hand-rolled code.
- Always check array bounds before dereferencing print arrays.
- Order arguments in the vnode printing functions consistently.

Revision 1.236 / (download) - annotate - [select for diffs], Sun Nov 14 00:36:21 2004 UTC (19 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.235: +2 -3 lines
Diff to previous 1.235 (colored) to selected 1.271 (colored)

vgoneall is no more. remove redundant decl.

Revision 1.235 / (download) - annotate - [select for diffs], Wed Sep 22 11:47:23 2004 UTC (19 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.234: +5 -3 lines
Diff to previous 1.234 (colored) to selected 1.271 (colored)

Add "unmounting disks..." [unmount] " done" to vfs_unmountall(),
so the user has some idea what's occurring after "syncing disks... done"

Revision 1.234 / (download) - annotate - [select for diffs], Tue Sep 21 03:10:35 2004 UTC (19 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.233: +3 -3 lines
Diff to previous 1.233 (colored) to selected 1.271 (colored)

Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made.  Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP.  Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
  set.  Some file systems (e.g. specfs) don't even bother with vnode
  locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
  vnode locking problems, not the least of which is the "use SHARED for
  VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.

Revision 1.233 / (download) - annotate - [select for diffs], Mon Sep 13 19:45:21 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.232: +3 -2 lines
Diff to previous 1.232 (colored) to selected 1.271 (colored)

copy_statvfs_info(): copy f_namemax too

Revision 1.232 / (download) - annotate - [select for diffs], Sun Aug 15 07:19:54 2004 UTC (19 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.231: +4 -4 lines
Diff to previous 1.231 (colored) to selected 1.271 (colored)

Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.

Revision 1.231 / (download) - annotate - [select for diffs], Fri Aug 13 22:48:06 2004 UTC (19 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.230: +59 -54 lines
Diff to previous 1.230 (colored) to selected 1.271 (colored)

There is an annoying deadlock that goes like this:
* Process A is closing one file descriptor belonging to a device.  In doing so,
  ffs_update() is called and starts writing a block synchronously.  (Note: This
  leaves the vnode locked.  It also has other instances -- stdin, et al -- of
  the same device open, so v_usecount is definitely non-zero.)
* Process B does a revoke() on the device.  The revoke() has to wait for the
  vnode to be unlocked because ffs_update() is still in progress.
* Process C tries to open() the device.  It wedges in checkalias() repeatedly
  calling vget() because it returns EBUSY immediately.

To fix, this:
* checkalias() now uses LK_SLEEPFAIL rather than LK_NOWAIT.  Therefore it will
  wait for the vnode to become unlocked, but it will recheck that it is on the
  hash list, in case it was in the process of being revoke()d or was revoke()d
  again before we were woken up.
* Since we're relying on the vnode lock to tell us that the vnode hasn't been
  removed from the hash list *anyway*, I have moved the code to remove it into
  the DOCLOSE section of vclean(), inside the vnode lock.

In the example at hand, process A was sh(1), process B was a child of init(8),
and process C was syslogd(8).

Revision 1.230 / (download) - annotate - [select for diffs], Thu Jul 1 10:03:29 2004 UTC (19 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.229: +3 -2 lines
Diff to previous 1.229 (colored) to selected 1.271 (colored)

Keep a pointer to the leaf mount. Needed for write gating where a
file system gets suspended and has layered mounts above it.

Welcome to 2.0G

Reviewed by: Bill Studenmund <wrstuden@netbsd.org>

Revision 1.229 / (download) - annotate - [select for diffs], Sat Jun 19 06:20:02 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.228: +10 -5 lines
Diff to previous 1.228 (colored) to selected 1.271 (colored)

getcleanvnode: fix spurious ENFILE.
try vnode_hold_list if none of vnodes on vnode_free_list are re-usable.

Revision 1.228 / (download) - annotate - [select for diffs], Wed Jun 16 12:35:51 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.227: +4 -6 lines
Diff to previous 1.227 (colored) to selected 1.271 (colored)

getcleanvnode: don't try to reclaim a vnode marked as VXLOCK.
fix crashes with VOP_RECLAIM implementations which might block.
(eg. layered filesystems)

Revision 1.227 / (download) - annotate - [select for diffs], Wed Jun 16 12:32:51 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.226: +6 -2 lines
Diff to previous 1.226 (colored) to selected 1.271 (colored)

getcleanvnode: add a comment on a VLAYER hack.

Revision 1.226 / (download) - annotate - [select for diffs], Tue May 25 04:44:44 2004 UTC (19 years, 10 months ago) by atatat
Branch: MAIN
Changes since 1.225: +11 -6 lines
Diff to previous 1.225 (colored) to selected 1.271 (colored)

Sysctl descriptions under vfs subtree

Revision 1.225 / (download) - annotate - [select for diffs], Thu May 6 22:01:14 2004 UTC (19 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.224: +10 -4 lines
Diff to previous 1.224 (colored) to selected 1.271 (colored)

no need to cache_purge() in getnewvnode().
it should be already done by vclean().

Revision 1.224 / (download) - annotate - [select for diffs], Sun May 2 12:21:02 2004 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.223: +17 -11 lines
Diff to previous 1.223 (colored) to selected 1.271 (colored)

Add a mutex for mount point I/O and wait counters (i.e. the `mnt_wcnt',
`mnt_writeopcountupper' and `mnt_writeopcountlower' members).

Revision 1.223 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:41 2004 UTC (19 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.222: +4 -6 lines
Diff to previous 1.222 (colored) to selected 1.271 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.222 / (download) - annotate - [select for diffs], Thu Apr 22 03:47:58 2004 UTC (19 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.221: +4 -3 lines
Diff to previous 1.221 (colored) to selected 1.271 (colored)

Copy fsidx so that not to break binary compatibility of mountd etc.

Revision 1.221 / (download) - annotate - [select for diffs], Wed Apr 21 01:05:38 2004 UTC (19 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.220: +50 -36 lines
Diff to previous 1.220 (colored) to selected 1.271 (colored)

Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.

Revision 1.220 / (download) - annotate - [select for diffs], Mon Apr 19 00:15:55 2004 UTC (19 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.219: +61 -4 lines
Diff to previous 1.219 (colored) to selected 1.271 (colored)

Add "vfs.generic.fstypes" sysctl, which contains a space separate
list of file system types currently supported by the kernel.
Previously there wasn't an easy way to determine this.
(Code shamelessly cribbed from subr_disk.c::sysctl_hw_disknames().)

Use LIST_FOREACH() appropriately.

Revision 1.219 / (download) - annotate - [select for diffs], Fri Apr 16 09:59:32 2004 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.218: +3 -3 lines
Diff to previous 1.218 (colored) to selected 1.271 (colored)

checkalias: pass LK_NOWAIT to vget() while holding the spechash spinlock.

Revision 1.218 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:53 2004 UTC (20 years ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.217: +12 -7 lines
Diff to previous 1.217 (colored) to selected 1.271 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.217 / (download) - annotate - [select for diffs], Tue Mar 23 13:22:33 2004 UTC (20 years ago) by junyoung
Branch: MAIN
Changes since 1.216: +32 -32 lines
Diff to previous 1.216 (colored) to selected 1.271 (colored)

- Nuke __P().
- Drop trailing spaces.

Revision 1.216 / (download) - annotate - [select for diffs], Sat Feb 14 00:00:56 2004 UTC (20 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.215: +7 -2 lines
Diff to previous 1.215 (colored) to selected 1.271 (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.215 / (download) - annotate - [select for diffs], Wed Jan 14 11:28:05 2004 UTC (20 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.214: +5 -9 lines
Diff to previous 1.214 (colored) to selected 1.271 (colored)

bump vnode hold count for page cache as well
to resolve unfairness between page cache and traditional buffer cache.
pointed by enami tsugutomo on current-users@.

Revision 1.214 / (download) - annotate - [select for diffs], Sat Jan 10 17:16:38 2004 UTC (20 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.213: +50 -2 lines
Diff to previous 1.213 (colored) to selected 1.271 (colored)

Allow vfs_write_suspend() to wait if the file system is already
suspending.

Move vfs_write_suspend() and vfs_write_resume() from kern/vfs_vnops.c
to kern/vfs_subr.c.

Change vnode write gating in ufs/ffs/ffs_softdep.c (from FreeBSD).

When vnodes are throttled in softdep_trackbufs() check for
file system suspension every 10 msecs to avoid a deadlock.

Revision 1.213 / (download) - annotate - [select for diffs], Tue Dec 30 12:33:24 2003 UTC (20 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.212: +3 -55 lines
Diff to previous 1.212 (colored) to selected 1.271 (colored)

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.

Revision 1.212 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:24 2003 UTC (20 years, 3 months ago) by atatat
Branch: MAIN
Changes since 1.211: +74 -73 lines
Diff to previous 1.211 (colored) to selected 1.271 (colored)

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Dec 1 18:53:10 2003 UTC (20 years, 4 months ago) by dbj
Branch: MAIN
Changes since 1.210: +7 -3 lines
Diff to previous 1.210 (colored) to selected 1.271 (colored)

In vclean(DOCLOSE), if vinvalbuf fails because of a write error,
then redo the vinvalbuf without the V_SAVE which will force
unflushed buffers to be discarded.

Revision 1.210 / (download) - annotate - [select for diffs], Tue Nov 18 18:26:18 2003 UTC (20 years, 4 months ago) by dbj
Branch: MAIN
Changes since 1.209: +104 -2 lines
Diff to previous 1.209 (colored) to selected 1.271 (colored)

add "show mount" ddb command

Revision 1.209 / (download) - annotate - [select for diffs], Wed Nov 12 20:38:24 2003 UTC (20 years, 4 months ago) by dbj
Branch: MAIN
Changes since 1.208: +3 -3 lines
Diff to previous 1.208 (colored) to selected 1.271 (colored)

XXX an impossible malloc failure check in set_statfs_info

Revision 1.208 / (download) - annotate - [select for diffs], Wed Oct 15 11:29:01 2003 UTC (20 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.207: +15 -8 lines
Diff to previous 1.207 (colored) to selected 1.271 (colored)

Add the gating of system calls that cause modifications to the underlying
file system.
The function vfs_write_suspend stops all new write operations to a file
system, allows any file system modifying system calls already in progress
to complete, then sync's the file system to disk and returns. The
function vfs_write_resume allows the suspended write operations to
complete.

From FreeBSD with slight modifications.

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

Revision 1.207 / (download) - annotate - [select for diffs], Tue Oct 14 14:02:56 2003 UTC (20 years, 5 months ago) by dbj
Branch: MAIN
Changes since 1.206: +5 -5 lines
Diff to previous 1.206 (colored) to selected 1.271 (colored)

add mnt_iflag field to struct mount for internal flags
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD

Revision 1.206 / (download) - annotate - [select for diffs], Sun Sep 14 11:09:48 2003 UTC (20 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.205: +3 -3 lines
Diff to previous 1.205 (colored) to selected 1.271 (colored)

when allocating a new vnode,
increment numvnodes before releasing vnode_free_list_slock.

Revision 1.205 / (download) - annotate - [select for diffs], Thu Sep 11 15:34:26 2003 UTC (20 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.204: +6 -2 lines
Diff to previous 1.204 (colored) to selected 1.271 (colored)

acquire bqueue_slock around bremfree().

Revision 1.204 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:03 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.203: +3 -7 lines
Diff to previous 1.203 (colored) to selected 1.271 (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.203 / (download) - annotate - [select for diffs], Wed Jul 30 12:10:58 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.202: +4 -4 lines
Diff to previous 1.202 (colored) to selected 1.271 (colored)

eliminate v_id.

Revision 1.202 / (download) - annotate - [select for diffs], Wed Jul 30 12:09:47 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.201: +96 -49 lines
Diff to previous 1.201 (colored) to selected 1.271 (colored)

maintain the list of namecaches attached to the vnode.
it makes vnodes freeable.

Revision 1.201 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:33 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.200: +43 -43 lines
Diff to previous 1.200 (colored) to selected 1.271 (colored)

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

Revision 1.200 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:29 2003 UTC (20 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.199: +5 -6 lines
Diff to previous 1.199 (colored) to selected 1.271 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

Revision 1.199 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:59 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.198: +47 -46 lines
Diff to previous 1.198 (colored) to selected 1.271 (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.198 / (download) - annotate - [select for diffs], Fri May 23 01:45:07 2003 UTC (20 years, 10 months ago) by dbj
Branch: MAIN
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored) to selected 1.271 (colored)

use %PRIx64 instead of %x to print bp->b_lblkno and bp->b_blkno
in vfs_buf_print

Revision 1.197 / (download) - annotate - [select for diffs], Sat May 17 22:22:41 2003 UTC (20 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.196: +5 -4 lines
Diff to previous 1.196 (colored) to selected 1.271 (colored)

Use aprint_normal() for the non-error (and thus non-interative) case
of mounting the root file system.

Revision 1.196 / (download) - annotate - [select for diffs], Fri May 16 14:40:42 2003 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.195: +10 -10 lines
Diff to previous 1.195 (colored) to selected 1.271 (colored)

use strlcat

Revision 1.195 / (download) - annotate - [select for diffs], Fri May 16 14:01:56 2003 UTC (20 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.194: +74 -27 lines
Diff to previous 1.194 (colored) to selected 1.271 (colored)

Fix a variety of kernel panics related to unchecked export data:
1. sa_len was not properly checked.
2. sa_family was not properly checked [even used as an array index!]
3. we only know about inet4 and inet6, so make sure that the corresponding
   data is valid before using it.
4. keep reference counts of addresses used (is that necessary?)

Revision 1.194 / (download) - annotate - [select for diffs], Tue Apr 22 13:11:23 2003 UTC (20 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.193: +3 -3 lines
Diff to previous 1.193 (colored) to selected 1.271 (colored)

fix wrong calculation. pointed by enami.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Apr 18 22:44:45 2003 UTC (20 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.192: +16 -6 lines
Diff to previous 1.192 (colored) to selected 1.271 (colored)

make the copy_statfs_args() function copy all the fields that are not
set by the filesystems. Before my changes, the statfs code depended
on calling it with mp->mnt_stat, and did not explicitly initialize
anything!

Revision 1.192 / (download) - annotate - [select for diffs], Wed Apr 16 21:44:20 2003 UTC (20 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.191: +86 -2 lines
Diff to previous 1.191 (colored) to selected 1.271 (colored)

PR/1796: John Kohl: statfs misbehaves under chrooted environments.

- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.

Revision 1.191 / (download) - annotate - [select for diffs], Thu Apr 3 09:13:10 2003 UTC (21 years ago) by enami
Branch: MAIN
Changes since 1.190: +6 -4 lines
Diff to previous 1.190 (colored) to selected 1.271 (colored)

Set va_birthtime field in vattr_null().

Revision 1.190 / (download) - annotate - [select for diffs], Tue Feb 25 23:35:03 2003 UTC (21 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.189: +15 -18 lines
Diff to previous 1.189 (colored) to selected 1.271 (colored)

it appears one list of vnode type names should be enough

Revision 1.189 / (download) - annotate - [select for diffs], Tue Feb 25 23:01:40 2003 UTC (21 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.188: +3 -3 lines
Diff to previous 1.188 (colored) to selected 1.271 (colored)

make iftovt_tab[] const

Revision 1.188 / (download) - annotate - [select for diffs], Tue Feb 18 20:37:38 2003 UTC (21 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.187: +6 -5 lines
Diff to previous 1.187 (colored) to selected 1.271 (colored)

add "VT_SMBFS" to vnode_tags[]
constify vnode_tags[] and vnode_types[]

Revision 1.187 / (download) - annotate - [select for diffs], Wed Feb 5 21:38:42 2003 UTC (21 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.186: +39 -12 lines
Diff to previous 1.186 (colored) to selected 1.271 (colored)

Make the buffer cache code MP-safe.

Revision 1.186 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:45 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.185: +4 -2 lines
Diff to previous 1.185 (colored) to selected 1.271 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Jan 20 23:59:14 2003 UTC (21 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.184: +5 -5 lines
Diff to previous 1.184 (colored) to selected 1.271 (colored)

The hunt to make sync work from ddb again begins here.
Protect against lwp null dereference. set proc p properly.

Revision 1.184 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:38 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.183: +6 -4 lines
Diff to previous 1.183 (colored) to selected 1.271 (colored)

Merge the nathanw_sa branch.

Revision 1.183 / (download) - annotate - [select for diffs], Sun Dec 29 06:47:57 2002 UTC (21 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.182: +9 -4 lines
Diff to previous 1.182 (colored) to selected 1.271 (colored)

sync comment for vflush with reality.
from FreeBSD.

Revision 1.182 / (download) - annotate - [select for diffs], Tue Oct 29 12:31:24 2002 UTC (21 years, 5 months ago) by blymn
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Changes since 1.181: +5 -2 lines
Diff to previous 1.181 (colored) to selected 1.271 (colored)

Added support for fingerprinted executables aka verified exec

Revision 1.181 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:30 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.180: +4 -2 lines
Diff to previous 1.180 (colored) to selected 1.271 (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.180 / (download) - annotate - [select for diffs], Wed Oct 23 06:45:49 2002 UTC (21 years, 5 months ago) by gmcgarry
Branch: MAIN
CVS Tags: kqueue-beforemerge
Changes since 1.179: +4 -2 lines
Diff to previous 1.179 (colored) to selected 1.271 (colored)

vclean() isn't part of the interface so make it local.
Sort prototypes by the interface they belong to.

Revision 1.179 / (download) - annotate - [select for diffs], Tue Oct 22 03:38:21 2002 UTC (21 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.178: +4 -5 lines
Diff to previous 1.178 (colored) to selected 1.271 (colored)

"tmp" in vfs_vnode_print() is set but not used; remove it.

Revision 1.178 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (21 years, 6 months ago) by gehenna
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.177: +4 -4 lines
Diff to previous 1.177 (colored) to selected 1.271 (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.177 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:48 2002 UTC (21 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.176: +18 -17 lines
Diff to previous 1.176 (colored) to selected 1.271 (colored)

Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.

Revision 1.176 / (download) - annotate - [select for diffs], Mon Aug 26 01:26:29 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.175: +4 -3 lines
Diff to previous 1.175 (colored) to selected 1.271 (colored)

Fix a signed/unsigned comparison warning from GCC 3.3.

Revision 1.175 / (download) - annotate - [select for diffs], Thu May 23 23:05:25 2002 UTC (21 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.174: +2 -30 lines
Diff to previous 1.174 (colored) to selected 1.271 (colored)

Back out rev 1.174 of vfs_subr.c, because the splbio() wasn't protecting
enough to be useful, and broadening it so that it did would have meant
that operations possibly requiring synchronous disk activity would have
to be done in splbio().  This clearly was not going to work.

Worked around this in the LFS case by having lfs_cluster_callback put an
extra hold on the vnode before calling biodone(), and taking the hold
off without HOLDRELE's problematic list swapping.  lfs_vunref() will take
care of that---in thread context---on the next write if need be.

Also, ensure that the list walking in lfs_{writevnodes,segunlock,gather}
takes into account the possibility that the list may change
underneath it (possibly because it itself deleted an element).

Tested on i386, test-compiled on alpha.

Revision 1.174 / (download) - annotate - [select for diffs], Mon May 20 22:50:57 2002 UTC (21 years, 10 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Changes since 1.173: +32 -4 lines
Diff to previous 1.173 (colored) to selected 1.271 (colored)

Protect v_freelist with splbio(), since HOLDRELE can be called in
interrupt context (through brelvp).  (LFS may be the only subsystem
affected by this problem.)

Tested on i386.

Revision 1.173 / (download) - annotate - [select for diffs], Thu Apr 4 01:44:30 2002 UTC (21 years, 11 months ago) by thorpej
Branch: MAIN
Branch point for: gehenna-devsw
Changes since 1.172: +5 -3 lines
Diff to previous 1.172 (colored) to selected 1.271 (colored)

vfs_mountroot(): provide more info when we panic.

Revision 1.172 / (download) - annotate - [select for diffs], Sat Mar 9 13:22:54 2002 UTC (22 years ago) by bjh21
Branch: MAIN
CVS Tags: newlock-base, eeh-devprop-base, eeh-devprop
Branch point for: newlock
Changes since 1.171: +5 -4 lines
Diff to previous 1.171 (colored) to selected 1.271 (colored)

When checking that a potentially-unsigned enum is >= 0, assign it to an int
first.  This is necessary to avoid warnings with -fshort-enums.  Casting
to an int really should be enough, but turns out not to be.

This change will be documented in doc/HACKS.

Revision 1.171 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:42 2002 UTC (22 years ago) by thorpej
Branch: MAIN
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored) to selected 1.271 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.170 / (download) - annotate - [select for diffs], Mon Mar 4 02:25:23 2002 UTC (22 years, 1 month ago) by simonb
Branch: MAIN
Changes since 1.169: +2 -3 lines
Diff to previous 1.169 (colored) to selected 1.271 (colored)

Don't use local extern declarations for the mountroot variable or
declare local prototypes for nfs_mountroot() or md_root_setconf().

Revision 1.169 / (download) - annotate - [select for diffs], Tue Feb 5 07:50:58 2002 UTC (22 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.168: +3 -2 lines
Diff to previous 1.168 (colored) to selected 1.271 (colored)

add an assert (hopefully to find where we recycle vnodes without
freeing all the pages, like I've seen recently).

Revision 1.168 / (download) - annotate - [select for diffs], Mon Dec 10 01:38:48 2001 UTC (22 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.167: +4 -3 lines
Diff to previous 1.167 (colored) to selected 1.271 (colored)

update vnode flags in ddb vnode-printing function.

Revision 1.167 / (download) - annotate - [select for diffs], Sun Dec 9 03:07:43 2001 UTC (22 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.166: +8 -8 lines
Diff to previous 1.166 (colored) to selected 1.271 (colored)

replace "vnode" and "vtext" with "file" and "exec" in uvmexp field names.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Dec 6 04:34:33 2001 UTC (22 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.165: +44 -38 lines
Diff to previous 1.165 (colored) to selected 1.271 (colored)

in vinvalbuf(), vtruncbuf() and vflushbuf(), don't skip calling
VOP_PUTPAGES() just because the vnode has no pages.  layered filesystems
will want to pass these calls on through to the underlying filesystem,
and non-layered filesystems may need to remove the vnode from the
syncer queues.  fix up MP locking and add some locking assertions.
fixes PRs 12284 and 14640.

Revision 1.165 / (download) - annotate - [select for diffs], Fri Nov 30 10:31:32 2001 UTC (22 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored) to selected 1.271 (colored)

fix previous commit

Revision 1.164 / (download) - annotate - [select for diffs], Fri Nov 30 10:06:46 2001 UTC (22 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.163: +5 -5 lines
Diff to previous 1.163 (colored) to selected 1.271 (colored)

fix printf format

Revision 1.163 / (download) - annotate - [select for diffs], Thu Nov 29 21:21:29 2001 UTC (22 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.162: +4 -4 lines
Diff to previous 1.162 (colored) to selected 1.271 (colored)

sprinkle crcvt()

Revision 1.162 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:39 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.161: +4 -1 lines
Diff to previous 1.161 (colored) to selected 1.271 (colored)

add RCSIDs

Revision 1.161 / (download) - annotate - [select for diffs], Tue Oct 30 15:32:03 2001 UTC (22 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.160: +10 -8 lines
Diff to previous 1.160 (colored) to selected 1.271 (colored)

- Add a new vnode flag VEXECMAP, which indicates that a vnode has
  executable mappings.  Stop overloading VTEXT for this purpose (VTEXT
  also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
  mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
  than making a function call to do this (it no longer makes sense to
  use a function call, since we no longer overload VTEXT with VEXECMAP's
  meaning).

VEXECMAP suggested by Chuq Silvers.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Oct 4 05:46:45 2001 UTC (22 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3
Branch point for: thorpej-mips-cache
Changes since 1.159: +2 -2 lines
Diff to previous 1.159 (colored) to selected 1.271 (colored)

when attempting to reclaim a vnode, tell the lockmgr() that it's ok
to just fail if we already hold the lock.  we'll skip that vnode
and try another.  fixes PR 14090.

Revision 1.159 / (download) - annotate - [select for diffs], Wed Sep 26 00:59:57 2001 UTC (22 years, 6 months ago) by enami
Branch: MAIN
CVS Tags: thorpej-devvp-base2
Changes since 1.158: +7 -5 lines
Diff to previous 1.158 (colored) to selected 1.271 (colored)

In the function getnewvnode:
- Mark file system busy again on retry.
- Don't use the variable `listhd' uninitialized.

Revision 1.158 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:37 2001 UTC (22 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: post-chs-ubcperf
Changes since 1.157: +55 -75 lines
Diff to previous 1.157 (colored) to selected 1.271 (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.157 / (download) - annotate - [select for diffs], Sat Sep 15 16:12:57 2001 UTC (22 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: pre-chs-ubcperf
Changes since 1.156: +15 -3 lines
Diff to previous 1.156 (colored) to selected 1.271 (colored)

add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.

Revision 1.156 / (download) - annotate - [select for diffs], Fri Aug 3 06:00:13 2001 UTC (22 years, 8 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-devvp-base
Branch point for: thorpej-devvp
Changes since 1.155: +5 -1 lines
Diff to previous 1.155 (colored) to selected 1.271 (colored)

bound check mount args more thoroughly

Revision 1.155 / (download) - annotate - [select for diffs], Sun Jul 8 10:32:38 2001 UTC (22 years, 8 months ago) by jdolecek
Branch: MAIN
Branch point for: kqueue
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored) to selected 1.271 (colored)

vfs_sysctl(): cosmetic: provide explicit size for vfsnames[], to catch
	mistakes VFS_MAXID/CTL_VFS_NAMES are updated

Revision 1.154 / (download) - annotate - [select for diffs], Thu Jun 28 08:12:08 2001 UTC (22 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.153: +10 -7 lines
Diff to previous 1.153 (colored) to selected 1.271 (colored)

Use array based upon CTL_VFS_NAMES to get filesystem name for non-VFS_GENERIC
syscall, instead of mountcompatnames[].
Move the extern mountcompatnames[], nmountcompatnames definition to
COMPAT_09 || COMPAT_43 section.

Revision 1.153 / (download) - annotate - [select for diffs], Tue Jun 26 22:52:03 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.152: +20 -9 lines
Diff to previous 1.152 (colored) to selected 1.271 (colored)

In getnewvnode(), allocate a vnode from the pool with NOWAIT.  If
that fails, just try to recycle a vnode.  If we can't allocate or
recycle, issue a warning, sleep a bit, and try the whole thing
again.

This prevents us from blocking forever if we want to use a very large
number of vnodes, but don't have {memory,kva} resources from which to
allocate them.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Jun 26 19:14:25 2001 UTC (22 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.151: +2 -3 lines
Diff to previous 1.151 (colored) to selected 1.271 (colored)

vfs_rootmountalloc: take advantage of LIST_FOREACH()

Revision 1.151 / (download) - annotate - [select for diffs], Tue Jun 26 15:51:06 2001 UTC (22 years, 9 months ago) by wrstuden
Branch: MAIN
Changes since 1.150: +3 -2 lines
Diff to previous 1.150 (colored) to selected 1.271 (colored)

In vcount(), when getting rid of unused aliases, don't vgone one which
has VXLOCK set - it's already being vgoned, most likely by one of our
callers. If we call vgone, we can end up sleeping against ourself
with VXLOCK set - we'll start the race for root.

Pointed out by Love <lha@stacken.kth.se> on tech-kern. Analysis from
Artur Grabowski <art@openbsd.org> via Love.

Should resolve PR kern/13077

Revision 1.150 / (download) - annotate - [select for diffs], Tue Jun 5 04:42:05 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.149: +9 -2 lines
Diff to previous 1.149 (colored) to selected 1.271 (colored)

Avoid a sleeping malloc call while holding the spechash_slock.
XXX This is kinda gross, but prevents complete lossage on an
XXX MP system.
From Bill Sommerfeld.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Apr 16 22:41:10 2001 UTC (22 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.148: +9 -2 lines
Diff to previous 1.148 (colored) to selected 1.271 (colored)

When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call.  This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.

Revision 1.148 / (download) - annotate - [select for diffs], Mon Apr 9 14:14:10 2001 UTC (22 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.147: +2 -2 lines
Diff to previous 1.147 (colored) to selected 1.271 (colored)

Fix the name of some bits in struct vnode.v_flag.

Revision 1.147 / (download) - annotate - [select for diffs], Fri Mar 9 01:02:11 2001 UTC (23 years ago) by chs
Branch: MAIN
Changes since 1.146: +13 -1 lines
Diff to previous 1.146 (colored) to selected 1.271 (colored)

add UBC memory-usage balancing.  we track the number of pages in use for
each of the basic types (anonymous data, executable image, cached files)
and prevent the pagedaemon from reusing a given page if that would reduce
the count of that type of page below a sysctl-setable minimum threshold.
the thresholds are controlled via three new sysctl tunables:
vm.anonmin, vm.vnodemin, and vm.vtextmin.  these tunables are the
percentages of pageable memory reserved for each usage, and we do not allow
the sum of the minimums to be more than 95% so that there's always some
memory that can be reused.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Feb 21 21:40:00 2001 UTC (23 years, 1 month ago) by jdolecek
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored) to selected 1.271 (colored)

make some more constant arrays 'const'

Revision 1.145 / (download) - annotate - [select for diffs], Tue Feb 6 10:58:55 2001 UTC (23 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored) to selected 1.271 (colored)

in vtruncbuf(), pass 0 (meaning everything at or past the start of the range)
instead of the vnode's size to pgo_flush() since there can be pages past EOF.
in the same call, cast "lbn" to voff_t to avoid overflow.

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jan 8 07:05:47 2001 UTC (23 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.143: +2 -2 lines
Diff to previous 1.143 (colored) to selected 1.271 (colored)

in vtruncbuf(), use a "synchronous freeing" flush to prevent a race
between write i/os in a disk-based filesystem vs. the disk block being
freed by a truncation, allocated to a new file, and written again with
different data.  if the disk driver reorders the requests and does
the second i/o first, the old data will clobber the new, corrupting
the new file.

Revision 1.143 / (download) - annotate - [select for diffs], Sun Dec 31 03:13:51 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.142: +2 -1 lines
Diff to previous 1.142 (colored) to selected 1.271 (colored)

Add a missing simple_unlock() to the LK_NOWAIT/VXLOCK error case in vget().

Revision 1.142 / (download) - annotate - [select for diffs], Mon Nov 27 08:39:44 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.141: +90 -46 lines
Diff to previous 1.141 (colored) to selected 1.271 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.141 / (download) - annotate - [select for diffs], Fri Nov 24 03:59:09 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.140: +1 -3 lines
Diff to previous 1.140 (colored) to selected 1.271 (colored)

adjust the spinlock macros in the non-MULTIPROCESSOR, non-LOCKDEBUG case
so that gcc will think that static spinlock are used.
this allows us to remove the ugly conditionalization of
static spinlock declarations.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Sep 19 22:00:58 2000 UTC (23 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.139: +2 -2 lines
Diff to previous 1.139 (colored) to selected 1.271 (colored)

Adapt for VOP_FSYNC parameter change.

Revision 1.139 / (download) - annotate - [select for diffs], Tue Sep 5 05:13:43 2000 UTC (23 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.138: +5 -2 lines
Diff to previous 1.138 (colored) to selected 1.271 (colored)

Accquire vnode interlock while playing with flags to see if there
is someone waiting this vnode.

Revision 1.138 / (download) - annotate - [select for diffs], Thu Aug 31 14:41:35 2000 UTC (23 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.137: +14 -5 lines
Diff to previous 1.137 (colored) to selected 1.271 (colored)

in vfs_shutdown(), use sched_suspend() to suspend scheduling, and use
tsleep() instead of DELAY. Also, keep trying flushing buffers when the
number of dirty buffers decreases (20 rounds may not be enouth for a
very large buffer cache).

Using tsleep instead of delay gives a chance to others kernel threads to run,
which is needed for raidframe. With this change I've not been able to
reproduce the 'dirty buffer not flushed' problem with raidframe.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Aug 21 06:42:57 2000 UTC (23 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.136: +3 -1 lines
Diff to previous 1.136 (colored) to selected 1.271 (colored)

Declare this static simplelock data only when MULTIPROCESSOR or LOCKDEBUG is
defined to prevent compiler warning.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Aug 21 02:16:30 2000 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.135: +1 -6 lines
Diff to previous 1.135 (colored) to selected 1.271 (colored)

Don't bother reinitializing statically-inited locks

Revision 1.135 / (download) - annotate - [select for diffs], Sat Aug 19 17:25:33 2000 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.134: +6 -6 lines
Diff to previous 1.134 (colored) to selected 1.271 (colored)

Statically initialize statically-allocated locks

Revision 1.134 / (download) - annotate - [select for diffs], Sat Aug 12 16:43:01 2000 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.133: +5 -5 lines
Diff to previous 1.133 (colored) to selected 1.271 (colored)

Use ltsleep(...,PNORELOCK..) instead of simple_unlock()/tsleep()

Revision 1.133 / (download) - annotate - [select for diffs], Sun Jul 16 21:07:24 2000 UTC (23 years, 8 months ago) by fvdl
Branch: MAIN
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored) to selected 1.271 (colored)

Don't wait for B_READ buffers to finish in vfs_shutdown, it makes no sense
to do so.

From Ethan Solomita.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Jul 4 15:33:32 2000 UTC (23 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.131: +2 -2 lines
Diff to previous 1.131 (colored) to selected 1.271 (colored)

change tablefull() to accept one more parameter - optional hint

use that to inform about way to raise current limit when we reach maximum
number of processes, descriptors or vnodes

XXX hopefully I catched all users of tablefull()

Revision 1.131 / (download) - annotate - [select for diffs], Tue Jun 27 23:52:18 2000 UTC (23 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored) to selected 1.271 (colored)

vinsheadfree -> ungetnewvnode

Revision 1.130 / (download) - annotate - [select for diffs], Tue Jun 27 23:34:45 2000 UTC (23 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.129: +31 -1 lines
Diff to previous 1.129 (colored) to selected 1.271 (colored)

Add vinsheadfree, a small function to push vnodes that have just
been allocated by getnewvnode, back onto the head of the free list.
Needed in some VFS_VGET functions to deal with races.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:49 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.128: +3 -5 lines
Diff to previous 1.128 (colored) to selected 1.271 (colored)

remove include of <vm/vm.h>

Revision 1.128 / (download) - annotate - [select for diffs], Sat Jun 10 18:44:44 2000 UTC (23 years, 9 months ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.127: +13 -17 lines
Diff to previous 1.127 (colored) to selected 1.271 (colored)

Fix assorted bugs around shutdown/reboot/panic time.
 - add a new global variable, doing_shutdown, which is nonzero if
vfs_shutdown() or panic() have been called.
- in panic, set RB_NOSYNC if doing_shutdown is already set on entry
so we don't reenter vfs_shutdown if we panic'ed there.
 - in vfs_shutdown, don't use proc0's process for sys_sync unless
curproc is NULL.
 - in lockmgr, attribute successful locks to proc0 if doing_shutdown
&& curproc==NULL, and  panic if we can't get the lock right away; avoids the
spurious lockmgr DIAGNOSTIC panic from the ddb reboot command.
 - in subr_pool, deal with curproc==NULL in the doing_shutdown case.
 - in mfs_strategy, bitbucket writes if doing_shutdown, so we don't
wedge waiting for the mfs process.
 - in ltsleep, treat ((curproc == NULL) && doing_shutdown) like the
panicstr case.

Appears to fix: kern/9239, kern/10187, kern/9367.
May also fix kern/10122.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Jun 10 18:27:01 2000 UTC (23 years, 9 months ago) by assar
Branch: MAIN
Changes since 1.126: +4 -5 lines
Diff to previous 1.126 (colored) to selected 1.271 (colored)

make vfs_getnewfsid only take one argument and fetch the name of the
filesystem from the supplied mount argument.  also make makefstype
take a const parameter.  update all the callers.

Revision 1.126 / (download) - annotate - [select for diffs], Sun May 28 04:13:56 2000 UTC (23 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.125: +110 -57 lines
Diff to previous 1.125 (colored) to selected 1.271 (colored)

Add a new function to remove extra buffers when truncating a file.  This is
more generic than the vinvalbuf(V_SAVEMETA) case, avoiding synchronous
operations when truncating to a non-zero length.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Apr 10 02:22:14 2000 UTC (23 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.124: +155 -19 lines
Diff to previous 1.124 (colored) to selected 1.271 (colored)

add ddb commands for printing vnodes and bufs.

Revision 1.124 / (download) - annotate - [select for diffs], Thu Mar 30 09:32:25 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.123: +8 -3 lines
Diff to previous 1.123 (colored) to selected 1.271 (colored)

Add a special option, DEBUG_HALT_BUSY, that allows you to debug when the
system doesn't want to halt cleanly.  The code was there before, but only
with the DEBUG option.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:15 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.122: +36 -36 lines
Diff to previous 1.122 (colored) to selected 1.271 (colored)

Get rid of register declarations.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Mar 17 01:25:06 2000 UTC (24 years ago) by fvdl
Branch: MAIN
Changes since 1.121: +9 -11 lines
Diff to previous 1.121 (colored) to selected 1.271 (colored)

Do previous better. Use FSYNC_RECLAIM as it was before.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Mar 16 18:08:20 2000 UTC (24 years ago) by jdolecek
Branch: MAIN
Changes since 1.120: +6 -1 lines
Diff to previous 1.120 (colored) to selected 1.271 (colored)

Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Mar 15 16:28:45 2000 UTC (24 years ago) by fvdl
Branch: MAIN
Changes since 1.119: +11 -7 lines
Diff to previous 1.119 (colored) to selected 1.271 (colored)

Do the previous slightly different: any files on MNT_SOFTDEP filesystems do
not want all their metadata dependencies flushed from vinvalbuf() if
there are no dirty blocks.

Revision 1.119 / (download) - annotate - [select for diffs], Sat Mar 11 05:00:18 2000 UTC (24 years ago) by perseant
Branch: MAIN
Changes since 1.118: +7 -10 lines
Diff to previous 1.118 (colored) to selected 1.271 (colored)

Move vinvalbuf's check for dirty blocks into ffs_fsync, to ensure that
mode and ownership bits are flushed to disk before the vnode is
reclaimed.

The check, introduced in the softdep merge, assumes that if no blocks
are dirty, no file data *or metadata* needs to be flushed to disk.  This
is true of ffs, but is not true of lfs, and may not be true of other
filesystems.

Tested by myself and Bill Squier <groo@cs.stevens-tech.edu>.

Revision 1.118 / (download) - annotate - [select for diffs], Fri Mar 3 05:21:03 2000 UTC (24 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.117: +7 -4 lines
Diff to previous 1.117 (colored) to selected 1.271 (colored)

Allow my disk to actually spin down using `-o async' again.

Note: This uses the same questionable logic as vfs_bio.c to check MNT_ASYNC.
Something needs to be done about this.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Feb 16 11:57:45 2000 UTC (24 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.116: +5 -1 lines
Diff to previous 1.116 (colored) to selected 1.271 (colored)

Introduce a sysctl to enable/disable if non-root users can mount filesystems.
Default: off.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Dec 15 07:10:32 1999 UTC (24 years, 3 months ago) by perseant
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.115: +4 -2 lines
Diff to previous 1.115 (colored) to selected 1.271 (colored)

In lfs_bwrite, don't mark buffers dirty if lfs is mounted read-only.
(Previously buffers could be marked dirty by the cleaner, and possibly by
other means.)

Also check for softdep mount in vfs_shutdown before trying to bawrite
buffers, since other filesystems don't need it and lfs doesn't bawrite.
(This fragment reviewed by fvdl.)

Partially addresses PR#8964.

Revision 1.115 / (download) - annotate - [select for diffs], Tue Nov 23 23:52:40 1999 UTC (24 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.114: +20 -5 lines
Diff to previous 1.114 (colored) to selected 1.271 (colored)

Be more careful to block bio interrupts for some data structures. There
were at least a few missed cases where vp->v_{clean,dirty}blkhd were
unprotected since the softdep/trickle sync merge.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Nov 18 05:50:25 1999 UTC (24 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored) to selected 1.271 (colored)

Initialize the vnode_hold_list correctly.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:09 1999 UTC (24 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.112: +229 -48 lines
Diff to previous 1.112 (colored) to selected 1.271 (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.112 / (download) - annotate - [select for diffs], Fri Oct 1 22:03:17 1999 UTC (24 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.111: +22 -3 lines
Diff to previous 1.111 (colored) to selected 1.271 (colored)

Widen usecount and writecount to prevent overflow.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Oct 1 21:57:42 1999 UTC (24 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.110: +2 -2 lines
Diff to previous 1.110 (colored) to selected 1.271 (colored)

Correct spelling in an #ifdef.

Revision 1.110 / (download) - annotate - [select for diffs], Fri Aug 20 22:21:25 1999 UTC (24 years, 7 months ago) by wrstuden
Branch: MAIN
Changes since 1.109: +30 -26 lines
Diff to previous 1.109 (colored) to selected 1.271 (colored)

Deal with device vnodes which aren't on the spechash tables, rather than
panicing. So now we make sure vp->v_hashchain != NULL before removing
the node from the chain.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Aug 19 18:09:44 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.108: +2 -2 lines
Diff to previous 1.108 (colored) to selected 1.271 (colored)

Fix "print vnodes for dirty buffers" change: use vprint(); VOP_PRINT()
is only meant to be used by vprint(), and vprint() provides more
information about the vnode.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Aug 19 13:54:06 1999 UTC (24 years, 7 months ago) by simonb
Branch: MAIN
Changes since 1.107: +8 -1 lines
Diff to previous 1.107 (colored) to selected 1.271 (colored)

In vfs_shutdown() print any vnodes for busy buffers if DEBUG is defined.

Patch from Bill Studenmund.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Aug 14 06:23:59 1999 UTC (24 years, 7 months ago) by ross
Branch: MAIN
Changes since 1.106: +2 -1 lines
Diff to previous 1.106 (colored) to selected 1.271 (colored)

In getnewvnode(), initialize v_interlock when the vnode comes from the
pool allocator.

Revision 1.106 / (download) - annotate - [select for diffs], Thu Jul 29 13:31:45 1999 UTC (24 years, 8 months ago) by sommerfeld
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.105: +11 -8 lines
Diff to previous 1.105 (colored) to selected 1.271 (colored)

Probable fix for PR7943: lookups fail spuriously over NFS.

The problem was due to an interaction between the doomed unmounts done by
amd and getnewvnode.
I convinced myself that it's ok for getnewvnode() to do a sleeping vfs_busy().

Tested with multiple builds running while another process attempted to unmount
/usr once a second.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Jul 15 21:30:31 1999 UTC (24 years, 8 months ago) by wrstuden
Branch: MAIN
Changes since 1.104: +10 -3 lines
Diff to previous 1.104 (colored) to selected 1.271 (colored)

Define VLAYER and make layered fs's set this flag when creating their vnodes.

getnewvnode now checks this bit, and it if's set makes sure a vnode's not
locked before removing it from the free list.

Closes PR 7954 by Alan Barrett <apb@iafrica.com>.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Jul 8 01:06:01 1999 UTC (24 years, 8 months ago) by wrstuden
Branch: MAIN
Changes since 1.103: +11 -7 lines
Diff to previous 1.103 (colored) to selected 1.271 (colored)

Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jul 4 16:20:13 1999 UTC (24 years, 9 months ago) by sommerfeld
Branch: MAIN
Changes since 1.102: +36 -4 lines
Diff to previous 1.102 (colored) to selected 1.271 (colored)

Fix kern/7906: race between unmount and getnewvnode()

mp->mnt_flags & MNT_MWAIT is replaced by mp->mnt_wcnt, and a new mount
flag MNT_GONE is created (reusing the same bit).

In insmntque(), add DIAGNOSTIC check to fail if the filesystem vnode
is being moved to is in the process of being unmounted.

getnewvnode() now protects the list of vnodes active on mp with
vfs_busy()/vfs_unbusy().

To avoid generating spurious errors during a doomed unmount, change
the "wait for unmount to finish" protocol between dounmount() and
vfs_busy().  In vfs_busy(), instead of only sleeping once, sleep until
either MNT_UNMOUNT is clear or MNT_GONE is set; also, maintain a count
of waiters in mp->mnt_wcnt so that dounmount() knows when it's safe to
free mp.

tested by running a "while :; do mount /d1; umount -f /d1; done" loop
against multiple find(1) processes.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Apr 21 02:37:07 1999 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.101: +0 -4 lines
Diff to previous 1.101 (colored) to selected 1.271 (colored)

revert previous.  oops.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Apr 21 02:31:50 1999 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.100: +5 -1 lines
Diff to previous 1.100 (colored) to selected 1.271 (colored)

properly test the msgsz as "msgsz - len".  from PR#7386

Revision 1.100 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:26 1999 UTC (25 years ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.99: +1 -11 lines
Diff to previous 1.99 (colored) to selected 1.271 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Mar 22 17:24:19 1999 UTC (25 years ago) by sommerfe
Branch: MAIN
Changes since 1.98: +3 -2 lines
Diff to previous 1.98 (colored) to selected 1.271 (colored)

vinvalbuf, called from vclean, could cause a locking-against-self
deadlock in VOP_FSYNC() if the unreferenced vnode picked for
reclamation happened to be stacked on top of a vnode the process
already had locked.  This could happen if the same filesystem was
accessed both through a union mount and directly; it seemed to happen
most frequently when the direct access was through NFS.

Avoid this deadlock by changing vinvalbuf to pass a new FSYNC_RECLAIM
flag bit to VOP_FSYNC() to indicate that a reclaim is in progress and
only a `shallow' fsync is necessary.

Do nothing in *_fsync() in umapfs, nullfs, and unionfs when
FSYNC_RECLAIM is set; the underlying vnodes will shortly be released
in *_reclaim and may be reclaimed (and fsync'ed) later.

Revision 1.98 / (download) - annotate - [select for diffs], Tue Feb 9 01:57:05 1999 UTC (25 years, 1 month ago) by wrstuden
Branch: MAIN
Changes since 1.97: +7 -7 lines
Diff to previous 1.97 (colored) to selected 1.271 (colored)

Oops. Need to have VOP_LOCK before calling uvm_vnp_terminate, not after
(comments and code inspection in uvm_vnp_terminate agree on this).

Revision 1.97 / (download) - annotate - [select for diffs], Thu Dec 10 15:09:19 1998 UTC (25 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96 (colored) to selected 1.271 (colored)

defopt COMPAT_43

Revision 1.96 / (download) - annotate - [select for diffs], Wed Nov 18 20:24:59 1998 UTC (25 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.95: +18 -1 lines
Diff to previous 1.95 (colored) to selected 1.271 (colored)

Implement vdevgone(), to revoke all vnodes corresponding to the specified
type, major, (low minor...high minor).

Revision 1.95 / (download) - annotate - [select for diffs], Sun Nov 15 18:38:11 1998 UTC (25 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.94: +8 -1 lines
Diff to previous 1.94 (colored) to selected 1.271 (colored)

Conditionally include the 4.4BSD-Lite2 compat vfs sysctl code.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Nov 13 20:15:32 1998 UTC (25 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.93: +17 -12 lines
Diff to previous 1.93 (colored) to selected 1.271 (colored)

Make vfs_sysctl() work.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Sep 1 03:09:14 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc-base
Branch point for: chs-ubc
Changes since 1.92: +7 -3 lines
Diff to previous 1.92 (colored) to selected 1.271 (colored)

Use the pool allocator and "nointr" pool page allocator for vnodes.  The
only benefit this provides is that we don't use kmem_map to map the memory
used for vnodes (though, this is a 30 virtual page savings on my PPro)
since vnodes are never freed (they have their own freelist).

Revision 1.92 / (download) - annotate - [select for diffs], Mon Aug 17 17:29:20 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.91: +4 -2 lines
Diff to previous 1.91 (colored) to selected 1.271 (colored)

Add missing simple_unlock(), from Stefan Grefen, PR #5981.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:19 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.90: +6 -6 lines
Diff to previous 1.90 (colored) to selected 1.271 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:54 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.89: +5 -5 lines
Diff to previous 1.89 (colored) to selected 1.271 (colored)

fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Jun 8 15:52:07 1998 UTC (25 years, 9 months ago) by kleink
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.88: +4 -26 lines
Diff to previous 1.88 (colored) to selected 1.271 (colored)

Nuke a couple of non-local prototypes which are already declared in either
<sys/buf.h>, <sys/mount.h> or <sys/vnode.h>.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Jun 5 20:02:18 1998 UTC (25 years, 9 months ago) by kleink
Branch: MAIN
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored) to selected 1.271 (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.87 / (download) - annotate - [select for diffs], Mon May 18 14:59:49 1998 UTC (25 years, 10 months ago) by pk
Branch: MAIN
Changes since 1.86: +29 -6 lines
Diff to previous 1.86 (colored) to selected 1.271 (colored)

Inline vref/vrele in vclean() because:
* we already have the vnode interlock, so vref() should not ask for it again.
* we call VOP_RECLAIM/VOP_INACTIVE(), which shouldn't be duplicated in vrele().

Revision 1.86 / (download) - annotate - [select for diffs], Fri May 8 21:02:35 1998 UTC (25 years, 10 months ago) by pk
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored) to selected 1.271 (colored)

VOP_CLOSE() takes F* flags, not IO_* flags.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Apr 26 19:10:33 1998 UTC (25 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.84: +13 -1 lines
Diff to previous 1.84 (colored) to selected 1.271 (colored)

In vfs_unmountall(), if curproc is NULL, abort, because unmounting
puts the requesting process to sleep until the file systems buffers
have flushed, and sleeping with a NULL curproc will cause a fault.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Apr 26 18:58:54 1998 UTC (25 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.83: +15 -20 lines
Diff to previous 1.83 (colored) to selected 1.271 (colored)

Make vfs_shutdown() look a little nicer.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Mar 4 09:13:48 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.82: +6 -6 lines
Diff to previous 1.82 (colored) to selected 1.271 (colored)

Clarify vget() comment a bit.

Revision 1.82 / (download) - annotate - [select for diffs], Tue Mar 3 02:22:01 1998 UTC (26 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) to selected 1.271 (colored)

Export spechash_slock; it's used outside of vfs_subr.c

Revision 1.81 / (download) - annotate - [select for diffs], Sun Mar 1 09:51:29 1998 UTC (26 years, 1 month ago) by ross
Branch: MAIN
Changes since 1.80: +18 -19 lines
Diff to previous 1.80 (colored) to selected 1.271 (colored)

Compile post-lite2 with #ifndef DIAGNOSTIC

Revision 1.80 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:36 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.79: +422 -211 lines
Diff to previous 1.79 (colored) to selected 1.271 (colored)

Merge with Lite2 + local changes

Revision 1.79 / (download) - annotate - [select for diffs], Wed Feb 18 07:16:41 1998 UTC (26 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.78: +114 -21 lines
Diff to previous 1.78 (colored) to selected 1.271 (colored)

Don't use vfssw[], it's gone; use vfs_list instead.

Implement vfs_attach() and vfs_detach(), which add and remove file systems
from the kernel.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:52 1998 UTC (26 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.77: +3 -1 lines
Diff to previous 1.77 (colored) to selected 1.271 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Feb 5 08:00:01 1998 UTC (26 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.76: +16 -1 lines
Diff to previous 1.76 (colored) to selected 1.271 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.76 / (download) - annotate - [select for diffs], Sat Oct 18 16:34:17 1997 UTC (26 years, 5 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.75: +7 -4 lines
Diff to previous 1.75 (colored) to selected 1.271 (colored)

Separate assigments of tv_sec and tv_nsec since tv_sec is a time_t (int on
the alpha) and tv_nsec is a long.

Revision 1.75 / (download) - annotate - [select for diffs], Sat Oct 18 11:51:32 1997 UTC (26 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.74: +19 -9 lines
Diff to previous 1.74 (colored) to selected 1.271 (colored)

In the function vattr_null(), assign each member individually
to prevent unintended conversion due to different sign and size.

Revision 1.74 / (download) - annotate - [select for diffs], Sun Oct 5 18:39:52 1997 UTC (26 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: marc-pcmcia-base
Changes since 1.73: +38 -2 lines
Diff to previous 1.73 (colored) to selected 1.271 (colored)

Copyright assigned to The NetBSD Foundation.

Revision 1.73 / (download) - annotate - [select for diffs], Wed Sep 24 21:40:55 1997 UTC (26 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.72: +25 -19 lines
Diff to previous 1.72 (colored) to selected 1.271 (colored)

In vfs_shutdown(), do the "sync and wait for it to finish" _before_
unmounting all of the file systems.  If we encounter a condition where
all of the dirty buffers could not flush, then don't unmount file systems,
since it might be likely to wedge.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Jul 20 23:31:32 1997 UTC (26 years, 8 months ago) by fvdl
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp
Branch point for: marc-pcmcia
Changes since 1.71: +21 -3 lines
Diff to previous 1.71 (colored) to selected 1.271 (colored)

Allow multiple export requests for a filesystem, host pair if the flags and
anon cred are the same. Should probably be handled better in the mountd,
but this will do for now. Fixes PR 469, submitted Sept 1994 by
a certain "Jason R. Thorpe".. ;-)

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jun 24 23:43:33 1997 UTC (26 years, 9 months ago) by fvdl
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.70: +92 -1 lines
Diff to previous 1.70 (colored) to selected 1.271 (colored)

Add functions to set/reset the info about the publicly exported
(WebNFS) filesystem. At first glance this should go into the
NFS code, but all the other export code is here as well.

Revision 1.70 / (download) - annotate - [select for diffs], Sat Jun 7 17:27:57 1997 UTC (26 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored) to selected 1.271 (colored)

in vfs_shutdown(), print "syncing disks... " before dropping to spl0(),
so that if the drop to spl0() causes another panic (e.g. because there's
still some fatal hardware interrupt that's pending) we'll know that we
dropped IPL to sync the disks.

Revision 1.69 / (download) - annotate - [select for diffs], Thu May 8 16:34:54 1997 UTC (26 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored) to selected 1.271 (colored)

Oops; fix reversed test for VDIR.

Revision 1.68 / (download) - annotate - [select for diffs], Thu May 8 16:20:09 1997 UTC (26 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.67: +10 -10 lines
Diff to previous 1.67 (colored) to selected 1.271 (colored)

Pass the vnode type to vaccess(), and use it when checking VEXEC.  Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.

Revision 1.67 / (download) - annotate - [select for diffs], Thu May 8 10:21:35 1997 UTC (26 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored) to selected 1.271 (colored)

GC VS[UG]ID and VSVTX, and add a new VLOOKUP, since the semantics are now
different from VEXEC.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Apr 25 02:43:10 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored) to selected 1.271 (colored)

Fix error in vfs_hang_addrlist() that caused file systems to be exported
to more subnets than expected when using netmasks.  From Mike Hibler.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Apr 23 20:19:45 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored) to selected 1.271 (colored)

Change previous test slightly.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Apr 23 20:18:18 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.63: +15 -7 lines
Diff to previous 1.63 (colored) to selected 1.271 (colored)

Do not return success when checking for execute permission by super-user and no
execute bits are set.  Also, this test is no longer needed in execve(2).

Revision 1.63 / (download) - annotate - [select for diffs], Wed Apr 9 21:12:15 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.62: +3 -5 lines
Diff to previous 1.62 (colored) to selected 1.271 (colored)

Fix two performance issues:
* When a delayed write buffer falls off the LRU queue, arrange for it to go on
  the AGE queue after being flushed out to disk.
* When a delayed write buffer is synced, leave it in its relative position in
  the LRU queue.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Apr 3 23:15:52 1997 UTC (27 years ago) by kleink
Branch: MAIN
Changes since 1.61: +2 -1 lines
Diff to previous 1.61 (colored) to selected 1.271 (colored)

In checkalias(), initialize the speclockf structure member invented
with the specfs advisory locking support; this could cause a panic.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Feb 23 00:07:18 1997 UTC (27 years, 1 month ago) by fvdl
Branch: MAIN
CVS Tags: is-newarp-before-merge
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored) to selected 1.271 (colored)

Do previous change properly (pasto; should have been inside the loop).

Revision 1.60 / (download) - annotate - [select for diffs], Sat Feb 22 03:22:32 1997 UTC (27 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.59: +5 -2 lines
Diff to previous 1.59 (colored) to selected 1.271 (colored)

Implement changes to make fix for NQNFS and MFS unmounting (race conditions)
work. Not quite as good as with the Lite2 merges, but it'll do until then.

* dounmount() expects to be called with the mountpoint marked busy
* all callers of dounmount() thus make the call themselves
* if a filesystem was being unmounted, and we're woken up in vfs_busy(),
  don't reference the mountpoint struct pointer, as it has very probably
  been freed.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jan 31 19:10:28 1997 UTC (27 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: mrg-vm-swap, is-newarp-base
Branch point for: is-newarp
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored) to selected 1.271 (colored)

Garbage-collect "argdev".

Revision 1.58 / (download) - annotate - [select for diffs], Fri Jan 31 02:50:36 1997 UTC (27 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +82 -1 lines
Diff to previous 1.57 (colored) to selected 1.271 (colored)

- Implement vfs_mountroot().  This function is called my main() to
  mount the root file system.  If the operator specified the root
  file system type in the kernel configuration file, attempt to
  mount that file system type on the root device.  If the root
  file system type was wildcarded (or unspecified), try all of
  the file systems statically built into the kernel until one
  succeeds.  If no file systems succeed, return an error.  The
  system will recover from this condition.
- Implement vfs_getopsbyname().  This function returns the file
  system ops vector given a file system name.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Oct 13 02:32:53 1996 UTC (27 years, 5 months ago) by christos
Branch: MAIN
Branch point for: thorpej-setroot
Changes since 1.56: +16 -16 lines
Diff to previous 1.56 (colored) to selected 1.271 (colored)

backout previous kprintf change

Revision 1.56 / (download) - annotate - [select for diffs], Thu Oct 10 22:46:41 1996 UTC (27 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.55: +19 -19 lines
Diff to previous 1.55 (colored) to selected 1.271 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.55 / (download) - annotate - [select for diffs], Tue Oct 1 22:49:11 1996 UTC (27 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.54: +9 -5 lines
Diff to previous 1.54 (colored) to selected 1.271 (colored)

initialize vnode_free_list and mountlist at compile time with the new
queue.h list/queue head initializer macros.  mountlist was converted so
that panics (or other reboots) early on in kernel startup don't cause
sys_sync() to croak.  vnode_free_list was converted because it was nearby.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Jun 1 20:24:05 1996 UTC (27 years, 10 months ago) by jtk
Branch: MAIN
Changes since 1.53: +5 -1 lines
Diff to previous 1.53 (colored) to selected 1.271 (colored)

print out file systems being unmounted, #ifdef DEBUG.  pr#1492

Revision 1.53 / (download) - annotate - [select for diffs], Mon Apr 22 01:39:13 1996 UTC (27 years, 11 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.52: +1 -2 lines
Diff to previous 1.52 (colored) to selected 1.271 (colored)

remove include of <sys/cpu.h>

Revision 1.52 / (download) - annotate - [select for diffs], Sat Mar 16 23:17:20 1996 UTC (28 years ago) by christos
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored) to selected 1.271 (colored)

Fix printf() formats.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Feb 9 19:01:01 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.50: +9 -4 lines
Diff to previous 1.50 (colored) to selected 1.271 (colored)

More proto fixes

Revision 1.50 / (download) - annotate - [select for diffs], Sun Feb 4 02:18:29 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.49: +77 -20 lines
Diff to previous 1.49 (colored) to selected 1.271 (colored)

First pass at prototyping

Revision 1.49 / (download) - annotate - [select for diffs], Thu Feb 1 00:26:41 1996 UTC (28 years, 2 months ago) by jtc
Branch: MAIN
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) to selected 1.271 (colored)

Rename struct timespec fields to conform to POSIX.1b

Revision 1.48 / (download) - annotate - [select for diffs], Tue Jan 30 18:21:08 1996 UTC (28 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.47: +2 -5 lines
Diff to previous 1.47 (colored) to selected 1.271 (colored)

Use insmntque() rather than manually frobbing the mount list.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Oct 7 06:28:48 1995 UTC (28 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.271 (colored)

Prefix names of system call implementation functions with `sys_'.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Jul 3 16:58:38 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.45: +2 -1 lines
Diff to previous 1.45 (colored) to selected 1.271 (colored)

Oops; need fcntl.h.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jul 2 18:13:15 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored) to selected 1.271 (colored)

Close routines take file flags, not I/O flags.  Fix two incorrect usages.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jun 1 22:44:08 1995 UTC (28 years, 10 months ago) by jtc
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) to selected 1.271 (colored)

Moved egid credential from cr_groups[0] to new field cr_gid.  POSIX.1
requires that sgid executables and the setuid() syscall *not* change
the supplemental group list.

Revision 1.43 / (download) - annotate - [select for diffs], Thu May 4 03:11:06 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.42: +7 -3 lines
Diff to previous 1.42 (colored) to selected 1.271 (colored)

Add two vprint()s, to give more informative panic messages.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Apr 21 22:09:53 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.41: +8 -8 lines
Diff to previous 1.41 (colored) to selected 1.271 (colored)

Rearrange vfs_shutdown() slightly.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Apr 21 22:03:24 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored) to selected 1.271 (colored)

Add a return type for vaccess().

Revision 1.40 / (download) - annotate - [select for diffs], Fri Apr 21 21:55:11 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.39: +56 -4 lines
Diff to previous 1.39 (colored) to selected 1.271 (colored)

Print a message for each file system that does not unmount cleanly.  Add a
vfs_shutdown() routine that does the unmount and sync.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Apr 10 19:46:56 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.38: +21 -1 lines
Diff to previous 1.38 (colored) to selected 1.271 (colored)

Define vfs_unmountall(), to unmount file systems at shutdown time.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Jan 18 06:24:21 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.37: +9 -7 lines
Diff to previous 1.37 (colored) to selected 1.271 (colored)

Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 15 09:23:05 1995 UTC (29 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.36: +6 -24 lines
Diff to previous 1.36 (colored) to selected 1.271 (colored)

undo charles's accidental changes.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jan 9 19:54:28 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.35: +25 -8 lines
Diff to previous 1.35 (colored) to selected 1.271 (colored)

Remove unused extern.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Dec 24 16:44:16 1994 UTC (29 years, 3 months ago) by ws
Branch: MAIN
Changes since 1.34: +55 -3 lines
Diff to previous 1.34 (colored) to selected 1.271 (colored)

Implement and use a common access checking routine

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jul 10 05:53:25 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored) to selected 1.271 (colored)

fix done in rev. 1.23 over again.  it was clobbered, and problem masked

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jul 2 04:51:18 1994 UTC (29 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored) to selected 1.271 (colored)

limit st_dev to 15 bits set for nfs filesystems

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 29 06:33:59 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored) to selected 1.271 (colored)

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

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jun 13 15:37:55 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +3 -5 lines
Diff to previous 1.30 (colored) to selected 1.271 (colored)

Move definition of prtactive.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Jun 8 11:28:56 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.29: +446 -278 lines
Diff to previous 1.29 (colored) to selected 1.271 (colored)

Update to 4.4-Lite fs code.

Revision 1.29 / (download) - annotate - [select for diffs], Tue May 17 04:22:04 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.28: +1256 -1 lines
Diff to previous 1.28 (colored) to selected 1.271 (colored)

copyright foo

Revision 1.28 / (download) - annotate - [select for diffs], Sat May 7 00:53:37 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.27: +1 -1 lines
Diff to previous 1.27 (colored) to selected 1.271 (colored)

sysctl update

Revision 1.27 / (download) - annotate - [select for diffs], Mon Apr 25 03:49:45 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.26: +1 -1 lines
Diff to previous 1.26 (colored) to selected 1.271 (colored)

some prototype cleanup, eliminate/replace bogus types (e.g. quad and
u_quad) -> use better types (e.g. quad_t & u_quad_t in inodes),
some cleanup.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Apr 23 08:41:05 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.25: +1 -1 lines
Diff to previous 1.25 (colored) to selected 1.271 (colored)

some more queue code (that's #ifdef DEBUG)

Revision 1.25 / (download) - annotate - [select for diffs], Sat Apr 23 07:54:45 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.24: +1 -1 lines
Diff to previous 1.24 (colored) to selected 1.271 (colored)

make fs types consistent over new kernels.  also, some proto foo.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Apr 21 07:48:32 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.23: +1 -1 lines
Diff to previous 1.23 (colored) to selected 1.271 (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.23 / (download) - annotate - [select for diffs], Mon Apr 18 21:03:14 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.22: +1 -1 lines
Diff to previous 1.22 (colored) to selected 1.271 (colored)

don't let cons dev vnode get subsumed by a 'real' vnode.  the current
scheme of vnode aliasing just *has* to go.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Apr 14 04:05:31 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored) to selected 1.271 (colored)

fs types are names now; accompanying changes.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 12 02:23:14 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored) to selected 1.271 (colored)

Fix typo.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 11 23:43:04 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +1 -1 lines
Diff to previous 1.19 (colored) to selected 1.271 (colored)

Remove a bogus optimization I did.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Apr 11 22:03:17 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (colored) to selected 1.271 (colored)

slight optimization, kill unnecessary label.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 11 21:54:29 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17 (colored) to selected 1.271 (colored)

Add some comments.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Apr 11 21:37:10 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16 (colored) to selected 1.271 (colored)

vcount(): Don't try to vgone() our argument.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Mar 18 20:15:39 1994 UTC (30 years ago) by ws
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored) to selected 1.271 (colored)

Ooops. Forgot to move something.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Mar 9 21:23:53 1994 UTC (30 years ago) by ws
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored) to selected 1.271 (colored)

Make FFS optional

Revision 1.14 / (download) - annotate - [select for diffs], Wed Dec 22 13:51:14 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored) to selected 1.271 (colored)

move getnewfsid() to where jsp says it belongs.  update for header
files; clear new field and delete old vtype name.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 20 10:42:39 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored) to selected 1.271 (colored)

replace VREF as appropriate to avoid logical recusion

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 20 05:42:37 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored) to selected 1.271 (colored)

make searching a bit easier

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:48 1993 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored) to selected 1.271 (colored)

Canonicalize all #includes.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 9 18:00:18 1993 UTC (30 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored) to selected 1.271 (colored)

Do the right thing when arguments are NULL.
Don't leave filesystems marked busy after copyout() errors.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Nov 19 02:31:23 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored) to selected 1.271 (colored)

patch from Ukai Fumitoshi <ukai@kmc.kyoto-u.ac.jp>
to do the right thing with NFS fsid's and getnewfsid()

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 12 05:55:56 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored) to selected 1.271 (colored)

new specfs.h and fifo.h locations

Revision 1.7 / (download) - annotate - [select for diffs], Thu Aug 26 18:57:02 1993 UTC (30 years, 7 months ago) by pk
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored) to selected 1.271 (colored)

Added VPROC to vprint()'s vnode type representation array.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Aug 23 05:02:09 1993 UTC (30 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored) to selected 1.271 (colored)

changes from 0.9-ALPHA2 to 0.9-BETA

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 1 19:26:06 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored) to selected 1.271 (colored)

Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 27 06:02:03 1993 UTC (30 years, 9 months ago) by andrew
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-ALPHA
Branch point for: netbsd-0-9
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored) to selected 1.271 (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:55:39 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored) to selected 1.271 (colored)

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

Revision 1.2 / (download) - annotate - [select for diffs], Tue Mar 23 23:56:11 1993 UTC (31 years ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored) to selected 1.271 (colored)

modified files to support kernfs and fdesc fs

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: MAIN
Diff to selected 1.271 (colored)

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>