Home | History | Annotate | Download | only in adosfs
History log of /src/sys/fs/adosfs/adlookup.c
RevisionDateAuthorComments
 1.22  06-Aug-2022  andvar s/blity/bility/ in various words, mainly in comments.
 1.21  17-Jan-2020  ad VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.
 1.20  03-Sep-2018  riastradh branches: 1.20.6;
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.19  07-Feb-2014  hannken branches: 1.19.28; 1.19.30;
Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
 1.18  05-Nov-2012  dholland branches: 1.18.2;
Excise struct componentname from the namecache.

This uglifies the interface, because several operations need to be
passed the namei flags and cache_lookup also needs for the time being
to be passed cnp->cn_nameiop. Nonetheless, it's a net benefit.

The glop should be able to go away eventually but requires structural
cleanup elsewhere first.

This change requires a kernel bump.
 1.17  05-Nov-2012  dholland 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.16  22-Jul-2012  rmind branches: 1.16.2;
Move some the test for MAKEENTRY into the cache_enter(9). Make some
variables in vfs_cache.c static, __read_mostly, etc.

No objection on tech-kern@.
 1.15  30-Nov-2010  dholland branches: 1.15.8; 1.15.14;
Abolish the SAVENAME and HASBUF flags. There is now always a buffer,
so the path in a struct componentname is now always valid during VOP
calls.
 1.14  24-Jun-2010  hannken Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
 1.13  08-Jan-2010  pooka branches: 1.13.2; 1.13.4;
The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase). Plenty of mix'n match upper/lowercase has creeped
into the tree since then. Nuke the macros and convert all callsites
to lowercase.

no functional change
 1.12  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.11  26-Nov-2007  pooka branches: 1.11.18; 1.11.26; 1.11.32;
Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start. In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
 1.10  10-Oct-2007  ad branches: 1.10.4;
Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
 1.9  09-Dec-2006  chs branches: 1.9.6; 1.9.18; 1.9.20; 1.9.22;
