Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (41m)  netbsd-10 (4d)  netbsd-9 (4d)  netbsd-8 (9d) 

2024-05-20 18:14:38 UTC Now

2014-09-30 10:15:03 UTC MAIN commitmail json YAML

Fix the puffs_sop_thread -> puffs_cookie2vnode path:
- pass the cookie by reference
- add missing mutex_exit()
- update assertion for VNON typed vnodes

(hannken)

2014-08-28 08:29:50 UTC MAIN commitmail json YAML

Change puffs from hashlist to vcache.
- field "pa_nhashbuckets" of struct "puffs_kargs" becomes a no-op.
  and should be removed on the next protocol version bump.

(hannken)

2014-08-22 16:49:30 UTC MAIN commitmail json YAML

Use mount from argument "mp", "vp->v_mount" is not valid here.

PR kern/49142 (panic in ext2fs_loadvnode mounting an ext2fs filesystem)

Needs pullup to -7

(hannken)

2014-08-16 07:22:30 UTC MAIN commitmail json YAML

Needs HASH_SLIST, not HASH_LIST.

(hannken)

2014-08-15 13:40:39 UTC MAIN commitmail json YAML

Change ptyfs to vcache.
- Use (type, minor) as key.
- Change ptyfs_allocvp to return a referenced vnode and lock where needed.
- Remove unneeded vnode backpointer ptyfs_vnode.
- Keep a single hashlist for pty nodes to make their attributes persistent.

OK: Christos Zoulas

(hannken)

2014-08-13 15:48:38 UTC MAIN commitmail json YAML

Adapt to reality -- already open BSD style nodes do not appear on
ptyfs mounts (this changed some months ago).

(hannken)

2014-08-13 14:10:00 UTC MAIN commitmail json YAML

- Add a map of active controlling ptys per mount and no longer abuse
  the vnode lifecycle.
- No longer set "recycle" on VOP_INACTIVE().
- Make ptyfs_used_get() private to ptyfs_subr.c
- Stop copying device attributes from traditional ptys on first allocation.
- Remove unneeded argument "lwp" from ptyfs_allocvp() and ptyfs_free_get().

OK: Christos Zoulas

(hannken)

2014-08-10 08:53:22 UTC MAIN commitmail json YAML

2014-08-07 08:24:23 UTC MAIN commitmail json YAML

2014-08-05 08:50:54 UTC MAIN commitmail json YAML

Change adosfs from hashlist to vcache.
- point ap->block to real file header block for hard links.

(hannken)

2014-07-27 16:47:26 UTC MAIN commitmail json YAML

Change procfs from hashlist to vcache.
- Key is (type, pid, fd)
- Remove argument "p" from procfs_allocvp().  It is only used
  when "type == PFSfd".  Lookup the proc with proc_find() when
  procfs_loadvnode() needs it.
- Use a vfs_vnode_iterator for procfs_revoke_vnodes().

(hannken)

2014-07-20 13:58:05 UTC MAIN commitmail json YAML

2014-07-20 13:17:37 UTC MAIN commitmail json YAML

Remove another KAME IPSEC residue, "struct secasvar" and "struct secpolicy".

(hannken)

2014-07-17 08:21:34 UTC MAIN commitmail json YAML

Finish KAME IPSEC removal:
- Remove field kfs_value, it is always zero. Compute the hash from kt_tag.
- Remove stray definitions kernfs_revoke_sa and kernfs_revoke_sp.

While here, remove kfs_type from allocvp(), it is always kt->kt_tag.

(hannken)

2014-07-13 11:23:01 UTC MAIN commitmail json YAML

2014-07-12 12:13:01 UTC MAIN commitmail json YAML

Prevent detaching an open device unless forced.

(hannken)

2014-07-08 09:21:52 UTC MAIN commitmail json YAML

Change msdosfs from hashlist to vcache:
- Use (dir_cluster, dir_offset, dir_generation) as key, where
  dir_generation is non-zero and unique for unlinked but open nodes.
- Change deget() to return a vnode as it is unsafe to return a
  referenced but unlocked denode.

(hannken)

2014-07-05 09:33:41 UTC MAIN commitmail json YAML

Use vcache_rekey_* for nfs_lookitup() in the "*npp != NULL" case.

(hannken)

2014-07-05 09:33:15 UTC MAIN commitmail json YAML

Add vcache operations to support key changes:

vcache_rekey_enter locks the old cache node and creates and locks the
  new cache node.  It is an error if the new cache node exists.

vcache_rekey_exit removes the old cache node and finalizes and
  unlocks the new cache node.

No objections on tech-kern@

Welcome to 6.99.46

(hannken)

2014-06-22 09:48:20 UTC MAIN commitmail json YAML

Consistently pass a "struct piixpm_softc" to piixpm_intr.
Prevents a crash on hardware interrupts.

(hannken)

2014-06-22 09:47:40 UTC MAIN commitmail json YAML

CID 1223346: No need to check bp against NULL.  It is always valid here.

(hannken)

2014-06-17 12:38:12 UTC MAIN commitmail json YAML

Unlock directory vnode after VOP_CREATE.

(hannken)

2014-06-16 09:55:49 UTC MAIN commitmail json YAML

2014-06-14 07:39:29 UTC MAIN commitmail json YAML

Remove the hints "isodir" and "relocated" from cd9660_vget_internal()
and always reread the directory entry by inumber.  For directories
the directory entry is always its "." entry.

Always read directories via the device vnode to prevent buffer cache
inconsistency.  Keep i_devvp as a hint for fstat(1) and friends and
always use im_devvp for reads.  No need to vref()/vrele() i_devvp.

