The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.101 / (download) - annotate - [select for diffs], Fri Dec 9 10:33:18 2022 UTC (2 months ago) by hannken
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.100: +5 -2 lines
Diff to previous 1.100 (colored)

Harden layered file systems usage of field "mnt_lower" against
forced unmounts of the lower layer.

- Dont allow "dead_rootmount" as lower layer.

- Take file system busy before a vfs operation walks down the stack.

Reported-by: syzbot+27b35e5675b1753cec03@syzkaller.appspotmail.com
Reported-by: syzbot+99071492e3de2eff49e9@syzkaller.appspotmail.com

Revision 1.100 / (download) - annotate - [select for diffs], Thu Nov 10 10:55:00 2022 UTC (2 months, 4 weeks ago) by hannken
Branch: MAIN
Changes since 1.99: +16 -2 lines
Diff to previous 1.99 (colored)

If built with DEBUG Limit the depth of file system stack so kernel sanitizers
may stress mount/unmount without exhausting the kernel stack.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Nov 4 11:20:39 2022 UTC (3 months ago) by hannken
Branch: MAIN
Changes since 1.98: +35 -2 lines
Diff to previous 1.98 (colored)

Add a helper to set or clear lower mount and use it.
Always add a reference to the lower mount.

Ride 9.99.105

