VOP_STRATEGY(bp) is replaced by one of two new functions:
- VOP_STRATEGY(vp, bp) Call the strategy routine of vp for bp.
- DEV_STRATEGY(bp) Call the d_strategy routine of bp->b_dev for bp.
DEV_STRATEGY(bp) is used only for block-to-block device situations.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.
Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.
All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.
PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
filesystem. With this particular corruption, the code in pcbmap()
would compute an offset into an array that was way out of bounds,
so check the bounds before trying to access and return an error if
the offset would be out of bounds.
file system.
The function vfs_write_suspend stops all new write operations to a file
system, allows any file system modifying system calls already in progress
to complete, then sync's the file system to disk and returns. The
function vfs_write_resume allows the suspended write operations to
complete.
From FreeBSD with slight modifications.
Approved by: Frank van der Linden <fvdl@netbsd.org>
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD
add quota support to TODO - makes sense only once writing support
would be implemented, and only once NTFS would support notion of file 'owner'
adresses kern/21967 by Martin Husemann
the execute bit off for files, but keep search permission for directories.
Change contributed in PR kern/21538 by Pavel Arnost, based on some FreeBSD
patches.
Further manpage changes, and backward-compatibility adjustments done by me.
Also fixes PR kern/16778 by Johan Danielsson, and PR kern/3400 by Rick Byers
* Remove the "lwp *" argument that was added to vget(). Turns out
that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
just to appease the above.
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.
Bump the kernel rev up to 1.6V
- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
and factored out some of the vfsop statfs() code to copy_statfs_info(). This
fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
* vinvalbuf needs to be called without simplelocks held
* need to release the lock in opencount > 0 case
* need to release the lock before smbfs_findclose(), since that
can send a request to SMB server and attempt to pool_get() a request buffer
problem path found & testing by Martin Husemann, fix adresses PR kern/21067
replace the VOP__UNLOCK() macros with VOP_UNLOCK() directly - it just
obfuscates the code
similarily for VN_LOCK()->vn_lock()
unlock dvp before ntvattrget call in ntfs_lookup() in '..' case, not after
fix problem in ntfs_lookup() where PDIRUNLOCK was not set in one code path
after unlocking parent directory vnode
is used to setup a 'PID' for the lock; if a SMB write request is sent
to server, it returns EDEADLK if it doesn't have same PID. since we
use '1' as request PID (see smb_rq_new()), we must use '1' here too,
for now
add a comment what is the ID used for, to avoid similar mistake in future
this partially back off rev 1.5, and makes advisory locking work
on SMB shares mounted from Windows again (sigh)
the condition was changed to be true when the file _should_ be removed,
but ended up wrong way
this fixes a problem where it wasn't possible to remove regular files
from mounted smbfs share
smbfs_smb_close() - that routine allocates memory and could sleep
problem found with LOCKDEBUG, change adresses PR kern/21067 by Martin Husemann
g/c unneeded VOP_GETATTR() call from smbfs_closel()
convert all code to use smb_{rq|t2}_alloc() instead of allocating
structures on stack, make smb_rq_init()/smb_t2_init() static and not
exported outside smb_rq.c
server supports it
for this, need NT CREATE AND X a directory in smbfs_open(), so that
we get the FID handle used for DIRECTORY CHANGE NOTIFY SMB
this could eventually be used to 'watch' even regular files, by
watching its parent directory and lookup/VN_KNOTE() when we get
REMOVED/RENAMED/MODIFIED action
also reorganize the kqueue code somewhat to use simplify locking
and knote detach
having some #ifdef UNION code in vfs_vnops.c, introduce variable
'vn_union_readdir_hook' which is set to address of appropriate
vn_readdir() hook by union filesystem when it's loaded & mounted
this is basically copy of what nfs_kq.c does - a thread periodically
polls server checking if any of the wateched files changed
eventually this should be changed to take advantage of SMB Directory
Change Notify
number
bump the timeout to 5s; eventually we'd want to do some heuristics similar
to NFS, i.e. make the attribute cache timeout longer for files nor recently
changed
This is potentially fragile, since the vnode may have been reclaimed
in vflush(), and used by different filesystem. This wouldn't actually
happen due to n_parent link to parent directory, but better safe
than sorry.
Since sm_root is only and strictly cache to speed up VFS_ROOT(),
it can be acquired/dropped any time. Rearrange code to not
require sm_root set, and change smbfs_root() back to set
sm_root if it's not set yet. smbfs_unmount() now only vrele()s
the root vnode if sm_root is set, and doesn't try reacquire it
if vflush() fails.
problem with vref() after vflush() pointed out by Bill Studenmund
smbfs_setroot()
remove pointless if() and MNT_LOCAL flag handling in smbfs_unmount()
turn the check for non-null sm_root to KASSERT() in smbfs_statfs()
adjust some comments
* lock/unlock mntvnode_slock and vnode interlock appropriately
* use LK_NOWAIT for vget()
* adjust the check for vnode being dirty to check fs-private 'modified' flag,
and drop waitfor/VOP_ISLOCKED() check
former smbfs_hash() may have accessed memory past buffer (ouch!), and accessed
memory in alignment-unsafe way
as an added bonus, hash32_strn() appears to have better distribution
* make sure islastcn and lockparent is set before used when the entry is cached
* add VWRITE check for nameiop == RENAME, add necessary unlock/relock for
ISDOTDOT case
adjust smbfs_print() to have slightly nicer output
enable vnode locking
* use LK_RETRY for the vget()
* turn the check for dead parent vnode to #ifdef DIAGNOSTIC panic
* reformat the hash walk code a little, and only assign vp if entries match
* add some comments