The additional bread is either cached because cd9660_lookup() just
released the buffer or will be used in the near future when the
directory gets traversed during lookup.

No objections on tech-kern@

(hannken)

2014-06-14 07:39:01 UTC MAIN commitmail json YAML

Change dk_lookup() to return an anonymous vnode not associated with
any file system.  Change all consumers of dk_lookup() to get the
device from "v_rdev" instead of VOP_GETATTR() as specfs does not
support VOP_GETATTR().  Devices obtained with dk_lookup() will no
longer disappear on forced unmounts.

Fix for PR kern/48849 (root mirror raid fails on shutdown)

Welcome to 6.99.44

(hannken)

2014-05-30 08:47:45 UTC MAIN commitmail json YAML

2014-05-30 08:46:00 UTC MAIN commitmail json YAML

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.

(hannken)

2014-05-30 08:42:35 UTC MAIN commitmail json YAML

msdosfs_reclaim(): add missing fstrans and protect change
of v_data with v_interlock as msdosfs_sync() now needs it.

(hannken)

2014-05-30 08:40:09 UTC MAIN commitmail json YAML

Testing "v_usecount == 1" for exclusive reference will not always
work -- remove and test only readonly.

(hannken)

2014-05-28 10:51:20 UTC MAIN commitmail json YAML

Change field "layerm_tag" to correct type "enum vtagtype".

CID 1216449:  Mixing enum types

(hannken)

2014-05-25 17:43:47 UTC MAIN commitmail json YAML

The pageflush_selector gets a vnode with v_interlock held.
Remove the mutex_enter()/mutex_exit() and simplify.

Hi christos...

(hannken)

2014-05-25 14:07:19 UTC MAIN commitmail json YAML

Remove ext2fs_checkpath().  It is a relic from the pre-genfs_rename era.

(hannken)

2014-05-25 13:52:12 UTC MAIN commitmail json YAML

Use broadcast after freeing a cache entry.  A waiter may not
use a cache entry after wakeup leading to possible deadlock.

(hannken)

2014-05-25 13:51:26 UTC MAIN commitmail json YAML

2014-05-25 13:49:13 UTC MAIN commitmail json YAML

Remove ulfs_checkpath() and ulfs_readdotdot().  These are relics
from the pre-genfs_rename era.

(hannken)

2014-05-25 13:48:40 UTC MAIN commitmail json YAML

Remove ufs_checkpath() and ufs_readdotdot().  These are relics
from the pre-genfs_rename era.

(hannken)

2014-05-25 13:47:22 UTC MAIN commitmail json YAML

ext2fs_mknod: use vcache_get() to reload the new node.

(hannken)

2014-05-25 13:46:58 UTC MAIN commitmail json YAML

ext2fs_gro_genealogy: use vcache_get() to lookup DOTDOT.

(hannken)

2014-05-25 13:46:16 UTC MAIN commitmail json YAML

ufs_mknod: use vcache_get() to reload the new node.

(hannken)

2014-05-25 13:45:39 UTC MAIN commitmail json YAML

ufs_gro_genealogy: use vcache_get() to lookup DOTDOT.

(hannken)

2014-05-08 08:21:53 UTC MAIN commitmail json YAML

Add a global vnode cache:

- vcache_get() retrieves a referenced and initialised vnode / fs node pair.
- vcache_remove() removes a vnode / fs node pair from the cache.

On cache miss vcache_get() calls new vfs operation vfs_loadvnode() to
initialise a vnode / fs node pair.  This call is guaranteed exclusive,
no other thread will try to load this vnode / fs node pair.

Convert ufs/ext2fs, ufs/ffs and ufs/mfs to use this interface.

Remove now unused ufs/ufs_ihash

Discussed on tech-kern.

Welcome to 6.99.41

(hannken)

2014-04-15 12:37:59 UTC MAIN commitmail json YAML

2014-04-15 09:50:45 UTC MAIN commitmail json YAML

Fix a deadlock where one thread exits, enters fstrans_lwp_dtor()
and wants fstrans_lock.  This thread holds the proc_lock.
Another thread holds fstrans_lock and runs pserialize_perform().
As the first thread holds the proc_lock, timeouts are blocked and
the second thread blocks forever in kpause().

Change fstrans_lwp_dtor() to invalidate, but not free its info
structs.  No need to take fstrans_lock.

Change fstrans_get_lwp_info() to reuse invalidated info before
trying to allocate a new one.

(hannken)

2014-04-08 13:20:01 UTC MAIN commitmail json YAML

2014-03-24 13:42:41 UTC MAIN commitmail json YAML

2014-03-23 15:21:17 UTC MAIN commitmail json YAML

2014-03-18 10:21:48 UTC MAIN commitmail json YAML

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

(hannken)

2014-03-17 09:37:41 UTC MAIN commitmail json YAML

Change zfs_sync() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:37:09 UTC MAIN commitmail json YAML

Change smbfs_sync() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:36:35 UTC MAIN commitmail json YAML

Change pageflush() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:35:59 UTC MAIN commitmail json YAML

Change msdosfs_sync() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:35:24 UTC MAIN commitmail json YAML

Change nfs_clearcommit() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:34:51 UTC MAIN commitmail json YAML

Change nfs_sync() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:34:16 UTC MAIN commitmail json YAML

Change lfsquota1_handle_cmd_quotaon() and lfs_q1sync()
to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:33:20 UTC MAIN commitmail json YAML

Change vismarker() to VI_MARKER for lfs_writevnodes().
This operation has to be changed to vfs_vnode_iterator.

(hannken)

2014-03-17 09:31:35 UTC MAIN commitmail json YAML

Change quota1_handle_cmd_quotaon() and q1sync() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:30:32 UTC MAIN commitmail json YAML