Revision 1.98 / (download) - annotate - [select for diffs], Wed Oct 26 23:39:10 2022 UTC (3 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.97: +2 -3 lines
Diff to previous 1.97 (colored)

sys/filedesc.h: New home for extern cwdi0.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Sep 13 09:35:31 2022 UTC (4 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.96: +3 -2 lines
Diff to previous 1.96 (colored)

vflush(9): Insert `involuntary' preemption point at each vnode.

Currently there is a voluntary yield every 100ms, but that's a long
time.  Should help to avoid hogging the CPU while flushing lots of
data to big disks on systems without kpreemption.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Aug 26 11:03:53 2022 UTC (5 months, 2 weeks ago) by hannken
Branch: MAIN
Changes since 1.95: +27 -9 lines
Diff to previous 1.95 (colored)

Two defects in vfs_getnewfsid():

- Parallel mounts may get the same fsid.  Always increment "xxxfs_mntid"
  to make it unlikely.

- Directly walk "mountlist" to prevent a rare deadlock where one thread
  holds a vnode locked, calls vfs_getnewfsid() and the iterator has to
  wait for a suspended file system while the thread suspending needs
  this vnode lock.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Aug 22 09:14:24 2022 UTC (5 months, 2 weeks ago) by hannken
Branch: MAIN
Changes since 1.94: +5 -7 lines
Diff to previous 1.94 (colored)

Protect changing "v_mountedhere" with file system suspension instead
of vnode lock.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Jul 8 07:43:19 2022 UTC (7 months ago) by hannken
Branch: MAIN
Changes since 1.93: +16 -14 lines
Diff to previous 1.93 (colored)

Suspend file system after VFS_MOUNT() and before taking mnt_updating.
Prevents deadlock against concurrent unmounts of layered file systems.

Revision 1.93 / (download) - annotate - [select for diffs], Sat Apr 9 23:38:33 2022 UTC (10 months ago) by riastradh
Branch: MAIN
Changes since 1.92: +4 -4 lines
Diff to previous 1.92 (colored)

sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Mar 28 12:37:46 2022 UTC (10 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.91: +4 -3 lines
Diff to previous 1.91 (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.91 / (download) - annotate - [select for diffs], Thu Mar 24 12:59:56 2022 UTC (10 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.90: +4 -2 lines
Diff to previous 1.90 (colored)

vfs(9): Add missing vnode lock around VOP_CLOSE in vfs_mountroot.

Maybe vnode_if.c should be taught to KASSERT the vnode lock now that
locks always work.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Mar 19 13:50:28 2022 UTC (10 months, 3 weeks ago) by hannken
Branch: MAIN
Changes since 1.89: +4 -2 lines
Diff to previous 1.89 (colored)

Lock vnode across VOP_OPEN.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Mar 16 20:31:02 2022 UTC (10 months, 3 weeks ago) by andvar
Branch: MAIN
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

s/paniced/panicked/ and s/borken/broken/ in comments.

Revision 1.88 / (download) - annotate - [select for diffs], Sat Mar 12 15:32:32 2022 UTC (10 months, 4 weeks ago) by riastradh
Branch: MAIN
Changes since 1.87: +8 -2 lines
Diff to previous 1.87 (colored)

sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

	  Thread A			  Thread B
	obj->foo = 42;			obj->baz = 73;
	mumble(&obj->bar);		grumble(&obj->quux);
	/* membar_exit(); */		/* membar_exit(); */
	atomic_dec -- not last		atomic_dec -- last
					/* membar_enter(); */
					KASSERT(invariant(obj->foo,
					    obj->bar));
					free_stuff(obj);

The memory barriers ensure that

	obj->foo = 42;
	mumble(&obj->bar);

in thread A happens before

	KASSERT(invariant(obj->foo, obj->bar));
	free_stuff(obj);

in thread B.  Without them, this ordering is not guaranteed.

So in general it is necessary to do

	membar_exit();
	if (atomic_dec_uint_nv(&obj->refcnt) != 0)
		return;
	membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting.  (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these.  Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that.  It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Feb 4 15:33:57 2022 UTC (12 months ago) by hannken
Branch: MAIN
Changes since 1.86: +2 -3 lines
Diff to previous 1.86 (colored)

Stop clearing "v_mountedhere" in mount_domount() error path.

We did not set it and may clear the value from another mount.

Revision 1.84.2.2 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:00 2021 UTC (22 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.84.2.1: +12 -2 lines
Diff to previous 1.84.2.1 (colored) next main 1.85 (colored)

Sync with HEAD.

Revision 1.86 / (download) - annotate - [select for diffs], Tue Feb 16 09:56:32 2021 UTC (23 months, 3 weeks ago) by hannken
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.85: +12 -2 lines
Diff to previous 1.85 (colored)

Reorganize uvm_swap_shutdown() a bit, make sure the vnode gets
locked and referenced across the call to swap_off() and finally
use it from vfs_unmountall1() to remove swap after unmounting
the last file system.

Adresses PR kern/54969 (Disk cache is no longer flushed on shutdown)

Revision 1.84.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:14 2020 UTC (2 years, 1 month ago) by thorpej
Branch: thorpej-futex
Changes since 1.84: +11 -6 lines
Diff to previous 1.84 (colored)

Sync w/ HEAD.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Nov 19 10:47:47 2020 UTC (2 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.84: +11 -6 lines
Diff to previous 1.84 (colored)

We have to ignore interrupts when suspending here the same way
we have to do with revoke.

Reported-by: syzbot+0cfb253b382a9836450a@syzkaller.appspotmail.com

Revision 1.84 / (download) - annotate - [select for diffs], Tue Oct 13 13:15:39 2020 UTC (2 years, 3 months ago) by hannken
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.83: +5 -2 lines
Diff to previous 1.83 (colored)

Suspend file system before unmounting in mount_domount() error path
to prevent diagnostic assertions from unmount/flush.

Reported-by: syzbot+8d557f49c8b7888182eb@syzkaller.appspotmail.com
Reported-by: syzbot+e87fe1e769a3426d9bf3@syzkaller.appspotmail.com
Reported-by: syzbot+9c5b86e651e98c5bf438@syzkaller.appspotmail.com
Reported-by: syzbot+610b614af0d66179ca78@syzkaller.appspotmail.com
Reported-by: syzbot+7818ff113a1535ebc724@syzkaller.appspotmail.com

Revision 1.83 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.82: +6 -6 lines
Diff to previous 1.82 (colored)

Move proc_lock into the data segment.  It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.

Revision 1.70.4.2 / (download) - annotate - [select for diffs], Fri May 1 11:54:53 2020 UTC (2 years, 9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.70.4.1: +2 -23 lines
Diff to previous 1.70.4.1 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored)

Pull up following revision(s) (requested by hannken in ticket #881):

	sys/kern/vfs_mount.c: revision 1.82

Undo Rev. 1.79, it breaks root-on-raid where it destroys the component
disks before the raid:

 forcefully unmounting / (/dev/raid0a)...
 sd1: detached
 sd0: detached
 raid0: cache flush to component /dev/sd0a failed.
 raid0: cache flush to component /dev/sd1a failed.
 fatal page fault in supervisor mode
 Stopped in pid 2356.2356 (reboot) at netbsd:sdstrategy+0x36

Reopens PR kern/54969: Disk cache is no longer flushed on shutdown

Revision 1.82 / (download) - annotate - [select for diffs], Fri May 1 08:45:01 2020 UTC (2 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.81: +2 -23 lines
Diff to previous 1.81 (colored)

Undo Rev. 1.79, it breaks root-on-raid where it destroys the component
disks before the raid:

  forcefully unmounting / (/dev/raid0a)...
  sd1: detached
  sd0: detached
  raid0: cache flush to component /dev/sd0a failed.
  raid0: cache flush to component /dev/sd1a failed.
  fatal page fault in supervisor mode
  Stopped in pid 2356.2356 (reboot) at netbsd:sdstrategy+0x36

Reopens PR kern/54969: Disk cache is no longer flushed on shutdown

Revision 1.75.4.2 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:06 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.75.4.1: +14 -20 lines
Diff to previous 1.75.4.1 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.70.4.1 / (download) - annotate - [select for diffs], Wed Apr 22 18:05:11 2020 UTC (2 years, 9 months ago) by martin
Branch: netbsd-9
Changes since 1.70: +23 -2 lines
Diff to previous 1.70 (colored)

Pull up following revision(s) (requested by gson in ticket #839):

	sys/kern/vfs_mount.c: revision 1.79

Destroy anonymous device vnodes on reboot once the last file system
got unmounted and the mount list is empty.

PR kern/54969: Disk cache is no longer flushed on shutdown

Revision 1.81 / (download) - annotate - [select for diffs], Tue Apr 21 21:42:47 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.80: +13 -19 lines
Diff to previous 1.80 (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.67.4.3 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.67.4.2: +27 -6 lines
Diff to previous 1.67.4.2 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored)

Sync with HEAD

Revision 1.80 / (download) - annotate - [select for diffs], Mon Apr 20 21:39:05 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

Rename buf_syncwait() to vfs_syncwait(), and have it wait on v_numoutput
rather than BC_BUSY.  Removes the dependency on bufhash.

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:10 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.75: +31 -11 lines
Diff to previous 1.75 (colored)

Sync with HEAD

Revision 1.79 / (download) - annotate - [select for diffs], Sun Apr 19 13:26:17 2020 UTC (2 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: bouyer-xenpvh-base1
Changes since 1.78: +23 -2 lines
Diff to previous 1.78 (colored)

Destroy anonymous device vnodes on reboot once the last file system
got unmounted and the mount list is empty.

PR kern/54969: Disk cache is no longer flushed on shutdown

Revision 1.78 / (download) - annotate - [select for diffs], Mon Apr 13 19:23:18 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.77: +5 -5 lines
Diff to previous 1.77 (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.77 / (download) - annotate - [select for diffs], Mon Apr 13 15:54:45 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.76: +4 -4 lines
Diff to previous 1.76 (colored)

hardclock_ticks -> getticks()

Revision 1.67.4.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.67.4.1: +68 -49 lines
Diff to previous 1.67.4.1 (colored) to branchpoint 1.67 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.76 / (download) - annotate - [select for diffs], Fri Apr 10 22:34:36 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411
Changes since 1.75: +5 -6 lines
Diff to previous 1.75 (colored)

vfs_mountroot(): don't needlessly grab a second reference to the root vnode
(the kernel never chdirs) nor a lock on it.

Revision 1.73.2.3 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.73.2.2: +2 -2 lines
Diff to previous 1.73.2.2 (colored) to branchpoint 1.73 (colored) next main 1.74 (colored)

Sync with head.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Feb 23 22:14:03 2020 UTC (2 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.74: +20 -14 lines
Diff to previous 1.74 (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.73.2.2 / (download) - annotate - [select for diffs], Sat Jan 25 15:54:03 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.73.2.1: +20 -14 lines
Diff to previous 1.73.2.1 (colored) to branchpoint 1.73 (colored)

Make cwdinfo use mostly lockless, and largely hide the details in vfs_cwd.c.

Revision 1.73.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

Sync with head.

Revision 1.74 / (download) - annotate - [select for diffs], Fri Jan 17 20:08:09 2020 UTC (3 years ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (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.73 / (download) - annotate - [select for diffs], Sun Dec 22 19:47:34 2019 UTC (3 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.72: +41 -29 lines
Diff to previous 1.72 (colored)

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

Revision 1.72 / (download) - annotate - [select for diffs], Sat Nov 16 10:07:53 2019 UTC (3 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.71: +5 -4 lines
Diff to previous 1.71 (colored)

NULL-check the structure pointer, not the address of its first field. Also
add KASSERT. For clarity, and to appease kUBSan.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Aug 19 09:32:42 2019 UTC (3 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.70: +5 -4 lines
Diff to previous 1.70 (colored)

If we could not start extattr for some reason, don't advertise extattr in the
mount.

Revision 1.67.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:04 2019 UTC (3 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.67: +21 -28 lines
Diff to previous 1.67 (colored)

Sync with HEAD

Revision 1.70 / (download) - annotate - [select for diffs], Wed Feb 20 10:08:37 2019 UTC (3 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.69: +9 -5 lines
Diff to previous 1.69 (colored)

Move fstrans_unmount() to vfs_rele(), just before it would free the mount.
Don't take a mount reference for fstrans as it gets notified about the release.

Defer the final free of the mount to fstrans_mount_dtor() when fstrans
has released all references to this mount.  Prevents the mount's memory
to be reused as a new mount before fstrans released all references.

Address PR kern/53928 modules/t_builtin:disable test case randomly fails.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Feb 20 10:07:27 2019 UTC (3 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.68: +5 -7 lines
Diff to previous 1.68 (colored)

Attach "mnt_transinfo" to "dead_rootmount" so every mount has a
valid "mnt_transinfo" and remove now unneeded flag IMNT_HAS_TRANS.

Run fstrans_start()/fstrans_done() on dead_rootmount if FSTRANS_DEAD_ENABLED.
Should become the default for DIAGNOSTIC in the future.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Feb 5 09:49:44 2019 UTC (4 years ago) by hannken
Branch: MAIN
Changes since 1.67: +11 -20 lines
Diff to previous 1.67 (colored)

Allow dounmount() with file system already suspended.

Remove no longer valid test for layered mounts,
ZFS will unmount snapshots bottom up.

Revision 1.14.2.5 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (5 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.14.2.4: +492 -245 lines
Diff to previous 1.14.2.4 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

update from HEAD

Revision 1.31.2.7 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:08 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.2.6: +324 -132 lines
Diff to previous 1.31.2.6 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

Sync with HEAD

Revision 1.65.2.2 / (download) - annotate - [select for diffs], Fri Aug 25 05:46:46 2017 UTC (5 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.65.2.1: +10 -3 lines
Diff to previous 1.65.2.1 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored)

Pull up following revision(s) (requested by hannken in ticket #227):
	sys/sys/vnode_impl.h: revision 1.16
	sys/kern/vfs_vnode.c: revision 1.97
	sys/kern/vfs_vnode.c: revision 1.98
	sys/kern/vfs_mount.c: revision 1.67
	sys/miscfs/deadfs/dead_vfsops.c: revision 1.8
No need to cache anonymous device vnodes, they will never be looked up.
Set key to (dead_rootmount, 0, NULL) and add assertions.
--
Change forced unmount to revert open device vnodes to anonymous devices.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Aug 21 09:00:21 2017 UTC (5 years, 5 months ago) by hannken
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, 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, pgoyette-compat, nick-nhusb-base-20170825
Branch point for: phil-wifi
Changes since 1.66: +10 -3 lines
Diff to previous 1.66 (colored)

Change forced unmount to revert open device vnodes to anonymous devices.

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Sun Jun 4 20:35:01 2017 UTC (5 years, 8 months ago) by bouyer
Branch: netbsd-8
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

pullup the following revisions, requested by hannken in ticket #2:
	src/share/man/man9/fstrans.9			1.25
	src/sys/kern/vfs_mount.c			1.66
	src/sys/kern/vfs_subr.c				1.468
	src/sys/kern/vfs_trans.c			1.46
	src/sys/kern/vfs_vnode.c			1.94, 1.95, 1.96
	src/sys/kern/vnode_if.c				1.105, 1.106
	src/sys/kern/vnode_if.sh			1.65, 1.66
	src/sys/kern/vnode_if.src			1.76
	src/sys/miscfs/genfs/genfs_io.c			1.69
	src/sys/miscfs/genfs/genfs_vnops.c		1.196, 1.197
	src/sys/miscfs/genfs/layer_extern.h		1.40
	src/sys/miscfs/genfs/layer_vfsops.c		1.51
	src/sys/miscfs/genfs/layer_vnops.c		1.67
	src/sys/miscfs/nullfs/null_vnops.c		1.42
	src/sys/miscfs/overlay/overlay_vnops.c		1.24
	src/sys/miscfs/umapfs/umap_vnops.c		1.60
	src/sys/rump/include/rump/rumpvnode_if.h	1.29, 1.30
	src/sys/rump/librump/rumpkern/emul.c		1.182
	src/sys/rump/librump/rumpvfs/rumpvnode_if.c	1.29, 1.30
	src/sys/sys/fstrans.h				1.11
	src/sys/sys/vnode.h				1.278
	src/sys/sys/vnode_if.h				1.100, 1.101
	src/sys/sys/vnode_impl.h			1.14, 1.15
	src/sys/ufs/lfs/lfs_pages.c			1.12

Vnode state, lock and fstrans cleanup:
- Rename vnode state "VS_ACTIVE" to "VS_LOADED" and add synthetic
  state "VS_ACTIVE" to assert a loaded vnode with usecount > 0.

- Redo FSTRANS in vnode_if.c and use it for VOP_LOCK and VOP_UNLOCK.

- Cleanup the genfs lock operations.

- Make "struct vnode_impl" member "vi_lock" a krwlock_t again.

- Remove the lock type argument from fstrans_start and
  fstrans_start_nowait,
  remove now unused FSTRANS state "FSTRANS_SUSPENDING".

Revision 1.66 / (download) - annotate - [select for diffs], Sun Jun 4 08:05:42 2017 UTC (5 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

Operations fstrans_start() and fstrans_start_nowait() now always
use FSTRANS_SHARED as lock type so remove the lock type argument.

File system state FSTRANS_SUSPENDING is now unused so remove it.

Regen vnode_if files.

Ride 8.99.1 less than a hour ago.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:13 2017 UTC (5 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: netbsd-8-base
Branch point for: netbsd-8
Changes since 1.64: +2 -5 lines
Diff to previous 1.64 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.64 / (download) - annotate - [select for diffs], Wed May 24 09:53:55 2017 UTC (5 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.63: +3 -39 lines
Diff to previous 1.63 (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.63 / (download) - annotate - [select for diffs], Wed May 24 09:52:59 2017 UTC (5 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.62: +2 -30 lines
Diff to previous 1.62 (colored)

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

Remove now unused syncer_mutex.

Revision 1.58.2.3 / (download) - annotate - [select for diffs], Fri May 19 00:22:57 2017 UTC (5 years, 8 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.58.2.2: +12 -3 lines
Diff to previous 1.58.2.2 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.62 / (download) - annotate - [select for diffs], Wed May 17 12:45:03 2017 UTC (5 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base3
Changes since 1.61: +12 -3 lines
Diff to previous 1.61 (colored)

Suspend file system while unmounting.  This way no operations run
on the mounted file system during unmount and all operations see
the state before or after the (possibly failed) unmount.

Revision 1.58.2.2 / (download) - annotate - [select for diffs], Thu May 11 02:58:40 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.58.2.1: +18 -14 lines
Diff to previous 1.58.2.1 (colored) to branchpoint 1.58 (colored)

Sync with HEAD

Revision 1.61 / (download) - annotate - [select for diffs], Sun May 7 08:26:58 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base2
Changes since 1.60: +12 -4 lines
Diff to previous 1.60 (colored)

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

Adapt sched_sync() and do_sys_sync().

Revision 1.60 / (download) - annotate - [select for diffs], Sun May 7 08:24:20 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.59: +8 -9 lines
Diff to previous 1.59 (colored)

Move fstrans initialization to vfs_mountalloc().

Revision 1.59 / (download) - annotate - [select for diffs], Sun May 7 08:21:08 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.58: +2 -5 lines
Diff to previous 1.58 (colored)

Remove now invalid comment.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Thu Apr 27 05:36:37 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.58: +22 -16 lines
Diff to previous 1.58 (colored)

Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita.  There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.

Revision 1.40.2.6 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:27 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.40.2.5: +297 -82 lines
Diff to previous 1.40.2.5 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

Sync with HEAD

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:03 2017 UTC (5 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.45: +395 -130 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

Sync with HEAD

Revision 1.58 / (download) - annotate - [select for diffs], Mon Apr 17 08:34:27 2017 UTC (5 years, 9 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.57: +45 -8 lines
Diff to previous 1.57 (colored)

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

Revision 1.57 / (download) - annotate - [select for diffs], Mon Apr 17 08:32:55 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.56: +5 -8 lines
Diff to previous 1.56 (colored)

No need to keep a not yet visible mount busy.  Move vfs_busy()
from vfs_mountalloc() to vfs_rootmountalloc().

XXX: Do we really need to vfs_busy() for vfs_mountroot?

Revision 1.56 / (download) - annotate - [select for diffs], Mon Apr 17 08:32:01 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.55: +13 -18 lines
Diff to previous 1.55 (colored)

Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Apr 17 08:31:02 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.54: +29 -17 lines
Diff to previous 1.54 (colored)

Add vfs_ref(mp) and vfs_rele(mp) to add or remove a reference to
struct mount.  Rename vfs_destroy(mp) to vfs_rele(mp) and replace
incrementing mp->mnt_refcnt with vfs_ref(mp).

Revision 1.54 / (download) - annotate - [select for diffs], Mon Apr 17 08:29:58 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.53: +19 -34 lines
Diff to previous 1.53 (colored)

Cleanup after mountlist iterator:
- remove now unused field mnt_list.
- rename mount_list to mountlist and make it local to vfs_mount.c.
- make mountlist_lock local to vfs_mount.c.

Change pstat.c to retrieve vnodes by lru lists.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Apr 12 10:35:10 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.52: +62 -32 lines
Diff to previous 1.52 (colored)

Switch vfs_getvfs(), dounmount() and vfs_mountroot() to mountlist iterator.

Add a helper to retrieve a mount with "highest generation < arg" and
use it from vfs_unmount_forceone() and vfs_unmountall1().

Revision 1.52 / (download) - annotate - [select for diffs], Tue Apr 11 07:46:37 2017 UTC (5 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.51: +167 -8 lines
Diff to previous 1.51 (colored)

Add an iterator over the currently mounted file systems.

Ride 7.99.68

Revision 1.51 / (download) - annotate - [select for diffs], Thu Mar 30 09:13:01 2017 UTC (5 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: jdolecek-ncq-base, jdolecek-ncq
Changes since 1.50: +8 -8 lines
Diff to previous 1.50 (colored)

Change _fstrans_start() to allocate per lwp info for layered file
systems to get a reference on the mount.

Set mnt_lower on successfull mount only.

Revision 1.40.2.5 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:48 2017 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.40.2.4: +154 -108 lines
Diff to previous 1.40.2.4 (colored) to branchpoint 1.40 (colored)

Sync with HEAD

Revision 1.50 / (download) - annotate - [select for diffs], Mon Mar 6 10:11:21 2017 UTC (5 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.49: +8 -8 lines
Diff to previous 1.49 (colored)

Always use the lowest mount for fstrans and suspend.  This way we
enter/leave or suspend/resume the stack of layered file systems as a unit.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Mar 6 10:10:43 2017 UTC (5 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.48: +15 -2 lines
Diff to previous 1.48 (colored)

Deny unmounting file systems below layered file systems.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Feb 22 09:50:13 2017 UTC (5 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.47: +13 -2 lines
Diff to previous 1.47 (colored)

Enable fstrans on all file systems.

Welcome to 7.99.61

Revision 1.31.2.6 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (6 years ago) by skrll
Branch: nick-nhusb
Changes since 1.31.2.5: +131 -109 lines
Diff to previous 1.31.2.5 (colored) to branchpoint 1.31 (colored)

Sync with HEAD

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jan 27 10:50:10 2017 UTC (6 years ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.46: +23 -18 lines
Diff to previous 1.46 (colored)

Vrecycle() cannot wait for the vnode lock.  On a leaf file system this lock
will always succeed as we hold the last reference and prevent further
references.  On layered file systems waiting for the lock would open a can of
deadlocks as the lower vnodes may have other active references.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Jan 27 10:46:18 2017 UTC (6 years ago) by hannken
Branch: MAIN
Changes since 1.45: +77 -56 lines
Diff to previous 1.45 (colored)

When called with WRITECLOSE vflush() must sync the vnode and take
care of unlinked but open vnodes.

PR kern/30525 remounting ffs read-only (mount -ur) does not sync metadata.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jan 13 10:10:32 2017 UTC (6 years ago) by hannken
Branch: MAIN
CVS Tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.44: +20 -35 lines
Diff to previous 1.44 (colored)

Add file-local iterator variant vfs_vnode_iterator_next1() that
waits for vnodes to become reclaimed and use it from vflush().

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jan 11 09:07:57 2017 UTC (6 years ago) by hannken
Branch: MAIN
Changes since 1.43: +36 -25 lines
Diff to previous 1.43 (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.40.2.4 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:49 2017 UTC (6 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.40.2.3: +6 -6 lines
Diff to previous 1.40.2.3 (colored) to branchpoint 1.40 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jan 2 10:33:28 2017 UTC (6 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.42: +4 -4 lines
Diff to previous 1.42 (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.42 / (download) - annotate - [select for diffs], Wed Dec 14 15:46:57 2016 UTC (6 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

Remove the "target" argment from vfs_drainvnodes() as it is
always equal to "desiredvnodes" and move its definition
from sys/vnode.h to sys/vnode_impl.h.

Extend vfs_drainvnodes() to also wait for deferred vrele to flush
and replace the call to vrele_flush() with a call to vfs_drainvnodes().

Revision 1.31.2.5 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:26 2016 UTC (6 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.2.4: +3 -5 lines
Diff to previous 1.31.2.4 (colored) to branchpoint 1.31 (colored)

Sync with HEAD

Revision 1.40.2.3 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:17 2016 UTC (6 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.40.2.2: +3 -5 lines
Diff to previous 1.40.2.2 (colored) to branchpoint 1.40 (colored)

Sync with HEAD

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 3 11:03:31 2016 UTC (6 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204
Changes since 1.40: +3 -5 lines
Diff to previous 1.40 (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.40.2.2 / (download) - annotate - [select for diffs], Fri Jul 22 03:55:12 2016 UTC (6 years, 6 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.40.2.1: +13 -9 lines
Diff to previous 1.40.2.1 (colored) to branchpoint 1.40 (colored)

Fix up the error/exit path.

Return actual error, not blindly report success!

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Wed Jul 20 23:47:57 2016 UTC (6 years, 6 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.40: +15 -13 lines
Diff to previous 1.40 (colored)

Adapt machine-independant code to the new {b,c}devsw reference-counting
(using localcount(9)).  All callers of {b,c}devsw_lookup() now call
{b,c}devsw_lookup_acquire() which retains a reference on the 'struct
{b,c}devsw'.  This reference must be released by the caller once it is
finished with the structure's content (or other data that would disappear
if the 'struct {b,c}devsw' were to disappear).

Revision 1.40 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:43 2016 UTC (6 years, 7 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.31.2.4 / (download) - annotate - [select for diffs], Sun May 29 08:44:37 2016 UTC (6 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.2.3: +8 -8 lines
Diff to previous 1.31.2.3 (colored) to branchpoint 1.31 (colored)

Sync with HEAD

Revision 1.39 / (download) - annotate - [select for diffs], Thu May 19 14:48:28 2016 UTC (6 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Change "ISSET(vp->v_iflag, VI_XLOCK)" to "vdead_check(vp, VDEAD_NOWAIT)".

Revision 1.38 / (download) - annotate - [select for diffs], Thu May 19 14:47:33 2016 UTC (6 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.37: +7 -7 lines
Diff to previous 1.37 (colored)

Add VFS_VNODE_PRIVATE protected operations vnalloc_marker() to create,
vnfree_marker() to destroy and vnis_marker() to test for marker vnodes.

Make operations vnalloc() and vnfree() local to vfs_vnode.c.

Revision 1.30.2.3 / (download) - annotate - [select for diffs], Wed Nov 4 17:55:23 2015 UTC (7 years, 3 months ago) by riz
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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
Changes since 1.30.2.2: +3 -3 lines
Diff to previous 1.30.2.2 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

Pull up following revision(s) (requested by manu in ticket #962):
	sys/kern/vfs_mount.c: revision 1.36
Do not VFS_SYNC before VFS_UNMOUNT on force unmount
VFS_SYNC does not consider whether we are performing a force unmount or not,
and therefore it can wait for a while if the filesytstem is misbehaving.
Removing VFS_SYNC before VFS_UNMOUNT on forced unmount fixes the problem.
This should not cause harm as the VFS_SYNC seems just useless.
As noted by Chuck Silvers in
http://mail-index.netbsd.org/tech-kern/2015/07/13/msg019156.html
- Nothing seems to prevent vnodes from getting dirty again after VFS_SYNC call.
- Filesystems do flush data through vflush() in VFS_UNMOUNT anyway.
As a consequence, the VFS_SYNC call in do_unmount() could probably be
completely removed. But since such a change is quite dangerous, we just
remove it in the case of forced unmounts, which are situations where
the risk of data loss is known to the operator.

Revision 1.31.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.2.2: +31 -6 lines
Diff to previous 1.31.2.2 (colored) to branchpoint 1.31 (colored)

Sync with HEAD

Revision 1.37 / (download) - annotate - [select for diffs], Wed Aug 19 08:40:02 2015 UTC (7 years, 5 months ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.36: +30 -5 lines
Diff to previous 1.36 (colored)

Redo Rev. 1.30: Change vfs_vnode_iterator_next() to skip reclaiming
vnodes (VI_XLOCK set) without waiting and change vflush() to wait for
these vnodes.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Aug 2 03:29:22 2015 UTC (7 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Do not VFS_SYNC before VFS_UNMOUNT on force unmount

VFS_SYNC does not consider whether we are performing a force unmount or not,
and therefore it can wait for a while if the filesytstem is misbehaving.
Removing VFS_SYNC before VFS_UNMOUNT on forced unmount fixes the problem.

This should not cause harm as the VFS_SYNC seems just useless.
As noted by Chuck Silvers in
http://mail-index.netbsd.org/tech-kern/2015/07/13/msg019156.html
- Nothing seems to prevent vnodes from getting dirty again after VFS_SYNC call.
- Filesystems do flush data through vflush() in VFS_UNMOUNT anyway.

As a consequence, the VFS_SYNC call in do_unmount() could probably be
completely removed. But since such a change is quite dangerous, we just
remove it in the case of forced unmounts, which are situations where
the risk of data loss is known to the operator.

Revision 1.31.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:22 2015 UTC (7 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31.2.1: +12 -22 lines
Diff to previous 1.31.2.1 (colored) to branchpoint 1.31 (colored)

Sync with HEAD

Revision 1.35 / (download) - annotate - [select for diffs], Wed May 6 15:57:08 2015 UTC (7 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.34: +8 -18 lines
Diff to previous 1.34 (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.34 / (download) - annotate - [select for diffs], Mon Apr 20 13:44:16 2015 UTC (7 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Make vget always return vnode unlocked.

Convert callers who want locks to use vn_lock afterward.

Add extra argument so the compiler will report stragglers.

Revision 1.31.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:20 2015 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.31: +6 -5 lines
Diff to previous 1.31 (colored)

Sync with HEAD

Revision 1.33 / (download) - annotate - [select for diffs], Mon Mar 9 15:35:11 2015 UTC (7 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.32: +3 -4 lines
Diff to previous 1.32 (colored)

The use of root_device is not limited to vfs, so don't supply it in
vfs_mount.c, use subr_device.c instead.

Fixes rump kernels built with DEBUG by again not making the base depend
on the vfs faction, as reported by Patrick Welche.

Revision 1.30.2.2 / (download) - annotate - [select for diffs], Fri Jan 9 14:50:35 2015 UTC (8 years, 1 month ago) by martin
Branch: netbsd-7
CVS Tags: 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
Changes since 1.30.2.1: +5 -3 lines
Diff to previous 1.30.2.1 (colored) to branchpoint 1.30 (colored)

Pull up following revision(s) (requested by hannken in ticket #398):
	sys/kern/vfs_mount.c: revision 1.32
vfs_vnode_iterator_destroy: set v_usecount of marker to zero to prevent
an assertion from vnfree().

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jan 8 12:06:50 2015 UTC (8 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.31: +5 -3 lines
Diff to previous 1.31 (colored)

vfs_vnode_iterator_destroy: set v_usecount of marker to zero to prevent
an assertion from vnfree().

Revision 1.12.6.2 / (download) - annotate - [select for diffs], Thu Dec 4 05:38:54 2014 UTC (8 years, 2 months ago) by snj
Branch: netbsd-6
Changes since 1.12.6.1: +29 -10 lines
Diff to previous 1.12.6.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

Pull up following revision(s) (requested by manu in ticket #1196):
	sys/kern/vfs_mount.c: revision 1.31
	sys/ufs/ffs/ffs_vfsops.c: revision 1.302
	sys/ufs/ufs/ufs_extattr.c: revision 1.44
Fix use-after-free on failed unmount with extended attribute enabled
When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.
The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart
As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Tue Nov 18 18:40:06 2014 UTC (8 years, 2 months ago) by snj
Branch: netbsd-7
Changes since 1.30: +29 -10 lines
Diff to previous 1.30 (colored)

Pull up following revision(s) (requested by manu in ticket #246):
	sys/kern/vfs_mount.c: revision 1.31
	sys/ufs/ffs/ffs_vfsops.c: revision 1.302
	sys/ufs/ufs/ufs_extattr.c: revision 1.44
Fix use-after-free on failed unmount with extended attribute enabled
When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.
The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart
As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Nov 14 10:09:50 2014 UTC (8 years, 2 months ago) by manu
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.30: +29 -10 lines
Diff to previous 1.30 (colored)

Fix use-after-free on failed unmount with extended attribute enabled

When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.

The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart

As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.

Revision 1.14.2.4 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.14.2.3: +136 -154 lines
Diff to previous 1.14.2.3 (colored) to branchpoint 1.14 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (8 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.28: +50 -50 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

Rebase.

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 30 08:46:00 2014 UTC (8 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.29: +4 -5 lines
Diff to previous 1.29 (colored)

vfs_vnode_iterator_next(): if a vnode is reclaiming (VI_XLOCK) skip
the filter.  Vget() will wait until the vnode disappeared.  No more
"dangling vnode" panics on unmount.

Revision 1.29 / (download) - annotate - [select for diffs], Sat May 24 16:34:04 2014 UTC (8 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.28: +51 -50 lines
Diff to previous 1.28 (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.11.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:41:04 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.11.2.4: +176 -167 lines
Diff to previous 1.11.2.4 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.19.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:08 2014 UTC (8 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.19: +122 -140 lines
Diff to previous 1.19 (colored) next main 1.20 (colored)

sync with head

Revision 1.28 / (download) - annotate - [select for diffs], Tue Mar 18 10:21:47 2014 UTC (8 years, 10 months 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
Branch point for: tls-earlyentropy
Changes since 1.27: +6 -42 lines
Diff to previous 1.27 (colored)

Operations vmark(), vunmark() and vismarker() have been replaced by
vfs_vnode_iterator_*(), remove them.

Document vfs_vnode_iterator_*().

Make VI_MARKER private to vfs_vnode.c, vfs_mount.c and unfortunately
to ufs/lfs/lfs_segment.c.

Welcome to 6.99.37

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 5 09:37:29 2014 UTC (8 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.26: +105 -50 lines
Diff to previous 1.26 (colored)

Current support for iterating over mnt_vnodelist is rudimentary.  Every
caller has to care about list and vnode mutexes, reference count being zero,
intermediate vnode states like VI_CLEAN, VI_XLOCK, VI_MARKER and so on.

Add an interface to iterate over a vnode list:

void vfs_vnode_iterator_init(struct mount *mp, struct vnode_iterator **marker)
void vfs_vnode_iterator_destroy(struct vnode_iterator *marker)
bool vfs_vnode_iterator_next(struct vnode_iterator *marker, struct vnode **vpp)

vfs_vnode_iterator_next() returns either "false / *vpp == NULL" when done
or "true / *vpp != NULL" to return the next referenced vnode from the list.

To make vrecycle() work in this environment change it to

bool vrecycle(struct vnode *vp)

where "vp" is a referenced vnode to be destroyed if this is the last reference.

Discussed on tech-kern.

Welcome to 6.99.34

Revision 1.26 / (download) - annotate - [select for diffs], Thu Feb 27 13:00:06 2014 UTC (8 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.25: +2 -29 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Wed Nov 27 17:25:46 2013 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored)

one more *_END(head) -> NULL

Revision 1.24 / (download) - annotate - [select for diffs], Sat Nov 23 13:35:36 2013 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.23: +29 -22 lines
Diff to previous 1.23 (colored)

change the mountlist CIRCLEQ into a TAILQ

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 29 09:53:51 2013 UTC (9 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.22: +11 -31 lines
Diff to previous 1.22 (colored)

Vnode API cleanup pass 1.

- Make these defines and functions private to vfs_vnode.c:

  VC_MASK, VC_LOCK, DOCLOSE, VI_IANCTREDO and VI_INACTNOW
  vclean() and vrelel()

- Remove the long time unused lwp argument from vrecycle().

- Remove vtryget(), it is responsible for ugly hacks and doesn't
  look that effective.

Presented on tech-kern.

Welcome to 6.99.25

Revision 1.22 / (download) - annotate - [select for diffs], Fri Oct 25 20:37:17 2013 UTC (9 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored)

Mark diagnostic-only variables

Revision 1.21 / (download) - annotate - [select for diffs], Mon Sep 30 18:58:00 2013 UTC (9 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Fri Aug 30 12:58:22 2013 UTC (9 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.19: +7 -4 lines
Diff to previous 1.19 (colored)

Dounmount() violates the locking protocol for member v_mountedhere.
A vnode lock is required to access or modify this field.

Lock/unlock the vnode when clearing v_mountedhere.

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

Should fix PR #48135 (Bad locking for umount)

Revision 1.14.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:58 2013 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.14.2.2: +51 -19 lines
Diff to previous 1.14.2.2 (colored) to branchpoint 1.14 (colored)

resync from head

Revision 1.19 / (download) - annotate - [select for diffs], Sun Apr 28 21:34:31 2013 UTC (9 years, 9 months ago) by mlelstv
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.18: +15 -4 lines
Diff to previous 1.18 (colored)

fix locking order mountlist_lock -> mnt_unmounting.
Set IMNT_GONE early to protect against concurrent dounmount()
and vfs_busy() before the mountpoint is removed from
mount list.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Apr 26 22:27:16 2013 UTC (9 years, 9 months ago) by mlelstv
Branch: MAIN
Changes since 1.17: +39 -18 lines
Diff to previous 1.17 (colored)

Correct umount semantics to return EBUSY when a filesystem is busy
instead of failing filesystem operations with EBUSY when attempting
an umount.
This fixes kern/38141.

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:56 2013 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.14.2.1: +12 -17 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored)

resync with head

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 13 14:03:48 2013 UTC (9 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.16: +8 -13 lines
Diff to previous 1.16 (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.11.2.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:23 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.11.2.3: +6 -6 lines
Diff to previous 1.11.2.3 (colored) to branchpoint 1.11 (colored)

sync with head

Revision 1.16 / (download) - annotate - [select for diffs], Fri Dec 14 18:39:48 2012 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base8
Changes since 1.15: +6 -6 lines
Diff to previous 1.15 (colored)

Adjust unmount prints to avoid "boothowto = AB_VERBOSE" from being
cluttered like this:

unmounting file systems...unmounted kernfs on /kern type kernfs
unmounted etcetc.
 done

tested: ~AB_VERBOSE, AB_VERBOSE, -DDEBUG

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:45 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.11.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:38 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.11.2.2: +3 -3 lines
Diff to previous 1.11.2.2 (colored) to branchpoint 1.11 (colored)

sync with head

Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 27 17:18:39 2012 UTC (10 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.

Revision 1.12.4.2 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:34 2012 UTC (10 years, 8 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.12.4.1: +9 -1 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

sync to latest -current.

Revision 1.11.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:12 2012 UTC (10 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.11.2.1: +11 -3 lines
Diff to previous 1.11.2.1 (colored) to branchpoint 1.11 (colored)

sync with head.

Revision 1.12.6.1 / (download) - annotate - [select for diffs], Sat May 19 15:01:35 2012 UTC (10 years, 8 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.12: +11 -3 lines
Diff to previous 1.12 (colored)

Pull up following revision(s) (requested by manu in ticket #259):
	sys/kern/vfs_syscalls.c: revision 1.456
	sys/kern/vfs_mount.c: revision 1.14
	sys/kern/vfs_syscalls.c: revision 1.452
	sys/kern/vfs_syscalls.c: revision 1.453
	sys/kern/vfs_syscalls.c: revision 1.454
Do not use vp after mount_domount() call as it sets it to NULL on success.
This fixes a panic when starting extended attributes.
Fix mount -o extattr : previous patch fixed a panic but caused operation
to happen on the mount point instead of the mounted filesystem.
Fix the extattr start fix. Looking up the filesystemroot vnode again
does not seems to be reliable. Instead save it before mount_domount()
sets it to NULL.
Move VFS_EXTATTRCTL to mount_domount().  This makes the
fs/puffs/t_fuzz:mountfuzz7, fs/puffs/t_fuzz:mountfuzz8,
and fs/zfs/t_zpool:create tests pass again.  Patch from
manu, discussed on tech-kern and committed at his request.

Revision 1.14 / (download) - annotate - [select for diffs], Tue May 8 08:44:49 2012 UTC (10 years, 9 months ago) by gson
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.13: +11 -3 lines
Diff to previous 1.13 (colored)

Move VFS_EXTATTRCTL to mount_domount().  This makes the
fs/puffs/t_fuzz:mountfuzz7, fs/puffs/t_fuzz:mountfuzz8,
and fs/zfs/t_zpool:create tests pass again.  Patch from
manu, discussed on tech-kern and committed at his request.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:31 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.11: +3 -26 lines
Diff to previous 1.11 (colored)

sync with head

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:41 2012 UTC (10 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.12: +2 -21 lines
Diff to previous 1.12 (colored)

sync to latest -current.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:55 2012 UTC (10 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8
Changes since 1.12: +2 -21 lines
Diff to previous 1.12 (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.12 / (download) - annotate - [select for diffs], Fri Nov 18 21:17:45 2011 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: netbsd-6, jmcneill-usbmp
Changes since 1.11: +3 -7 lines
Diff to previous 1.11 (colored)

- collect the long (and sometimes incomplete) lists of basic flags into
  the header file and use that.
- sort the list of basic flags
- add MNT_RELATIME, ST_RELATIME
- mask all the op flags, for symmetry.

The real bit difference is (which is harmless):
    - mount was missing MNT_EXTATTR
    - update sets MNT_RDONLY twice
    - ops also could or in MNT_GETARGS, but this is impossible because the
      code would have chosen to do getargs then.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Oct 14 09:23:31 2011 UTC (11 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.10: +10 -4 lines
Diff to previous 1.10 (colored)

Change the vnode locking protocol of VOP_GETATTR() to request at least
a shared lock.  Make all calls outside of file systems respect it.

The calls from file systems need review.

No objections from tech-kern.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 7 09:35:05 2011 UTC (11 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.9: +2 -5 lines
Diff to previous 1.9 (colored)

As vnalloc() always allocates with PR_WAITOK there is no longer the need
to test its result for NULL.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 1 12:29:41 2011 UTC (11 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.8: +1 -11 lines
Diff to previous 1.8 (colored)

undo previous

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 1 12:15:07 2011 UTC (11 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.7: +13 -3 lines
Diff to previous 1.7 (colored)

fix typo.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Sep 1 09:04:08 2011 UTC (11 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.6: +5 -4 lines
Diff to previous 1.6 (colored)

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

Revision 1.4.4.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:21 2011 UTC (11 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.4: +13 -12 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:56 2011 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.5: +11 -11 lines
Diff to previous 1.5 (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.4.2.3 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:30 2011 UTC (11 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.4.2.2: +2 -1 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

sync with head

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:41 2011 UTC (11 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.5.2.1: +1371 -0 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Sync with HEAD.

Revision 1.5.2.1, Sun Jun 5 09:04:22 2011 UTC (11 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.5: +0 -1371 lines
FILE REMOVED

file vfs_mount.c was added on branch jruoho-x86intr on 2011-06-06 09:09:41 +0000

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 5 09:04:22 2011 UTC (11 years, 8 months ago) by dsl
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Branch point for: jruoho-x86intr
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

Don't directly call sys_sync() from random bits of code, instead
  add do_sys_sync() that takes an 'lwp' (for l_cred) as an argument.
Explicitly pass &lwp0 rather than NULL and expecting sys_sync to
  substitute some random lwp.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:11 2011 UTC (11 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.4.2.1: +1370 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored)

sync with head

Revision 1.4.2.1, Sun Apr 3 01:20:23 2011 UTC (11 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.4: +0 -1370 lines
FILE REMOVED

file vfs_mount.c was added on branch rmind-uvmplock on 2011-04-21 01:42:11 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 3 01:20:23 2011 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: rmind-uvmplock, cherry-xenmp
Changes since 1.3: +4 -9 lines
Diff to previous 1.3 (colored)

vfs_insmntque: convert check to assert.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Apr 2 06:48:20 2011 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.2: +11 -21 lines
Diff to previous 1.2 (colored)

Merge vfs_shutdown1() and vfs_shutdown().

Revision 1.2 / (download) - annotate - [select for diffs], Sat Apr 2 04:45:24 2011 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.1: +10 -21 lines
Diff to previous 1.1 (colored)

- Move vrele_list flush notify code into vrele_flush() routine.
- Make some structures static.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Apr 2 04:28:56 2011 UTC (11 years, 10 months ago) by rmind
Branch: MAIN

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

No functional change.  Discussed on tech-kern@.

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>