| Age | Commit message (Collapse) | Author |
|
Reported-by: syzbot+b81b69971581b4f4db00@syzkaller.appspotmail.com
|
|
|
|
union_mount() should not use a NULL componentname as not all
file systems can handle it.
Use static { LOOKUP, NOCRED } componentname instead.
Reported-by: syzbot+ecda308a1dd9652836d0@syzkaller.appspotmail.com
Reported-by: syzbot+9b687847ee5f43e94ca3@syzkaller.appspotmail.com
Reported-by: syzbot+9f9d1a841734f9f50de2@syzkaller.appspotmail.com
|
|
Always add a reference to the lower mount.
Ride 9.99.105
|
|
|
|
(chris at accessvector dot net)
- KNF
- use kmem
|
|
like nullfs, make the upper vnode share that status with the lower vnode.
And, lo, NetBSD 9.99.99.
Fixes PR kern/56713.
|
|
Remove unused predicates vn_locked() and vn_anylocked().
Welcome to 9.99.95
|
|
from union_lock() is no longer needed.
Adapt union_lock() to the recent addition of upgrade or downgrade.
VV_LOCKSWORK now.
|
|
|
|
|
|
Unionfs is meant to provide a writable layer above a read-only layer
and should not fail here just because the lower layer is mounted
read-only.
|
|
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
forcing each individual file system to deal with it (except VOP_RENAME(),
because VOP_RENAME() is a mess and we currently have 2 different ways
of handling it; at least it's reasonably well-centralized in the "new"
way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
to avoid doing work for events no one cares about (avoiding, e.g.
taking locks and traversing the klist to send a NOTE_WRITE when
someone is merely watching for a file to be deleted, for example).
In support of the above:
- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
to be invoked before and after vop_pre() and vop_post(), respectively.
Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
vop_*_args structures. These context fields are used to convey information
between the file system VOP function and the VOP wrapper, but do not
occupy an argument slot in the VOP_*() call itself. These context fields
are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
back the resulting link count of the target vnode. Return this in tmpfs,
udf, nfs, chfs, ext2fs, lfs, and ufs.
NetBSD 9.99.92.
|
|
|
|
This change requires a kernel bump.
Note though that I'm not going to version the VOP_LOOKUP args
structure (or any other args structure) as code that doesn't touch
cn_consume doesn't need attention and code that does will fail on it
without further intervention.
|
|
other cases underneath it.
The solution here is not really very good (take the longer
path-to-consume if they're different) but it will serve for the cases
that exist.
(If we were to add a fs that really uses different naming semantics,
we'd have to take additional steps; probably it doesn't make sense to
allow unionfs to union such a thing with a normal fs and attempting it
should fail at mount time.)
Update fs/unionfs as well to avoid increasing the current set of
compile failures there. Though maybe it's time to just remove
fs/unionfs.
|
|
- Move namei_getcomponent to genfs_vnops.c and call it genfs_parsepath.
- Add a parsepath entry to every vnode ops table.
VOP_PARSEPATH takes a directory vnode to be searched and a complete
following path and chooses how much of that path to consume. To begin
with, all parsepath calls are genfs_parsepath, which locates the first
'/' as always.
Note that the call doesn't take the whole struct componentname, only
the string. The other bits of struct componentname should not be
needed and there's no reason to cause potential complications by
exposing them.
|
|
This breaks the assumption that un_uppervp->v_mount is the upper mount.
Fix by storing the directory as un_lowervp and adapt union_readdir().
Should fix PR kern/55552: panic with union mount
|
|
|
|
automate installation of sysctl nodes.
Note that there are still a number of device and pseudo-device modules
that create entries tied to individual device units, rather than to the
module itself. These are not changed.
|
|
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart. v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap. Others to follow later.
|
|
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.
|
|
|
|
the file is not found and we end up looping we need them.
|
|
expand and remove union_updatevp() and take care to transfer the
vnode lock from the union vnode to its new upper vnode without
breaking the fstrans state.
Add assertions that un_lowervp and un_uppervp never change from
non-NULL to non-NULL.
|
|
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.
|
|
VOP_RECLAIM naturally has exclusive access to the vnode, so having it
locked on entry is not strictly necessary -- but it means if there
are any final operations that must be done on the vnode, such as
ffs_update, requiring exclusive access to it, we can now kassert that
the vnode is locked in those operations.
We can't just have the caller release the last lock because some file
systems don't use genfs_lock, and require the vnode to remain valid
for VOP_UNLOCK to work, notably unionfs.
|
|
|
|
|
|
No change to vp -- the plan is to replace the node by the
componentname in the vop parameters, and let all directory vops do
lookups internally.
Proposed on tech-kern with no objections:
https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html
|
|
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.
|
|
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html
Ride 7.99.68, a bumpy bus of incremental vfs improvements!
|
|
|
|
a layered file system is mounted on.
Welcome to 7.99.65
|
|
so lower file system vnodes get marked as open for writing.
|
|
Layered file systems need work.
|
|
Welcome to 7.99.36
|
|
|
|
Ride 7.99.10 bump.
|
|
|
|
Convert callers who want locks to use vn_lock afterward.
Add extra argument so the compiler will report stragglers.
|
|
change union_freevp() to detach the vnode from the union node
by clearing the vnode backpointer and the lower node sizes.
|
|
It would be better to use (uppervp, lowervp) as key, but either
may be NULL and may change any time.
|
|
|
|
keep dvp referenced and locked some time ago.
|
|
"its", people!
|
|
|
|
a correctly typed pointer.
|
|
find.
The filesystem ones all call genfs_eopnotsupp - right now I am only
implementing the plumbing and we can implement fallocate and/or
fdiscard for files later.
The device ones call spec_fallocate (which is also genfs_eopnotsupp)
and spec_fdiscard, which dispatches to the device-level op.
The fifo ones all call vn_fifo_bypass, which also ends up being
EOPNOTSUPP.
|
|
|