Change ext2fs_sync() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:29:55 UTC MAIN commitmail json YAML

Change ffs_sync() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:29:20 UTC MAIN commitmail json YAML

Change snapshot_expunge() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:28:37 UTC MAIN commitmail json YAML

Change sysctl_kern_vnode() to use vfs_vnode_iterator.

(hannken)

2014-03-17 09:27:37 UTC MAIN commitmail json YAML

Add fstrans_startnowait()/fstrans_done() to vrele_thread().

(hannken)

2014-03-13 16:34:13 UTC MAIN commitmail json YAML

Add __diagused.

(hannken)

2014-03-13 16:33:52 UTC MAIN commitmail json YAML

2014-03-13 10:22:35 UTC MAIN commitmail json YAML

No need to detach (and return EBUSY) if dk_openmask is non-zero.

(hannken)

2014-03-12 09:40:05 UTC MAIN commitmail json YAML

Restructure union_lock() to always lock before testing for dead node.
Add two little helpers to lock or unlock a node.  Use "vp" for the
union node and "lockvp" for the node to be locked.  Use ISSET() to
test flags, add assertions.

(hannken)

2014-03-12 09:39:23 UTC MAIN commitmail json YAML

Restructure layer_lock() to always lock before testing for dead node.
Use ISSET() to test flags, add assertions.

(hannken)

2014-03-12 09:38:51 UTC MAIN commitmail json YAML

Restructure genfs_deadlock() and genfs_lock() to always lock before
testing for dead node.  Use ISSET() to test flags, add assertions.

Save the mount for fstrans_done() before genfs_unlock() unlocks the node.

(hannken)

2014-03-05 09:37:29 UTC MAIN commitmail json YAML

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

(hannken)

2014-02-27 16:51:39 UTC MAIN commitmail json YAML

The current implementation of vn_lock() is racy.  Modification of
the vnode operations vector for active vnodes is unsafe because it
is not known whether deadfs or the original file system will be
called.

- Pass down LK_RETRY to the lock operation (hint for deadfs only).

- Change deadfs lock operation to return ENOENT if LK_RETRY is unset.

- Change all other lock operations to check for dead vnode once
  the vnode is locked and unlock and return ENOENT in this case.

With these changes in place vnode lock operations will never succeed
after vclean() has marked the vnode as VI_XLOCK and before vclean()
has changed the operations vector.

Adresses PR kern/37706 (Forced unmount of file systems is unsafe)

Discussed on tech-kern.

Welcome to 6.99.33

(hannken)

2014-02-27 13:00:06 UTC MAIN commitmail json YAML

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.

(hannken)

2014-02-22 10:08:12 UTC MAIN commitmail json YAML

Update arguments of vrecycle(), description of getnewvnode() and
the vnode flags.

(hannken)

2014-02-22 10:05:54 UTC MAIN commitmail json YAML

Update the description of vfs_busy() and vfs_unbusy().

(hannken)

2014-02-16 09:50:25 UTC MAIN commitmail json YAML

Change union_allocvp() to take an unlocked uppervp and to return the
union node unlocked.  Another VI_XLOCK hack is gone.

(hannken)

2014-02-14 08:50:27 UTC MAIN commitmail json YAML

Member un_flags is unused now -- remove.

(hannken)

2014-02-13 09:55:04 UTC MAIN commitmail json YAML

Get rid of UN_KLOCK to keep a lock on vput().  It is not really needed
and makes the source difficult to read.  Always hold references to the
union nodes until the operation is done.

(hannken)

2014-02-13 09:50:31 UTC MAIN commitmail json YAML

Fix the DOT and DOTDOT case for union_lookup1().

(hannken)

2014-02-10 11:23:14 UTC MAIN commitmail json YAML

Change layerfs_vget(), layerfs_fhtovp() and the various layer xxx_mount()
functions to unlock/relock the node for the call to layer_node_create().

Finally remove dirty hacks (LK_NOWAIT, kpause) from layer_node_find().

(hannken)

2014-02-09 17:18:38 UTC MAIN commitmail json YAML

Adjust comment and change vput() to vrele().  This change got missed
when changing vnode creation operations to return unlocked result.

(hannken)

2014-02-09 17:15:51 UTC MAIN commitmail json YAML

When layer_node_alloc() finds another thread already inserted the node
into the hashlist and discards the now unneeded node it will raise a
panic "dead but not clean".

Reorder the initialization and use ungetnewvnode() to discard the node.

(hannken)

2014-02-07 15:29:23 UTC MAIN commitmail json YAML

2014-02-07 15:26:42 UTC MAIN commitmail json YAML

Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

(hannken)

2014-02-06 16:18:38 UTC MAIN commitmail json YAML

Remove an annoying printf.  And to answer the question:  VFS_VGET() gets
used by NFS V3 server for readdirplus.

(hannken)

2014-02-06 10:57:12 UTC MAIN commitmail json YAML

Move fstrans_start()/fstrans_done() into genfs_insane_rename() to protect
the complete rename operation like we do for all other vnode operations.

(hannken)

2014-01-29 08:27:04 UTC MAIN commitmail json YAML

Allow layer_node_create() with unlocked lower node and change
layer_bypass() to enter nodes from creation operations unlocked.

(hannken)

2014-01-23 10:13:57 UTC MAIN commitmail json YAML

2014-01-23 10:11:55 UTC MAIN commitmail json YAML

Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

(hannken)

2014-01-21 07:53:38 UTC MAIN commitmail json YAML

Move VOP_UNLOCK() after setting type to VNON like all other UFS file systems.

(hannken)

2014-01-20 07:47:22 UTC MAIN commitmail json YAML

