kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals
kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)
based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
the final null byte.
This makes programs using fts(3) (like find(1)/du(1)) print correct
name again. Problem reported by Luke Mewburn in private e-mail, thanks.
to recode Unicode names to other representation, like encoding form
or national character/code sets. This replaces the ugly NTFS_U28() hack.
Use these hooks to encode the filenames to UTF-8.
<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>
also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
ntnode->ntmp->ntm_* values
ntfs_inactivate(): as NTFS doesn't support any filesystem changes,
it's not needed to check whether the file handle is stale;
the check was bogus anyway - besides the value of vp->v_usecount
was checked with unlocked vnode, the vnode was unnecessarily
_always_ recycled when the filesystem containing it has been
mounted with mask (-i parameter to mount_ntfs(1))
not specified or 0 -- unbelievable, but true
ntfs_reclaim(): don't call VOP_UNLOCK() even on FreeBSD - it's not
done for any other their filesystem, so it should not be done even
for NTFS
ntfs_access(): remove the commented-out check for immutable flag, it doesn't
make sense for NTFS
other miscelaneous cosmetic cleanups
VOP__UNLOCK() macros, g/c VOP__LOCK()
add some comments
use LK_RETRY flag as appropriate
g/c the FreeBSD vnode_pager_uncache() staff, as was done in FreeBSD tree a while
ago (actually, when they merged the first round of NetBSD patches)
use VN_LOCK() & VOP__UNLOCK() consistently throughout the code instead
of vn_lock() and VOP_UNLOCK()
minor whitespace changes
guard the setting and checking of i_usecount by simplelock; as
situation where there would be several users of same ntnode is
extremery rare, it's not worth the efford to change the code to
hold the (exclusive) lock only when it's needed
* in struct fnode, g/c f_dev & f_type (former is already in ntnode,
latter is in parent vnode), move f_devvp from struct fnode into
struct ntnode (no reason this should be copied in each fnode)
changes: cache_lookup() now returns -1 if not successful; for
the '.' case, 'error' haven't been cleared to 0,
so that ntfs_lookup() itself returned -1 , resulting to
nasty "leaf should be empty" panic early after
routines - avoids potential DoS attack and closes an easy way to force
the kernel to panic
* for read(), DTRT WRT offset bigger than file size
ntfs_strategy(): adapt to ntfs_readattr() change
ntfs_readdir(): use ntfs_u28() to translate the file name characters
to 8bit encoding, avoid excessive intendation, reformat the
debug messages slightly
* return EROFS for volume mounted RO when the nameiop is DELETE or RENAME
(the same way ufs_lookup() does)
* add explicit call to cache_lookup() on NetBSD (handled by generic VFS
layer in FreeBSD)
* avoid using strncmp() when checking whether the name is . or ..
* fix locking of parent directory for ISDOTDOT case
* call cache_enter() always (even for . and ..)
* vnodeops array: add entry for vop_fcntl_desc, remove unnecessary casts
Reviewed by: wrstuden
Tested by: jdolecek