The NetBSD Project

CVS log for src/sys/ufs/ufs/ufs_vfsops.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / ufs / ufs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.51.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:45 2014 UTC (4 weeks, 3 days ago) by tls
Branch: tls-maxphys
Changes since 1.51.2.2: +25 -5 lines
Diff to previous 1.51.2.2 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.52.10.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:58 2014 UTC (5 weeks, 5 days ago) by tls
Branch: tls-earlyentropy
Changes since 1.52: +22 -5 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

Rebase.

Revision 1.42.4.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:19 2014 UTC (3 months, 4 weeks ago) by yamt
Branch: yamt-pagecache
Changes since 1.42.4.2: +22 -5 lines
Diff to previous 1.42.4.2 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored)

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")

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:22 2014 UTC (4 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.52: +22 -5 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

sync with head

Revision 1.53 / (download) - annotate - [select for diffs], Thu May 8 08:21:53 2014 UTC (4 months, 1 week ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, netbsd-7-base, netbsd-7, HEAD
Changes since 1.52: +22 -5 lines
Diff to previous 1.52 (colored)

Add a global vnode cache:

- vcache_get() retrieves a referenced and initialised vnode / fs node pair.
- vcache_remove() removes a vnode / fs node pair from the cache.

On cache miss vcache_get() calls new vfs operation vfs_loadvnode() to
initialise a vnode / fs node pair.  This call is guaranteed exclusive,
no other thread will try to load this vnode / fs node pair.

Convert ufs/ext2fs, ufs/ffs and ufs/mfs to use this interface.

Remove now unused ufs/ufs_ihash

Discussed on tech-kern.

Welcome to 6.99.41

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:19 2013 UTC (18 months, 3 weeks ago) by tls
Branch: tls-maxphys
Changes since 1.51.2.1: +3 -3 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored)

resync with head

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Sun Feb 10 16:26:34 2013 UTC (19 months, 1 week ago) by tls
Branch: tls-maxphys
Changes since 1.51: +34 -2 lines
Diff to previous 1.51 (colored)


Add an accessor -- ufs_maxphys() -- to check the maximum transfer size
for a given UFS mountpoint, and move the code from mount that finds
the underlying disk and resets the mountpoint max transfer size into a
utility function, ufs_update_maxphys().

Add a global serial number that counts disk property changes to which
filesystems are meant to accomodate themselves.  Make ufs_maxphys()
check it.  This is a sort of flag-polling interface that avoids callbacks
into the filesystem code, but will require freezing filesystems and
draining in-flight transactions before a decrease in size that is
mandatory (like attaching a disk with a smaller maximum transfer size
as a spare in a RAIDframe set), rather than "advisory", like finding
out set geometry from a RAID controller long after boot and deciding
a smaller transfer size would be optimal, can be signalled.  Still, the
"advisory" case is the common one so this is progress.

Make a bit of an example of RAIDframe by making it bump this new
serial number when disks are added to the subsystem.  I will attack
one of the hardware RAID drivers (probably arcmsr) next.

Revision 1.42.4.2 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:35 2013 UTC (19 months, 3 weeks ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.42.4.1: +3 -3 lines
Diff to previous 1.42.4.1 (colored) to branchpoint 1.42 (colored)

sync with head

Revision 1.52 / (download) - annotate - [select for diffs], Tue Jan 22 09:39:18 2013 UTC (19 months, 3 weeks ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base8, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-earlyentropy, rmind-smpnet
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.

Revision 1.42.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:57 2012 UTC (2 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.42: +13 -32 lines
Diff to previous 1.42 (colored)

sync with head

Revision 1.42.8.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:52 2012 UTC (2 years, 5 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.42.8.1: +3 -2 lines
Diff to previous 1.42.8.1 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored)

sync to latest -current.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Apr 4 19:52:48 2012 UTC (2 years, 5 months ago) by tron
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.50: +3 -2 lines
Diff to previous 1.50 (colored)

Assert that we can a valid inode when looking up a file handle.

Revision 1.42.8.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:57 2012 UTC (2 years, 7 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.42: +12 -32 lines
Diff to previous 1.42 (colored)

merge to -current.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Feb 1 05:34:43 2012 UTC (2 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

Change the syscall API for quotas over to the new non-proplib one.

   - struct vfs_quotactl_args -> struct quotactl_args
   - add sys/stdint.h to sys/quotactl.h for clean userland build
   - install sys/quotactl.h in /usr/include
   - update set lists for same
   - add new marshalling code in libquota
   - add new unmarshalling code in vfs_syscalls.c
   - discard proplib interpreter code in vfs_quotactl.c
   - add dispatching code for the 14 quotactl ops in vfs_quotactl.c
   - mark the proplib quotactl syscall obsolete
   - add a new syscall number for the new quotactl syscall
   - change the name of the syscall to __quotactl()
   - remove the decl of the old quotactl from quota/quotaprop.h
   - add a decl of the new quotactl to sys/quotactl.h
   - update the libc build
   - update ktruss
   - remove proplib marshalling code from libquota
   - update copy of syscall table in gdb ppc sources
   - hack rumphijack to accomodate new quotactl name (as I recall,
     pooka wanted such a name change to simplify something, but I
     don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Jan 29 08:49:01 2012 UTC (2 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.48: +4 -6 lines
Diff to previous 1.48 (colored)

Fix errors in !defined(QUOTA) && !defined(QUOTA2) case.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Jan 29 07:16:54 2012 UTC (2 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.47: +2 -3 lines
Diff to previous 1.47 (colored)

Remove references to <quota/quotaprop.h> in src/sys/ufs.
The remaining references in the kernel are in vfs_quotactl.c, the
compat_50 code for the old quotactl (to be fixed up), and the
code compiled from src/common/lib/libquota.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Jan 29 07:14:39 2012 UTC (2 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored)

Remove the extra op argument to VFS_QUOTACTL() - the op is now stored
purely in the args structure.

This change requires a kernel version bump.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jan 29 06:36:07 2012 UTC (2 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.45: +6 -8 lines
Diff to previous 1.45 (colored)

Introduce struct vfs_quotactl_args. Use it.

This change uglifies vfs_quotactl some in order to make room for
moving operation-specific but FS-independent logic out of ufs_quota.c.

Note: this change requires a kernel version bump.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jan 29 06:34:58 2012 UTC (2 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.44: +5 -4 lines
Diff to previous 1.44 (colored)

Move the proplib-based quota command dispatching (that is, the code
that knows the magic string names for the allowed actions) out of
UFS-specific code and to fs-independent code.

This introduces QUOTACTL_* operation codes and changes the signature
of VFS_QUOTACTL() again for compile safety.

Note: this change requires a kernel version bump.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jan 29 06:32:44 2012 UTC (2 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.43: +11 -27 lines
Diff to previous 1.43 (colored)

Move the code for iterating over the multiple RPC calls in a quota
proplib XML packet to vfs_quotactl.c out of sys/ufs/ufs.

Add a dummy extra arg to VFS_QUOTACTL for compile safety.

Note: this change requires a kernel version bump.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jan 27 19:22:50 2012 UTC (2 years, 7 months ago) by para
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

converting readdir in ffs ext2fs from malloc(9) to kmem(9)
while there allocate ufs mount structs from kmem(9) too
preceding kmem-vmem-pool-patch

releng@ acknowledged

Revision 1.40.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:19 2011 UTC (3 years, 3 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.40: +40 -16 lines
Diff to previous 1.40 (colored) next main 1.41 (colored)

Sync with HEAD.

Revision 1.40.4.1 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:21 2011 UTC (3 years, 5 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.40: +40 -16 lines
Diff to previous 1.40 (colored) next main 1.41 (colored)

sync with head

Revision 1.42 / (download) - annotate - [select for diffs], Thu Mar 24 17:05:46 2011 UTC (3 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)

Revision 1.41 / (download) - annotate - [select for diffs], Sun Mar 6 17:08:39 2011 UTC (3 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.40: +40 -16 lines
Diff to previous 1.40 (colored)

merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.

Revision 1.40.8.2 / (download) - annotate - [select for diffs], Wed Feb 9 11:37:16 2011 UTC (3 years, 7 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.40.8.1: +3 -3 lines
Diff to previous 1.40.8.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

Fix build without quotas

Revision 1.40.8.1 / (download) - annotate - [select for diffs], Thu Jan 20 14:25:03 2011 UTC (3 years, 8 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.40: +40 -16 lines
Diff to previous 1.40 (colored)

Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
  as parameter a path to a mount point, and a prop_dictionary
  (in plistref format) describing commands and arguments.
  For each command, status and data are returned as a prop_dictionary.
  quota commands features will be added to take advantage of this,
  exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
  ffs (and playing nicely with wapbl).
  Quotas are enabled on a ffs filesystem via superblock flags.
  tunefs(8) can enable or disable quotas.
  On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
  block and inode usages, and will check and update quotas in Pass 6.
  quota usage and limits are stored in unliked files (one for users,
  one for groups)l fsck_ffs(8) will create the files if needed, or
  free them if needed. This means that after enabling or disabling
  quotas on a filesystem; a fsck_ffs(8) run is required.
  quotacheck(8) is not needed any more, on a unclean shutdown
  fsck or journal replay will take care of fixing quotas.
  newfs(8) can create a ready-to-mount quota-enabled filesystem
  (superblock flags are set and quota inodes are created).
  Other new features or semantic changes:
  - default quota datas, applied to users or groups which don't already
    have a quota entry
  - per-user/group grace time (instead of a filesystem global one)
  - 0 really means "nothing allowed at all", not "no limit".
    If you want "no limit", set the limit to UQUAD_MAX (tools will
    understand "unlimited" and "-")

  A quota file is structured as follow:
  it starts with a header, containing a few per-filesystem values,
  and the default quota limits.
  Quota entries are linked together as a simple list, each entry has a
  pointer (as an offset withing the file) to the next.
  The header has a pointer to a list of free quota entries, and
  a hash table of in-use entries. The size of the hash table depends
  on the filesystem block size (header+hash table should fit in the
  first block). The file is not sparse and is a multiple of
  filesystem block size (when the free quota entry list is empty a new
  filesystem block is allocated). quota entries to not cross
  filesystem block boundaries.

  In memory, the kernel keeps a cache of recently used quota entries
  as a reference to the block number, and offset withing the block.
  The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
      update repquota, edquota and rpc.rquotad to the new world
      implement compat_50_quotactl ioctl.
      update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.

Revision 1.37.10.2 / (download) - annotate - [select for diffs], Sat May 16 10:41:54 2009 UTC (5 years, 4 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.37.10.1: +40 -10 lines
Diff to previous 1.37.10.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

sync with head

Revision 1.39.14.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:07 2009 UTC (5 years, 4 months ago) by jym
Branch: jym-xensuspend
Changes since 1.39: +40 -10 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.40 / (download) - annotate - [select for diffs], Thu May 7 19:26:09 2009 UTC (5 years, 4 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: rmind-uvmplock, jruoho-x86intr, bouyer-quota2
Changes since 1.39: +40 -10 lines
Diff to previous 1.39 (colored)

Introduce several actions/requests for authorizing file-system related
operations, specifically quota and block allocation from reserved space.

Modify ufs_quotactl() to accomodate passing "mp" earlier by vfs_busy()ing
it a little bit higher.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/26/msg004936.html

Note that the umapfs request mentioned in this thread was NOT added as
there is still on-going discussion regarding the proper implementation.

Revision 1.37.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:37 2008 UTC (6 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.37: +6 -4 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Sync with HEAD.

Revision 1.37.8.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:56 2008 UTC (6 years, 4 months ago) by yamt
Branch: yamt-pf42
Changes since 1.37: +6 -4 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

sync with head.

Revision 1.37.10.1 / (download) - annotate - [select for diffs], Fri May 16 02:26:01 2008 UTC (6 years, 4 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.37: +6 -4 lines
Diff to previous 1.37 (colored)

sync with head.

Revision 1.39 / (download) - annotate - [select for diffs], Tue May 6 18:43:45 2008 UTC (6 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base3, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, nick-hppapmap, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.38: +5 -3 lines
Diff to previous 1.38 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Apr 30 12:49:17 2008 UTC (6 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

PR kern/38135 vfs_busy/vfs_trybusy confusion

The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.

Revision 1.34.8.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:13 2008 UTC (6 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.34.8.1: +6 -5 lines
Diff to previous 1.34.8.1 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

sync with HEAD

Revision 1.34.14.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:32 2008 UTC (6 years, 7 months ago) by mjf
Branch: mjf-devfs
Changes since 1.34.14.1: +10 -9 lines
Diff to previous 1.34.14.1 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

Sync with HEAD.

Revision 1.22.8.7 / (download) - annotate - [select for diffs], Mon Feb 4 09:25:08 2008 UTC (6 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.22.8.6: +6 -5 lines
Diff to previous 1.22.8.6 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored)

sync with head.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jan 30 11:47:05 2008 UTC (6 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, mjf-devfs2
Changes since 1.36: +6 -5 lines
Diff to previous 1.36 (colored)

PR kern/37706 (forced unmount of file systems is unsafe):

- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.

Revision 1.22.8.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:48:17 2008 UTC (6 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.22.8.5: +6 -6 lines
Diff to previous 1.22.8.5 (colored) to branchpoint 1.22 (colored)

sync with head

Revision 1.34.8.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:36 2008 UTC (6 years, 8 months ago) by matt
Branch: matt-armv6
Changes since 1.34: +9 -8 lines
Diff to previous 1.34 (colored)

sync with HEAD

Revision 1.35.6.1 / (download) - annotate - [select for diffs], Tue Jan 8 22:12:06 2008 UTC (6 years, 8 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.35: +6 -6 lines
Diff to previous 1.35 (colored) next main 1.36 (colored)

Sync with HEAD

Revision 1.36 / (download) - annotate - [select for diffs], Thu Jan 3 19:28:51 2008 UTC (6 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.35: +6 -6 lines
Diff to previous 1.35 (colored)

Use pool_cache.

Revision 1.34.14.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:43 2007 UTC (6 years, 9 months ago) by mjf
Branch: mjf-devfs
Changes since 1.34: +5 -4 lines
Diff to previous 1.34 (colored)

Sync with HEAD.

Revision 1.22.8.5 / (download) - annotate - [select for diffs], Fri Dec 7 17:35:24 2007 UTC (6 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.22.8.4: +5 -4 lines
Diff to previous 1.22.8.4 (colored) to branchpoint 1.22 (colored)

sync with head

Revision 1.34.6.1 / (download) - annotate - [select for diffs], Tue Nov 27 19:39:30 2007 UTC (6 years, 9 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.34: +5 -4 lines
Diff to previous 1.34 (colored) next main 1.35 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:35 2007 UTC (6 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.34: +5 -4 lines
Diff to previous 1.34 (colored)

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

Revision 1.22.8.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:47:02 2007 UTC (7 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.22.8.3: +10 -9 lines
Diff to previous 1.22.8.3 (colored) to branchpoint 1.22 (colored)

sync with head.

Revision 1.32.6.2 / (download) - annotate - [select for diffs], Sun Jul 15 13:28:21 2007 UTC (7 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.32.6.1: +9 -8 lines
Diff to previous 1.32.6.1 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored)

Sync with head.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:52 2007 UTC (7 years, 2 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.33: +9 -8 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Sync with head.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jun 30 09:37:54 2007 UTC (7 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-base, hpcarm-cleanup, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-armv6, jmcneill-pm
Changes since 1.33: +9 -8 lines
Diff to previous 1.33 (colored)

Using POOL_INIT here makes no sense, since file systems always have
an init method.  So get rid of it and #ifdef _LKM and just always
init in the init method.  Give malloc types the same treatment.
Makes file systems nicer to work with in linksetless environments
and fixes a few LKM discrepancies.

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:17 2007 UTC (7 years, 5 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

sync with head.

Revision 1.32.6.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:52:08 2007 UTC (7 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Sync with head.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:38 2007 UTC (7 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.22.8.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:25 2007 UTC (7 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.22.8.2: +3 -3 lines
Diff to previous 1.22.8.2 (colored) to branchpoint 1.22 (colored)

sync with head.

Revision 1.28.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:25 2007 UTC (7 years, 8 months ago) by ad
Branch: newlock2
Changes since 1.28.4.1: +3 -3 lines
Diff to previous 1.28.4.1 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

Sync with head.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jan 4 16:55:30 2007 UTC (7 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, vmlocking
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.22.8.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:51:01 2006 UTC (7 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.22.8.1: +11 -8 lines
Diff to previous 1.22.8.1 (colored) to branchpoint 1.22 (colored)

sync with head.

Revision 1.28.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:33 2006 UTC (7 years, 9 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.28.6.1: +3 -3 lines
Diff to previous 1.28.6.1 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

sync with head.

Revision 1.28.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:49 2006 UTC (7 years, 10 months ago) by ad
Branch: newlock2
Changes since 1.28: +7 -2 lines
Diff to previous 1.28 (colored)

Sync with head.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:53 2006 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

__unused removal on arguments; approved by core.

Revision 1.28.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:51 2006 UTC (7 years, 11 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.28: +8 -3 lines
Diff to previous 1.28 (colored)

sync with head

Revision 1.30 / (download) - annotate - [select for diffs], Thu Oct 12 04:24:40 2006 UTC (7 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.29: +7 -2 lines
Diff to previous 1.29 (colored)

ufs_quotactl(): consume the arguments even if QUOTAS is not defined.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:52 2006 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.26.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 03:00:13 2006 UTC (8 years ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.26: +7 -7 lines
Diff to previous 1.26 (colored) next main 1.27 (colored)

sync with head

Revision 1.26.8.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:47:37 2006 UTC (8 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.26.8.1: +6 -8 lines
Diff to previous 1.26.8.1 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored)

sync with head

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:15 2006 UTC (8 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.27: +6 -8 lines
Diff to previous 1.27 (colored)

Use the LWP cached credentials where sane.

Revision 1.22.8.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:39 2006 UTC (8 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.22: +20 -54 lines
Diff to previous 1.22 (colored)

sync with head.

Revision 1.26.6.1 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:44 2006 UTC (8 years, 3 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.26: +7 -5 lines
Diff to previous 1.26 (colored) next main 1.27 (colored)

Sync with head.

Revision 1.26.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:48 2006 UTC (8 years, 3 months ago) by tron
Branch: peter-altq
Changes since 1.26: +7 -5 lines
Diff to previous 1.26 (colored) next main 1.27 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.26.8.1 / (download) - annotate - [select for diffs], Wed May 24 10:59:26 2006 UTC (8 years, 3 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.26: +7 -5 lines
Diff to previous 1.26 (colored)

sync with head.

Revision 1.27 / (download) - annotate - [select for diffs], Sun May 14 21:33:39 2006 UTC (8 years, 4 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.26: +7 -5 lines
Diff to previous 1.26 (colored)

integrate kauth.

Revision 1.26.10.3 / (download) - annotate - [select for diffs], Sat May 6 23:32:58 2006 UTC (8 years, 4 months ago) by christos
Branch: elad-kernelauth
Changes since 1.26.10.2: +3 -2 lines
Diff to previous 1.26.10.2 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.26.10.2 / (download) - annotate - [select for diffs], Fri Mar 10 14:21:11 2006 UTC (8 years, 6 months ago) by elad
Branch: elad-kernelauth
Changes since 1.26.10.1: +3 -3 lines
Diff to previous 1.26.10.1 (colored) to branchpoint 1.26 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.26.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 01:39:12 2006 UTC (8 years, 6 months ago) by elad
Branch: elad-kernelauth
Changes since 1.26: +6 -5 lines
Diff to previous 1.26 (colored)

Adapt to kernel authorization KPI.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:28 2005 UTC (8 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.25: +8 -6 lines
Diff to previous 1.25 (colored)

merge ktrace-lwp.

Revision 1.17.2.9 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:39 2005 UTC (8 years, 10 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.8: +11 -49 lines
Diff to previous 1.17.2.8 (colored) next main 1.18 (colored)

Sync with HEAD. Here we go again...

Revision 1.25 / (download) - annotate - [select for diffs], Fri Sep 23 12:10:34 2005 UTC (8 years, 11 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.24: +2 -25 lines
Diff to previous 1.24 (colored)

Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 10 01:08:52 2005 UTC (9 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.23: +3 -2 lines
Diff to previous 1.23 (colored)

Defflag UFS_DIRHASH.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jul 10 00:18:52 2005 UTC (9 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.22: +12 -28 lines
Diff to previous 1.22 (colored)

- Use ANSI function decls.
- Sprinkle some static.

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:40 2005 UTC (9 years, 4 months ago) by kent
Branch: kent-audio2
Changes since 1.21: +11 -2 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

sync with -current

Revision 1.17.2.8 / (download) - annotate - [select for diffs], Mon Jan 24 08:36:05 2005 UTC (9 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.7: +11 -2 lines
Diff to previous 1.17.2.7 (colored)

Sync with HEAD.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jan 23 19:37:05 2005 UTC (9 years, 7 months ago) by rumble
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, matt-timespec, kent-audio2-base
Branch point for: yamt-lazymbuf
Changes since 1.21: +11 -2 lines
Diff to previous 1.21 (colored)

Bring in Ian Dowse's Dirhash from FreeBSD. Hash tables of
directories are created on the fly and used to increase
performance by circumventing ufs_lookup's linear search.

Dirhash is enabled by the UFS_DIRHASH option, but not
by default.

Revision 1.17.2.7 / (download) - annotate - [select for diffs], Mon Jan 17 19:33:11 2005 UTC (9 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.6: +5 -3 lines
Diff to previous 1.17.2.6 (colored)

Sync with HEAD.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Dec 20 03:12:20 2004 UTC (9 years, 9 months ago) by dbj
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Branch point for: kent-audio2
Changes since 1.20: +5 -3 lines
Diff to previous 1.20 (colored)

use #if defined(_KERNEL_OPT) around opt includes
fix arg to pool_init() when _LKM is defined

Revision 1.17.2.6 / (download) - annotate - [select for diffs], Wed Oct 27 06:24:01 2004 UTC (9 years, 10 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.5: +3 -3 lines
Diff to previous 1.17.2.5 (colored)

Remove the struct lwp * arguments from qsync and ufs_checkpath that are
no longer (read: were never) required.

Revision 1.17.2.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:39:23 2004 UTC (10 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.4: +11 -9 lines
Diff to previous 1.17.2.4 (colored)

Fix the sync with head I botched.

Revision 1.17.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:56:59 2004 UTC (10 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.3: +9 -11 lines
Diff to previous 1.17.2.3 (colored)

Sync with HEAD.

Revision 1.17.2.3 / (download) - annotate - [select for diffs], Tue Aug 24 17:57:56 2004 UTC (10 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.2: +6 -8 lines
Diff to previous 1.17.2.2 (colored)

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.

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:57:01 2004 UTC (10 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.17.2.1: +15 -8 lines
Diff to previous 1.17.2.1 (colored)

Sync with HEAD

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 20 18:25:54 2004 UTC (10 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.19: +13 -2 lines
Diff to previous 1.19 (colored)

Use a pool for struct direct instead of kernel stack.
Reduces the kernel stack usage by 264 bytes.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>

Revision 1.19 / (download) - annotate - [select for diffs], Tue Apr 27 17:37:31 2004 UTC (10 years, 4 months ago) by jrf
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

First pass for some caddr_t removal and changes to get rid of it where we
no longer use and/or need it

	- removed casts from unionfs, deadfs and fdesc
	  (there are more to hunt down still)
	- changed vfs_quotactl args argumet from caddr_t to void *
	- changed vfs_quotactl structures/callers to reflect the api change

Compiled fine and ran for about a day. Approved/reviewed by
christos@netbsd.org and gimpy@netbsd.org.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:47 2003 UTC (11 years, 1 month ago) by agc
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.17: +3 -7 lines
Diff to previous 1.17 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:28 2003 UTC (11 years, 2 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.17: +17 -13 lines
Diff to previous 1.17 (colored)

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.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:48 2003 UTC (11 years, 2 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.16: +9 -11 lines
Diff to previous 1.16 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:48 2003 UTC (11 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.15: +6 -8 lines
Diff to previous 1.15 (colored)

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.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:29 2003 UTC (11 years, 2 months ago) by darrenr
Branch: MAIN
Changes since 1.14: +17 -13 lines
Diff to previous 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Wed Apr 2 10:39:45 2003 UTC (11 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.

Revision 1.13.12.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:28 2002 UTC (11 years, 9 months ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Merge pcred and ucred, and poolify.  TBD: check backward compatibility
and factor-out some higher-level functionality.

Revision 1.11.10.1 / (download) - annotate - [select for diffs], Thu Jan 10 20:05:25 2002 UTC (12 years, 8 months ago) by thorpej
Branch: kqueue
Changes since 1.11: +13 -1 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Sync kqueue branch with -current.

Revision 1.11.6.2 / (download) - annotate - [select for diffs], Wed Nov 14 19:19:02 2001 UTC (12 years, 10 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.11.6.1: +4 -1 lines
Diff to previous 1.11.6.1 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Catch up to -current.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:51 2001 UTC (12 years, 10 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.12: +4 -1 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Nov 8 02:39:17 2001 UTC (12 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, ifpoll-base, ifpoll, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, fvdl_fs64_base, eeh-devprop-base, eeh-devprop
Branch point for: gmcgarry_ucred
Changes since 1.12: +4 -1 lines
Diff to previous 1.12 (colored)

add RCSID

Revision 1.11.12.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:48:34 2001 UTC (12 years, 11 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.11: +10 -1 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Catch up with -current.

Revision 1.11.6.1 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:09 2001 UTC (13 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.11: +10 -1 lines
Diff to previous 1.11 (colored)

Catch up to -current.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Sep 15 16:13:07 2001 UTC (13 years ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.11: +10 -1 lines
Diff to previous 1.11 (colored)

add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.

Revision 1.9.8.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:11:55 2000 UTC (13 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.9: +26 -11 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.11 / (download) - annotate - [select for diffs], Thu Mar 30 12:41:15 2000 UTC (14 years, 5 months ago) by augustss
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base, perseant-lfsv2-base, perseant-lfsv2, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: thorpej-devvp, nathanw_sa, kqueue
Changes since 1.10: +6 -6 lines
Diff to previous 1.10 (colored)

Remove register declarations.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 16 18:26:49 2000 UTC (14 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.9: +21 -6 lines
Diff to previous 1.9 (colored)

Change ufs_init() to keep global count of how many times it was called.
Resources are initialized still just once (on first call).

Add ufs_done(), which takes care of freeing all resources allocated in
ufs_init(). The resources are freed only when last user of the code exits.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Feb 26 23:44:50 1999 UTC (15 years, 6 months ago) by wrstuden
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase, chs-ubc2-base, chs-ubc2
Branch point for: thorpej_scsipi
Changes since 1.8: +23 -14 lines
Diff to previous 1.8 (colored)

Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Aug 9 03:16:23 1998 UTC (16 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

minr KNF nit ..

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jun 8 04:27:52 1998 UTC (16 years, 3 months ago) by scottr
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.6: +3 -1 lines
Diff to previous 1.6 (colored)

Use the newly-defined opt_quota.h.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Mar 1 02:23:37 1998 UTC (16 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.5: +35 -16 lines
Diff to previous 1.5 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:14:09 1998 UTC (16 years, 6 months ago) by fvdl
Branch: netbsd, CSRG
CVS Tags: lite-2
Changes since 1.1.1.1: +39 -22 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:10:52 1998 UTC (16 years, 6 months ago) by fvdl
Branch: netbsd, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1: +6 -2 lines
Diff to previous 1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 11 10:10:17 1997 UTC (17 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Add support for ext2fs, this needed a few modifications to ufs/ufs/inode.h:
- added an "union inode_ext" to struct inode, for the per-fs extentions.
  For now only ext2fs uses it.
- i_din is now an union:
	union {
		struct  dinode ffs_din; /* 128 bytes of the on-disk dinode. */
		struct ext2fs_dinode e2fs_din; /* 128 bytes of the on-disk dinode. */
	} i_din
  Added a lot of #define i_ffs_* and i_e2fs_* to access the fields.
- Added two macros: FFS_ITIMES and EXT2FS_ITIMES. ITIMES calls the rigth
  macro, depending on the time of the inode. ITIMES is used where necessary,
  FFS_ITIMES and EXT2FS_ITIMES in other places.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Feb 9 22:36:12 1996 UTC (18 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-setroot, netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.3: +6 -5 lines
Diff to previous 1.3 (colored)

ufs prototype changes

Revision 1.3 / (download) - annotate - [select for diffs], Wed May 10 18:00:45 1995 UTC (19 years, 4 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

from Mike Karels:
allow Q_SYNC regardless of "target" uid, we allow it with -1;
fix bug that caused all ops to refer to user quotas, not group.
[finally had a chance to check this!]

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 29 06:47:33 1994 UTC (20 years, 2 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jun 8 11:43:23 1994 UTC (20 years, 3 months ago) by mycroft
Branch: MAIN

Update to 4.4-Lite fs code, with local changes.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>