Change cache_prune() to test for end-of-list before testing for an
invalid entry.  Prevents a lifelock when the end-of-list marker
gets invalid while scanning the list and all entries are recent.

(hannken)

2014-01-17 10:55:03 UTC MAIN commitmail json YAML

2014-01-17 10:52:36 UTC MAIN commitmail json YAML

Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

(hannken)

2014-01-13 12:07:55 UTC MAIN commitmail json YAML

Support for vnode operation versioning.  Allow a new keyword "VERSION"
in the description so "VERSION 2" will change the name of the argument
from vop_XXX_args to vop_XXX_v2_args.

(hannken)

2014-01-09 13:23:57 UTC MAIN commitmail json YAML

Operation sysvbfs_remove() destructs inodes attached to active vnodes.
Defer the destruction to sysvbfs_reclaim().

Disable test t_renamerace:sysvbfs_renamerace as it will exhaust the
inode table (sysvbfs has space for 8 inodes only).

Ok: Izumi Tsutsui <tsutsui@netbsd.org>

(hannken)

2014-01-04 12:36:49 UTC MAIN commitmail json YAML

Fix a race where thread1 runs VOP_REMOVE() and gets preempted in
tmpfs_reclaim() before the call to tmpfs_free_node().  Thread2
runs VFS_FHTOVP() and gets a new vnode attached to the node thread1
is about to destroy.

Change tmpfs_fhtovp() to check the generation number after
tmpfs_vnode_get() succeeded.

(hannken)

2014-01-03 09:53:12 UTC MAIN commitmail json YAML

Fix a race where thread1 runs VOP_REMOVE() and gets preempted in
tmpfs_reclaim() before the call to tmpfs_free_node().  Thread2
runs VFS_FHTOVP() and gets a new vnode attached to the node thread1
is about to destroy.

Change tmpfs_alloc_node() to always assign non-zero generation number
and tmpfs_inactive() to set the generation number of unlinked nodes
to zero.

(hannken)

2013-12-24 09:56:18 UTC MAIN commitmail json YAML

It is not the task of sysvbfs_open() to check for unlinked nodes.

(hannken)

2013-12-24 09:23:33 UTC MAIN commitmail json YAML

It is not the task of tmpfs_open() to check for unlinked nodes.

Fix tmpfs_lookup() to always return ENOENT when looking up from
an unlinked directory.

(hannken)

2013-12-07 10:03:28 UTC MAIN commitmail json YAML

When deciding to defer in vrelel():
- No need to always defer layer vnodes, if we get the vnode lock it
  is safe to inactivate.
- Always use VOP_LOCK(), it makes no sense to use vn_lock() here.
- No need to drop v_interlock for VOP_LOCK(... LK_NOWAIT).

(hannken)

2013-11-29 14:58:55 UTC MAIN commitmail json YAML

Change vrelel() to mark the vnode as changing after it has aquired
the vnode lock but before it calls VOP_INACTIVE().

Should fix the race between layer_node_find() trying to vget(, LK_NOWAIT)
a locked vnode when vrelel() marked it as changing and wants its lock.

PR kern/48411 (repeatable SMP crashes in amd64-current)

(hannken)

2013-11-23 13:46:22 UTC MAIN commitmail json YAML

Replace VI_INACTNOW and VI_INACTREDO with a new flag VI_CHANGING that gets
set while a vnode changes state from active to inactive or from active
or inactive to clean and protects "vclean(); vrelel()" and "vrelel()"
against "vget()".

Presented on tech-kern.

(hannken)

2013-11-15 09:13:57 UTC MAIN commitmail json YAML

Describe the differences between file system internal and external snapshots.

(hannken)

2013-11-07 09:48:34 UTC MAIN commitmail json YAML

Make vclean static (ride 6.99.2).

DOCLOSE is no longer needed -- remove.

(hannken)

2013-11-07 09:45:53 UTC MAIN commitmail json YAML

Add missing operations that unlock or dereference their arguments.

Stop checking for a vnode state change -- dead vnodes never change state.

(hannken)

2013-11-03 08:33:00 UTC MAIN commitmail json YAML

cleanvnode():
- VC_XLOCK/VC_MASK are not used anymore, remove.
- If we get a reference while cleaning, there is no need to retry as
  these reference and this vnode will disappear soon.
- Make sure we run inside a fstrans transaction to prevent deadlocks
  against vget().

vrecycle():
- don't even try to recycle a vnode currently cleaning.

(hannken)

2013-11-02 10:30:18 UTC MAIN commitmail json YAML

Stop using v_mount of an unreferenced vnode -- save the mount while
the vnode has a reference.

(hannken)

2013-10-29 09:53:51 UTC MAIN commitmail json YAML

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

(hannken)

2013-10-04 08:35:08 UTC MAIN commitmail json YAML

Remove a bogus vrecycle() from udf_inactive().  Vrecycle() works on inactive
vnodes while VOP_INACTIVE() should never be called on an inactive vnode.

Ok: Reinoud Zandijk <reinoud@netbsd.org>

(hannken)

2013-09-30 18:58:00 UTC MAIN commitmail json YAML

2013-09-30 15:24:14 UTC MAIN commitmail json YAML

Remove VI_INACTPEND. Last consumer was vcount() which got removed 2010-01-08.

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

(hannken)

2013-09-16 12:36:54 UTC MAIN commitmail json YAML

Function ffs_reload() works on a read-only mount, so remove the call
to ffs_snapshot_mount() as it would panic later with "already on list"
when remounting read-write.

Should fix PR kern/48211 (Unclean shutdown with active snapshot causes
panic during reboot)

(hannken)

2013-08-30 12:58:22 UTC MAIN commitmail json YAML

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)

