Home | History | Annotate | Download | only in union
History log of /src/sys/fs/union/union.h
RevisionDateAuthorComments
 1.30  18-Aug-2020  hannken Operation union_readdirhook() stores the lower directory as un_uppervp.
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
 1.29  17-Jul-2017  hannken branches: 1.29.2; 1.29.10;
Make union_newlower() ans union_newupper() local to union_subr.c,
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.
 1.28  16-Feb-2015  hannken branches: 1.28.10;
Change union to vcache. Use address of the union node as key.

It would be better to use (uppervp, lowervp) as key, but either
may be NULL and may change any time.
 1.27  16-Feb-2015  hannken Add reference count to union node.
 1.26  14-Feb-2014  hannken branches: 1.26.6;
Member un_flags is unused now -- remove.
 1.25  13-Feb-2014  hannken 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.
 1.24  05-Nov-2012  dholland branches: 1.24.2;
Disentangle the namecache from the internals of namei.

- Move the namecache's hash computation to inside the namecache code,
instead of being spread out all over the place. Remove cn_hash from
struct componentname and delete all uses of it.

- It is no longer necessary (if it ever was) for cache_lookup and
cache_lookup_raw to clear MAKEENTRY from cnp->cn_flags for the cases
that cache_enter already checks for.

- Rearrange the interface of cache_lookup (and cache_lookup_raw) to
make it somewhat simpler, to exclude certain nonexistent error
conditions, and (most importantly) to make it not require write access
to cnp->cn_flags.

This change requires a kernel bump.
 1.23  23-Nov-2011  hannken branches: 1.23.8;
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().
 1.22  21-Nov-2011  hannken 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.
 1.21  23-Aug-2011  hannken branches: 1.21.2;
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.
 1.20  12-Aug-2011  hannken Change some `#ifdef DIAGNOSTIC' to `KASSERT'.
Instead of a `pid_t' use a `lwp_t *' for locking diagnostics.

No functional changes intended.
 1.19  07-Aug-2011  hannken Change union rmdir semantics to fail directory removal for
non-empty directories like all other file systems do.

Change test accordingly.
 1.18  28-Jun-2008  rumble Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.
 1.17  02-Jan-2008  ad branches: 1.17.6; 1.17.10; 1.17.12; 1.17.14;
Merge vmlocking2 to head.
 1.16  08-Dec-2007  pooka branches: 1.16.4;
Remove cn_lwp from struct componentname. curlwp should be used
from on. The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
 1.15  14-May-2006  elad branches: 1.15.32; 1.15.34; 1.15.40; 1.15.44;
integrate kauth.
 1.14  27-Dec-2005  chs branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10; 1.14.12;
changes for making DIAGNOSTIC not change the kernel ABI:
- for structure fields that are conditionally present,
make those fields always present.
- for functions which are conditionally inline, make them never inline.
- remove some other functions which are conditionally defined but
don't actually do anything anymore.
- make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.
 1.13  11-Dec-2005  christos merge ktrace-lwp.
 1.12  03-Dec-2005  christos - protect userland exported files against multiple inclusion.
- make sure that kernel only files don't compile in userland using #error
- XXX: some kernel only files still get installed.
- XXX: some files used in userland, don't get installed.
 1.11  30-Aug-2005  xtraeme Remove __P()
 1.10  20-May-2004  atatat branches: 1.10.12;
Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
 1.9  03-Oct-2003  yamt branches: 1.9.2;
terminate snprintb 'new' format strings correctly.
(fixes overrun in mount_*)
 1.8  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.7  29-Jun-2003  fvdl branches: 1.7.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.6  29-Jun-2003  thorpej Undo part of the ktrace/lwp changes. In particular:
* 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.
 1.5  29-Jun-2003  thorpej Fix problems with Darren's ktrace/lwp changes.
 1.4  29-Jun-2003  darrenr More changes for providing lwpid for ktrace (sparc GENERIC built)
 1.3  17-Mar-2003  jdolecek no need to export union_vfsops here
 1.2  17-Mar-2003  jdolecek make it possible for UNION fs to be loaded via LKM - instead of
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
 1.1  16-Mar-2003  jdolecek move union filesystem code from sys/miscfs/union to sys/fs/union
 1.7.2.7  11-Dec-2005  christos Sync with head.
 1.7.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.4  18-Sep-2004  skrll Sync with HEAD.
 1.7.2.3  24-Aug-2004  skrll Undo part of the ktrace/lwp changes. In particular:
* 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.
 1.7.2.2  03-Aug-2004  skrll Sync with HEAD
 1.7.2.1  03-Jul-2003  wrstuden LWP-ify union fs.

Note: These changes suffer from the same cnp->cn_lwp issue noted for
ufs. They will need to get fixed at the same time as ufs. The fix is to
add struct lwp * as a parameter to some VOPs.

Note also that most of the cn_lwp references used to be cn_proc references,
so if cnp->cn_lwp is bad to use, unionfs's been naughty for quite some
time.
 1.9.2.1  23-May-2004  tron Pull up revision 1.10 (requested by atatat in ticket #374):
Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.
This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.
linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
 1.10.12.2  21-Jan-2008  yamt sync with head
 1.10.12.1  21-Jun-2006  yamt sync with head.
 1.14.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.14.10.2  06-May-2006  christos Move _KERNEL decl lower. Some KNF.
 1.14.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.14.8.1  24-May-2006  yamt sync with head.
 1.14.6.1  01-Jun-2006  kardel Sync with head.
 1.14.4.1  09-Sep-2006  rpaulo sync with head
 1.15.44.2  26-Dec-2007  ad Sync with head.
 1.15.44.1  10-Dec-2007  ad - Don't drain the vnode lock in vclean(); reference counting and XLOCK
should be enough.
- LK_SETRECURSE is gone.
 1.15.40.1  18-Feb-2008  mjf Sync with HEAD.
 1.15.34.1  09-Jan-2008  matt sync with HEAD
 1.15.32.1  09-Dec-2007  jmcneill Sync with HEAD.
 1.16.4.1  02-Jan-2008  bouyer Sync with HEAD
 1.17.14.1  03-Jul-2008  simonb Sync with head.
 1.17.12.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.10.1  04-May-2009  yamt sync with head.
 1.17.6.1  29-Jun-2008  mjf Sync with HEAD.
 1.21.2.3  22-May-2014  yamt 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")
 1.21.2.2  16-Jan-2013  yamt sync with (a bit old) head
 1.21.2.1  17-Apr-2012  yamt sync with head
 1.23.8.3  03-Dec-2017  jdolecek update from HEAD
 1.23.8.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.8.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.2.1  18-May-2014  rmind sync with head
 1.26.6.2  28-Aug-2017  skrll Sync with HEAD
 1.26.6.1  06-Apr-2015  skrll Sync with HEAD
 1.28.10.1  25-Jul-2017  snj Pull up following revision(s) (requested by hannken in ticket #145):
sys/fs/union/union.h: revision 1.29
sys/fs/union/union_subr.c: revision 1.76
Make union_newlower() ans union_newupper() local to union_subr.c,
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.
 1.29.10.1  27-Aug-2020  martin Pull up following revision(s) (requested by hannken in ticket #1062):

sys/fs/union/union.h: revision 1.30
sys/fs/union/union_subr.c: revision 1.79
sys/fs/union/union_vnops.c: revision 1.74

Operation union_readdirhook() stores the lower directory as un_uppervp.
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
 1.29.2.2  17-Jul-2017  hannken 3095096
 1.29.2.1  17-Jul-2017  hannken file union.h was added on branch perseant-stdc-iso10646 on 2017-07-17 09:22:37 +0000

RSS XML Feed