a smorgasbord of improvements to vnode locking and path lookup:
- LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
these now always return the parent vnode locked. namei() works as before.
lookup() and various other paths no longer acquire vnode locks in the
wrong order via vrele(). fixes PR 32535.
as a nice side effect, path lookup is also up to 25% faster.
- the above allows us to get rid of PDIRUNLOCK.
- also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
- remove an assumption in layer_node_find() that all file systems implement
a recursive VOP_LOCK() (unionfs doesn't).
- require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
fill in eopnotsupp() for file systems that don't support being exported
and remove the checks for NULL. (layerfs calls these without checking.)
- in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
adjust which vnode is locked. fixes PR 33374.
- apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().
 1.8  14-May-2006  elad branches: 1.8.8; 1.8.10; 1.8.12;
integrate kauth.
 1.7  11-Dec-2005  christos branches: 1.7.4; 1.7.6; 1.7.8; 1.7.10; 1.7.12;
merge ktrace-lwp.
 1.6  26-Feb-2005  perry branches: 1.6.4;
nuke trailing whitespace
 1.5  24-Feb-2004  wiz branches: 1.5.8; 1.5.10;
achieved, not acheived. From Peter Postma.
 1.4  24-Feb-2004  wiz becuase -> because. From Peter Postma.
 1.3  29-Jun-2003  fvdl branches: 1.3.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.2  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
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
 1.1  23-Dec-2002  jdolecek branches: 1.1.2;
move adosfs files from sys/adosfs to sys/fs/adosfs
 1.1.2.2  29-Dec-2002  thorpej With with HEAD.
 1.1.2.1  23-Dec-2002  thorpej file adlookup.c was added on branch nathanw_sa on 2002-12-29 19:55:25 +0000
 1.3.2.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.3.2.6  21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.5  18-Sep-2004  skrll Sync with HEAD.
 1.3.2.4  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.3.2.3  03-Aug-2004  skrll Sync with HEAD
 1.3.2.2  03-Jul-2003  wrstuden LWP-ify adosfs. Also remove unused variable size from adosfs_mount().

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.
 1.3.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.5.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.8.1  29-Apr-2005  kent sync with -current
 1.6.4.4  07-Dec-2007  yamt sync with head
 1.6.4.3  27-Oct-2007  yamt sync with head.
 1.6.4.2  30-Dec-2006  yamt sync with head.
 1.6.4.1  21-Jun-2006  yamt sync with head.
 1.7.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.7.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.7.8.1  24-May-2006  yamt sync with head.
 1.7.6.1  01-Jun-2006  kardel Sync with head.
 1.7.4.1  09-Sep-2006  rpaulo sync with head
 1.8.12.1  17-Feb-2007  tron Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.
 1.8.10.1  10-Dec-2006  yamt sync with head.
 1.8.8.1  12-Jan-2007  ad Sync with head.
 1.9.22.1  14-Oct-2007  yamt sync with head.
 1.9.20.2  09-Jan-2008  matt sync with HEAD
 1.9.20.1  06-Nov-2007  matt sync with HEAD
 1.9.18.2  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.9.18.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.9.6.1  17-Jun-2007  ad - Increase the number of thread priorities from 128 to 256. How the space
is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
is provided, with hooks for fast-path MD code that can run the interrupt
threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.
 1.10.4.1  08-Dec-2007  mjf Sync with HEAD.
 1.11.32.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.26.1  28-Apr-2009  skrll Sync with HEAD.
 1.11.18.3  11-Aug-2010  yamt sync with head.
 1.11.18.2  11-Mar-2010  yamt sync with head
 1.11.18.1  04-May-2009  yamt sync with head.
 1.13.4.2  05-Mar-2011  rmind sync with head
 1.13.4.1  03-Jul-2010  rmind sync with head
 1.13.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.15.14.1  12-Aug-2012  martin Pull up following revision(s) (requested by manu in ticket #484):
sys/fs/nilfs/nilfs_vnops.c: revision 1.18
sys/ufs/ufs/ufs_lookup.c: revision 1.117
sys/nfs/nfs_vnops.c: revision 1.295
sys/ufs/chfs/chfs_vnops.c: revision 1.8
sys/ufs/ext2fs/ext2fs_lookup.c: revision 1.70
sys/fs/unionfs/unionfs_vnops.c: revision 1.6
sys/kern/vfs_cache.c: revision 1.89
sys/fs/efs/efs_vnops.c: revision 1.26
sys/fs/hfs/hfs_vnops.c: revision 1.26
sys/fs/adosfs/adlookup.c: revision 1.16
sys/fs/puffs/puffs_vnops.c: revision 1.168
sys/fs/tmpfs/tmpfs_vnops.c: revision 1.98
sys/fs/ntfs/ntfs_vnops.c: revision 1.52
sys/fs/cd9660/cd9660_lookup.c: revision 1.20
sys/fs/msdosfs/msdosfs_lookup.c: revision 1.24
sys/fs/smbfs/smbfs_vnops.c: revision 1.80
sys/fs/udf/udf_vnops.c: revision 1.72
sys/fs/filecorefs/filecore_lookup.c: revision 1.14
sys/fs/puffs/puffs_node.c: revision 1.25
Move some the test for MAKEENTRY into the cache_enter(9). Make some
variables in vfs_cache.c static, __read_mostly, etc.
No objection on tech-kern@.
 1.15.8.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.15.8.2  16-Jan-2013  yamt sync with (a bit old) head
 1.15.8.1  30-Oct-2012  yamt sync with head
 1.16.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.2.1  18-May-2014  rmind sync with head
 1.19.30.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.19.30.1  10-Jun-2019  christos Sync with HEAD
 1.19.28.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.20.6.1  17-Jan-2020  ad Sync with head.

RSS XML Feed