(hannken)

2013-08-12 17:46:38 UTC MAIN commitmail json YAML

Function nfs_vinvalbuf() ignores errors from vinvalbuf() and therefore
delayed write errors may get lost.
Change nfs_vinvalbuf() to keep errors from vinvalbuf() for fsync() or close().

Presented on tech-kern@

Fix for PR kern/47980 (NFS over-quota not detected if utimes() called
before fsync()/close())

(hannken)

2013-06-16 13:33:30 UTC MAIN commitmail json YAML

Add an UFS_SNAPGONE() ufs op replacing the calls
to ffs_snapgone() in ufs_lookup.c.

Ok: David Holland <dholland@netbsd.org>

Welcome to 6.99.22

(hannken)

2013-06-10 10:26:22 UTC MAIN commitmail json YAML

Move member di_inumber from ufs1_dinode to ulfs1_dinode.

No functional change intended. Tested on sparc64.

(hannken)

2013-06-10 09:25:05 UTC MAIN commitmail json YAML

Make DEBUG kernel compile: di_u.inumber -> di_inumber

(hannken)

2013-05-07 09:40:54 UTC MAIN commitmail json YAML

When invalidating short buffers on the snapshots clean list use bbusy()
to mark the buffer busy.  There exists a small window where a buffer is
done but not released and therefore still busy.

(hannken)

2013-02-13 14:03:49 UTC MAIN commitmail json YAML

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

(hannken)

2013-02-06 09:33:17 UTC MAIN commitmail json YAML

Lookup the block device mounted on from the specfs_hash table.
This doesn't belong here but makes it possible to pullup.

Fixes PR kern/47020 (fss(4) panic)

(hannken)

2013-02-06 09:29:46 UTC MAIN commitmail json YAML

Take fss_device_lock first when closing a fss device.

Fixes PR kern/47514 (Multiple dump -X triggers kernel panic in fss_ioctl)

(hannken)

2013-02-06 09:05:01 UTC MAIN commitmail json YAML

Test taking a snapshot from a stressed file system.
Checks snapshot meta data only with fsck.

OK: Antti Kantee <pooka@netbsd.org>

(hannken)

2013-01-25 17:12:33 UTC MAIN commitmail json YAML

Update the DEBUG section at the tail of pmap_clear_modify().

Nothing prevents page modification after the modify bit was
cleared but before the DEBUG section checks pmap_is_modified(),
so remove this check.

For the same reason "modified" and "changed" may differ, so only
check "modified" implies "changed" here.

Ok: Matthew Green <mrg@netbsd.org>

(hannken)

2013-01-21 09:14:01 UTC MAIN commitmail json YAML

Replace the rwlock based implementation with passive serialization
from pserialize(9) and mutex / condvar.

The fast paths (fstrans_start/fstrans_done on a file system not
suspended or suspending and fscow_run with no change pending) now
run without locks or other atomic operations.  Suspension and cow
handler insertion and removal is done with mutex / condvars.

The API remains unchanged.

(hannken)

2013-01-15 17:14:11 UTC MAIN commitmail json YAML

netbsd32_posix_spawn_fa_alloc: use the right length for path allocation.

This error lead to memory pool corruption when freeing kmem with wrong size.

(hannken)

2012-12-30 09:19:24 UTC MAIN commitmail json YAML

Always call brelse() on error for breadn() too.

(hannken)

2012-12-28 08:04:00 UTC MAIN commitmail json YAML

Move the initialization of n to after the error branch.

From Taylor R Campbell <riastradh@netbsd.org>

(hannken)

2012-12-20 11:44:39 UTC MAIN commitmail json YAML

Revert rev. 1.20 now that bread() has been fixed.

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

(hannken)

2012-12-20 08:03:45 UTC MAIN commitmail json YAML

2012-12-08 07:24:42 UTC MAIN commitmail json YAML

Try to coalesce writes to the journal in MAXPHYS sized and aligned blocks.
Speeds up wapbl_flush() on raid5 by a factor of 3-4.

Discussed on tech-kern.

Needs pullup to NetBSD-6.

(hannken)

2012-11-17 10:10:18 UTC MAIN commitmail json YAML

wapbl_biodone: Release the buffer before reclaiming the log.
    wapbl_flush() may wait for the log to become empty and
    all buffers should be unbusy before it returns.

(hannken)

2012-11-12 11:00:07 UTC MAIN commitmail json YAML

Bring back Manuel Bouyers patch to resolve races between vget() and vrelel()
resulting in vget() returning dead vnodes.
It is impossible to resolve these races in vn_lock().

Needs pullup to NetBSD-6.

(hannken)

2012-07-28 16:14:18 UTC MAIN commitmail json YAML

Minor fix to previous -- release vnode after last use, not before.

(hannken)

2012-07-28 15:12:42 UTC MAIN commitmail json YAML

Use `getdisksize()' to get the size of the mounted-on block device.

Should work for disks without partition table (wedges) now.

(hannken)

2012-07-28 15:09:45 UTC MAIN commitmail json YAML

Initialize `fss_flags' before setting an individual bit.
Not a real problem as there is only one valid bit yet.

From Edgar Fuss via tech-kern@netbsd.org

(hannken)

2012-06-11 15:25:14 UTC MAIN commitmail json YAML

File system snapshots are no longer experimental.
Forgot to chang this man page in Nov 2011.

(hannken)

2012-04-09 11:10:07 UTC MAIN commitmail json YAML

pcbmap(): We cannot use bread() here as for the pagedaemon getblk()
          may fail leading to a panic in bread().
          Replace bread() with getblk() / VOP_STRATEGY() and return
          an error if getblk() fails.

Fixes PR#46282: 6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread

This is an interim solution for easy pullup.  The final solution
is be to change bread() to not return a buffer on error.  As
we have to change all callers of bread() this will not qualify
for a pullup.

(hannken)

2012-04-05 07:26:37 UTC MAIN commitmail json YAML

Fix vn_lock() to return an invalid (dead, clean) vnode
only if the caller requested it by setting LK_RETRY.

Should fix PR #46221: Kernel panic in NFS server code

(hannken)

2012-03-26 16:28:08 UTC MAIN commitmail json YAML

When backed by a sparse file limit the number of pending requests.

Should fix PR #45829: "writing to vnd on sparse file blocks on pager_map"
where the pager_map gets exhausted by requests enqueued on a vnd
device and the device worker thread blocks on putpages() needing the map.

While here always sync the underlying vnode before calling biodone().

XXX: vnd should be converted to mutex/condvar.

(hannken)

2012-03-17 18:00:29 UTC MAIN commitmail json YAML

Starting with Rev. 1.191 of kern/subr_pool.c a pool has to be inactive
for at least 10 seconds before it can be reclaimed.

Change the uvmwait test timeout from 10 to 30 seconds so it has a chance
to reclaim memory and succeed.

(hannken)

2012-03-17 17:58:38 UTC MAIN commitmail json YAML

Don't take a mutex we already took 6 lines above.

(hannken)

2012-03-16 08:39:54 UTC MAIN commitmail json YAML

Fix last commit that broke lookup for dot with op DELETE.

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

(hannken)

2012-01-29 18:29:12 UTC MAIN commitmail json YAML

Add virtio driver to INSTALL_FLOPPY.

Requested by Matthias Scheler <tron@netbsd.org> for particular cases like
http://mail-index.netbsd.org/netbsd-users/2011/09/13/msg009128.html

(hannken)

2012-01-20 18:47:04 UTC MAIN commitmail json YAML

Revert revision 1.4 and change LAPIC_LEVEL_ASSERT / _MASK back to 0x4000.

According to "Intel 64 and IA-32 Architectures Software Developer's Manual"
Vol. 3, May 2011, Order Number: 325384-039US, Section 10.6.1:

LEVEL_ASSERT is bit #14, bit #13 is reserved.

With this change NetBSD now boots multiple processors under CentOS 6.2/kvm.

(hannken)

2011-12-20 16:49:37 UTC MAIN commitmail json YAML

Move the diagnostic check for a missing VOP_CLOSE() to the top of vrelel().
As long as we hold the vnode interlock there is no chance for this vnode
to gain new references.

Fixes false alarms observed by Thor Lancelot Simon and reported on tech-kern.

Ok: David Holland <dholland@netbsd.org>

(hannken)

2011-12-05 11:12:11 UTC MAIN commitmail json YAML

The union file system is as stable as other layered file systems so
no longer print a warning to the console.

Gnats is waiting ...

(hannken)

2011-12-03 10:53:10 UTC MAIN commitmail json YAML

Don't try to set ld->sc_maxxfer below MAXPHYS.
At least genfs_io assumes 'ld->sc_maxxfer == MAXPHYS'.

(hannken)

2011-11-25 11:19:10 UTC MAIN commitmail json YAML

When union_allocvp() finds a node being cleaned out and the caller holds
a lock, ignore the node and continue.  To allow the cleaning to succeed
the current threadmust make progress.
For a brief time the cache may contain more than one vnode referring to
a lower node.

Don't unlock the hash mutex if getnewvnode fails -- we don't hold it.

(hannken)

2011-11-23 19:40:42 UTC MAIN commitmail json YAML

According to "Virtio PCI Card Specification v0.9.2 DRAFT" there is no
feature named VIRTIO_BLK_F_SECTOR_MAX so remove it.  Linux seems to use
this feature bit as VIRTIO_BLK_F_TOPOLOGY.

Use VIRTIO_BLK_F_BLK_SIZE * VIRTIO_BLK_F_SEG_MAX as the drivers maxxfer
and reorder so sc_secsize gets set before use.

As maxxfer may not be a multiple of page size add one more segment to
the dma maps.

Tested on Linux 3.1.1 host by Guillaume Lasmayous.

(hannken)

2011-11-23 19:39:11 UTC MAIN commitmail json YAML

Use hashinit() / hashdone() to create the union node hash list.

Cleanup the hash lookup in union_allocvp().

Needs more work as there is still a possible deadlock between
union_allocvp() and vclean().

(hannken)

2011-11-21 18:29:23 UTC MAIN commitmail json YAML

Replace flag based union node locking with generic vnode lock, support
shared and nowait locks and protect un_uppervp and un_*sz with mutex.

Mark file system MPSAFE.

(hannken)

2011-11-21 10:46:57 UTC MAIN commitmail json YAML

Add missing fstrans_done().

Should fix PR #45635 (KASSERT "fli->fli_trans_cnt == 0" failed)

(hannken)

2011-11-21 09:08:00 UTC MAIN commitmail json YAML

nfsrv_lookup(): Defer the postopattr lookup on dirp until the
                child node is unlocked.

Ok: YAMAMOTO Takashi <yamt@netbsd.org>

(hannken)

2011-11-20 10:32:33 UTC MAIN commitmail json YAML

Fix locking against self in veriexec_fp_calc().

(hannken)

2011-11-14 18:42:57 UTC MAIN commitmail json YAML

VOP_ABORTOP() has no specific lock requirements so there is no need
to force locked vnodes here.  It should be impossible to come here
with a nil upper node.

Relock the directory vnode after copyup.  A locked union node with an
unlocked upper vnode can no longer exist so make FIXUP() an assertion.

(hannken)

2011-11-14 18:38:14 UTC MAIN commitmail json YAML

Remove a needless vnode lock/unlock dance.  This is a leftover from the
removal of VOP_LEASE().

Function union_removed_upper() always works on unlocked upper vnodes so
remove the test-and-unlock and add an assertion.

(hannken)

2011-11-14 18:35:15 UTC MAIN commitmail json YAML

2011-11-14 16:04:30 UTC MAIN commitmail json YAML

Bring back sys/disklabel.h for DISKUNIT and DISKPART.

(hannken)

2011-11-07 08:44:16 UTC MAIN commitmail json YAML

Move an assertion to the right place.

Ok: YAMAMOTO Takashi <yamt@netbsd.org>

Fixes PR #45578 (kernel crash with BUFQ_PRIOCSCAN)

(hannken)

2011-11-05 09:22:44 UTC MAIN commitmail json YAML

2011-11-02 14:34:09 UTC MAIN commitmail json YAML

Make sure we allocate enough segments for the request dma maps.

(hannken)

2011-10-30 13:24:13 UTC MAIN commitmail json YAML

Add a comment that pn_sizemtx should be useless as VOP_GETATTR now
needs a shared lock at least.

(hannken)

2011-10-30 12:12:21 UTC MAIN commitmail json YAML

Import of the virtio driver written by MINOURA Makoto <minoura@netbsd.org>
with minor changes to make it compile an run on -current.  This driver
speeds up disk and network access in virtual environments like KVM.

Enabled on i386 and amd64.  Tested with a CentOS 5.7 x86_64 host.

See http://ozlabs.org/~rusty/virtio-spec/virtio.pdf for the specification.

(hannken)

2011-10-30 12:00:28 UTC MAIN commitmail json YAML

VOP_GETATTR() needs a shared lock at least.

(hannken)

2011-10-24 11:43:31 UTC MAIN commitmail json YAML

VOP_GETATTR() needs a shared lock at least.

As nfs_kqpoll() ignores the return value from VOP_GETATTR() initialize
the attrributes to zero -- nfs_kqfilter() does the same.

(hannken)

2011-10-23 08:42:06 UTC MAIN commitmail json YAML

VOP_GETATTR() needs a shared lock at least.

(hannken)

2011-10-18 20:20:30 UTC MAIN commitmail json YAML

VOP_GETATTR() needs a shared lock at least.

While here fix a typo (fvp -> tvp).

(hannken)

2011-10-18 09:22:53 UTC MAIN commitmail json YAML

VOP_GETATTR() needs a shared lock at least.

(hannken)

2011-10-16 12:41:46 UTC MAIN commitmail json YAML

VOP_GETATTR() needs a shared lock at least.

While here fix a typo (fvp -> tvp).

(hannken)

2011-10-16 12:26:16 UTC MAIN commitmail json YAML

2011-10-14 09:23:31 UTC MAIN commitmail json YAML

2011-10-07 09:35:07 UTC MAIN commitmail json YAML

2011-10-03 10:30:13 UTC MAIN commitmail json YAML

As getnewvnode() is prepared to wait for an allocation change vnalloc()
to always use PR_WAITOK.

No more 'WARNING: unable to allocate new vnode, retrying...' messages.

(hannken)

2011-10-02 13:00:07 UTC MAIN commitmail json YAML

The path getnewvnode()->getcleanvnode()->vclean()->VOP_LOCK() will panic
if the vnode we want to clean is a layered vnode and the caller already
locked its lower vnode.

Change getnewvnode() to always allocate a fresh vnode and add a helper
thread (vdrain) to keep the number of allocated vnodes within desiredvnodes.

Rename getcleanvnode() to cleanvnode() and let it take a vnode from the
lists, clean and free it.

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

Should fix:
PR #19110 (nullfs mounts over NFS cause lock manager problems)
PR #34102 (ffs panic in NetBSD 3.0_STABLE)
PR #45115 (lock error panic when build.sh*3 and daily script is running)
PR #45355 (Reader/writer lock error:  rw_vector_enter: locking against myself)

(hannken)

2011-08-28 08:27:57 UTC MAIN commitmail json YAML

Print the warning message on mount once.

Should fix PR #42795 (patch to make mounting union filesystems less obnoxious)

(hannken)

2011-08-27 15:32:28 UTC MAIN commitmail json YAML

Finish and enable whiteout support for tmpfs:

- Enable VOP tmpfs_whiteout().
- Support ISWHITEOUT in tmpfs_alloc_file().
- Support DOWHITEOUT in tmpfs_remove() and tmpfs_rmdir().
- Make rmdir on a directory containing whiteouts working.

Should fix PR #35112 (tmpfs doesn't play well with unionfs).

(hannken)

2011-08-25 18:46:01 UTC MAIN commitmail json YAML

t_fd/sigio: pass test if we receive at least one SIGIO signal.

While a real kernel collects these signals until the connect() returns and
then delivers one signal rump delivers every signal so we get more than one.

Ok: Antti Kantee <pooka@netbsd.org>

(hannken)

2011-08-23 07:40:32 UTC MAIN commitmail json YAML

When consuming only part of a path in rump_vop_lookup():

- Make sure to consume complete path components.
- Consume trailing slashes too.
- Do not clear REQUIREDIR.

Test rump/modautoload/t_modautoload now passes.

(hannken)

2011-08-23 07:39:37 UTC MAIN commitmail json YAML

Stop abusing relookup() to prepare the creation of new nodes
in the upper layer.
Replace union_relookup() with union_do_lookup() that prepares
a component, calls VOP_LOOKUP() and does the EEXIST test.

(hannken)

2011-08-21 10:45:33 UTC MAIN commitmail json YAML

2011-08-13 10:48:14 UTC MAIN commitmail json YAML

Use mutexes to protect the hash lists instead of tsleep/wakeup.

(hannken)

2011-08-12 17:41:17 UTC MAIN commitmail json YAML

Change some `#ifdef DIAGNOSTIC' to `KASSERT'.
Instead of a `pid_t' use a `lwp_t *' for locking diagnostics.

No functional changes intended.

(hannken)

2011-08-12 14:36:30 UTC MAIN commitmail json YAML

Add missing parts to mount devices from a union file system:
- union_close()    has to lock/unlock the lower vnode.
- union_fsync()    has to call spec_fsync() for the union vnode.
- union_strategy() must allow writes to devices on the lower file system.
- union_bwrite()  was completely missing.

(hannken)

2011-08-12 06:40:10 UTC MAIN commitmail json YAML

When creating a union node representing a device initialize
the spec_node to make vrele() happy.

(hannken)

2011-08-10 15:56:01 UTC MAIN commitmail json YAML

Update the (shared) v_interlock if the upper node changes.

(hannken)

2011-08-10 06:27:02 UTC MAIN commitmail json YAML

For devices, sockets and fifos ignore setting the file size to zero to make
open(..., O_TRUNC) happy and allow them to write through the lower layer.

Fixes PR #43560 (writing to null device in unionfs fails)

(hannken)

2011-08-10 06:19:54 UTC MAIN commitmail json YAML

Use LK_SHARED, it is sufficient for VOP_GETATTR() and VOP_READDIR().

(hannken)

2011-08-09 06:36:52 UTC MAIN commitmail json YAML

No need to lock the selcluster in selscan() if either
NO_DIRECT_SELECT is defined or all polls return an event.

(hannken)

2011-08-07 06:01:51 UTC MAIN commitmail json YAML

Change union rmdir semantics to fail directory removal for
non-empty directories like all other file systems do.

Change test accordingly.

(hannken)

2011-08-07 05:56:32 UTC MAIN commitmail json YAML

Allow removal of a directory containing only whiteouts and free them first.

(hannken)

2011-08-06 11:04:25 UTC MAIN commitmail json YAML

Fix the races of direct select()/poll():

- When sel_do_scan() restarts do a full initialization with selclear() so
  we start from an empty set without registered events.  Defer the
  evaluation of l_selret after selclear() and add the count of direct events
  to the count of events.

- For selscan()/pollscan() zero the output descriptors before we poll and
  for selscan() take the sc_lock before we change them.

- Change sel_setevents() to not count events already set.

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

Should fix PR #44763 (select/poll direct-set optimization seems racy)
      and PR #45187 (select(2) sometimes doesn't wakeup)

(hannken)

2011-08-05 08:17:48 UTC MAIN commitmail json YAML

When union_lookup() creates a shadow directory and nameiop is not LOOKUP
it has to restart the lookup to get the componentname right.

Fixes PR #44383 (an endless stream of whiteout and opaque dir problems ...)

(hannken)

2011-08-05 08:14:00 UTC MAIN commitmail json YAML

Make whiteouts work on rumpfs:

- On lookup it is ok to create if the name exists and is a whiteout
- When replacing a whiteout directory entry remove the whiteout first.
- Set UF_OPAQUE when creating a node in place of a whiteout.

(hannken)

2011-08-03 10:03:52 UTC MAIN commitmail json YAML

Make whiteouts work on journaling ffs file system by adding the missing
UFS_WAPBL_BEGIN() / UFS_WAPBL_END() around CREATE and DELETE ops.

Fixes PR #44377 (union whiteouts don't work on ffs -o log)

(hannken)

2011-07-23 14:28:28 UTC MAIN commitmail json YAML

putter_fop_stat(): set st_mode to S_IFCHR.

Fixes PR #44807: something broken in stat(2).

(hannken)

2011-07-20 11:52:00 UTC MAIN commitmail json YAML

Even though msdosfs never truncates file names it advertises _PC_NO_TRUNC
as zero.  Make it advertise one (no_trunc == true).

Names longer than NAME_MAX (255) will never pass namei() btw.

Fixes PR #43670 (msdosfs claims support for filenames longer than {NAME_MAX},
                but fails)

(hannken)

2011-07-11 08:34:01 UTC MAIN commitmail json YAML

Layer_fsync(): when syncing a device node call spec_fsync() to clean the
              layer node before descending to the lower file system.

Adresses PR kern/38762 panic: vwakeup: neg numoutput

(hannken)

2011-07-11 08:27:41 UTC MAIN commitmail json YAML

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

(hannken)

2011-07-11 08:23:01 UTC MAIN commitmail json YAML

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.

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.

(hannken)

2011-07-03 15:25:09 UTC MAIN commitmail json YAML

Return EINVAL when trying to create a device node with "rdev == VNOVAL".

Fixes PR #45111 "tmpfs panic with mknod(2)".

(hannken)

2011-07-01 14:28:22 UTC MAIN commitmail json YAML

ffs_copyonwrite(): If the write is to the in-file-system journal
    there is no need to lock and check the snapshots.

(hannken)

2011-06-29 19:51:12 UTC MAIN commitmail json YAML

Remove dead uvm_vnp_zerorange() after bump to 5.99.54.

(hannken)

2011-06-29 09:12:42 UTC MAIN commitmail json YAML

Make vnd(4) work on sparse files:
- Make the strategy decision a device flag and set VNF_USE_VN_RDWR for
  files known to be sparse.
- Change handle_with_rdwr() to use POSIX_FADV_NOREUSE advise to disable
  read ahead and keep the size of mapped pages below 1 MByte.

No objections on tech-kern@.

(hannken)