The NetBSD Project

CVS log for src/sys/ufs/ffs/ffs_vfsops.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.353.4.3 / (download) - annotate - [select for diffs], Tue Nov 28 13:13:29 2023 UTC (4 months, 3 weeks ago) by martin
Branch: netbsd-8
Changes since 1.353.4.2: +21 -10 lines
Diff to previous 1.353.4.2 (colored) to branchpoint 1.353 (colored) next main 1.354 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1921):

	sys/ufs/ffs/ffs_vfsops.c: revision 1.382

ffs_sync: Avoid unlocked access to v_numoutput/v_dirtyblkhd.

Found by lockdoc.

PR kern/57606

Revision 1.362.2.1 / (download) - annotate - [select for diffs], Tue Nov 28 13:11:37 2023 UTC (4 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.362: +21 -10 lines
Diff to previous 1.362 (colored) next main 1.363 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1770):

	sys/ufs/ffs/ffs_vfsops.c: revision 1.382

ffs_sync: Avoid unlocked access to v_numoutput/v_dirtyblkhd.

Found by lockdoc.

PR kern/57606

Revision 1.378.2.3 / (download) - annotate - [select for diffs], Wed Oct 18 15:10:41 2023 UTC (6 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.378.2.2: +21 -10 lines
Diff to previous 1.378.2.2 (colored) to branchpoint 1.378 (colored) next main 1.379 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by riastradh in ticket #424):

	sys/ufs/ffs/ffs_vfsops.c: revision 1.382

ffs_sync: Avoid unlocked access to v_numoutput/v_dirtyblkhd.

Found by lockdoc.
PR kern/57606

Revision 1.382 / (download) - annotate - [select for diffs], Fri Sep 8 23:21:55 2023 UTC (7 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.381: +21 -10 lines
Diff to previous 1.381 (colored) to selected 1.239.2.4 (colored)

ffs_sync: Avoid unlocked access to v_numoutput/v_dirtyblkhd.

Found by lockdoc.

PR kern/57606

Revision 1.378.2.2 / (download) - annotate - [select for diffs], Wed Jun 21 16:55:02 2023 UTC (9 months, 4 weeks ago) by martin
Branch: netbsd-10
Changes since 1.378.2.1: +2 -6 lines
Diff to previous 1.378.2.1 (colored) to branchpoint 1.378 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by hannken in ticket #197):

	sys/ufs/ffs/ffs_vfsops.c: revision 1.381
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.412

Undo unlock/relock for VOP_IOCTL().
PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)

Revision 1.381 / (download) - annotate - [select for diffs], Thu Jun 15 09:15:54 2023 UTC (10 months ago) by hannken
Branch: MAIN
Changes since 1.380: +2 -6 lines
Diff to previous 1.380 (colored) to selected 1.239.2.4 (colored)

Undo unlock/relock for VOP_IOCTL().

PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)

Revision 1.380 / (download) - annotate - [select for diffs], Mon Jun 5 04:59:46 2023 UTC (10 months, 2 weeks ago) by rin
Branch: MAIN
Changes since 1.379: +8 -6 lines
Diff to previous 1.379 (colored) to selected 1.239.2.4 (colored)

Make DEBUG_FFS_MOUNT compile again (with 64-bit ino_t).

Revision 1.378.2.1 / (download) - annotate - [select for diffs], Wed Dec 21 19:54:13 2022 UTC (15 months, 4 weeks ago) by martin
Branch: netbsd-10
Changes since 1.378: +45 -30 lines
Diff to previous 1.378 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by chs in ticket #17):

	sys/ufs/ffs/ffs_vfsops.c: revision 1.379

ffs: fail mounts requesting ACLs for non-ea UFS2 file systems

For non-ea UFS2 file system, fail mounts that request ACLs rather than
letting the mount succeed only to reject all ACL operations later.

Also fix the messages about the on-disk fs flags conflicting with
the mount options for which type of ACLs to use, and about requesting
both types of ACLs.

Revision 1.379 / (download) - annotate - [select for diffs], Wed Dec 21 18:58:25 2022 UTC (15 months, 4 weeks ago) by chs
Branch: MAIN
Changes since 1.378: +45 -30 lines
Diff to previous 1.378 (colored) to selected 1.239.2.4 (colored)

ffs: fail mounts requesting ACLs for non-ea UFS2 file systems

For non-ea UFS2 file system, fail mounts that request ACLs rather than
letting the mount succeed only to reject all ACL operations later.

Also fix the messages about the on-disk fs flags conflicting with
the mount options for which type of ACLs to use, and about requesting
both types of ACLs.

Revision 1.378 / (download) - annotate - [select for diffs], Thu Nov 17 06:40:40 2022 UTC (17 months ago) by chs
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.377: +23 -2 lines
Diff to previous 1.377 (colored) to selected 1.239.2.4 (colored)

Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new	fsck_ffs operations "-c	ea" and	"-c no-ea" to convert file systems
from UFS2 to UFS2ea and	vice-versa (both of which delete all existing extended
attributes in the process).

Revision 1.377 / (download) - annotate - [select for diffs], Thu Nov 10 10:53:29 2022 UTC (17 months, 1 week ago) by hannken
Branch: MAIN
Changes since 1.376: +19 -14 lines
Diff to previous 1.376 (colored) to selected 1.239.2.4 (colored)

Some changes to "fs->fs_fmod" and "fs->fs_clean":
- clear "fs->fs_fmod" after reading the super block.
- assert we don't write a super block when mounted read-only.
- make sure "fs->fs_clean" is one of FS_ISCLEAN or FS_WASCLEAN.
- print "file system not clean" on every mount.

Should fix PR kern/57010: ffs: mounting unclean non-root fs read-only
causes spurious write to superblock

Revision 1.376 / (download) - annotate - [select for diffs], Sat Apr 16 08:00:55 2022 UTC (2 years ago) by hannken
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.375: +6 -2 lines
Diff to previous 1.375 (colored) to selected 1.239.2.4 (colored)

Unlock vnode for VOP_IOCTL() and wapbl_flush().

Revision 1.375 / (download) - annotate - [select for diffs], Sat Mar 19 13:53:33 2022 UTC (2 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.374: +2 -3 lines
Diff to previous 1.374 (colored) to selected 1.239.2.4 (colored)

Remove now unused VV_LOCKSWORK, all file systems support locking.

Remove unused predicates vn_locked() and vn_anylocked().

Welcome to 9.99.95

Revision 1.374 / (download) - annotate - [select for diffs], Sat Mar 12 15:36:53 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.373: +3 -3 lines
Diff to previous 1.373 (colored) to selected 1.239.2.4 (colored)

ffs: Fix 64-bit inode integer truncation.

Reported-by: syzbot+1ae93e092d532582b809@syzkaller.appspotmail.com

Revision 1.373 / (download) - annotate - [select for diffs], Sat Sep 18 03:05:20 2021 UTC (2 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.372: +9 -9 lines
Diff to previous 1.372 (colored) to selected 1.239.2.4 (colored)

Change the default for ACLs to be posix1e instead of nfsv4 to match FreeBSD.
Requested by chuq.

Revision 1.372 / (download) - annotate - [select for diffs], Thu Aug 20 20:28:13 2020 UTC (3 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.371: +4 -4 lines
Diff to previous 1.371 (colored) to selected 1.239.2.4 (colored)

Don't cache id's for vnodes that have ACLs. ok chs@

Revision 1.371 / (download) - annotate - [select for diffs], Sun Jul 5 20:37:40 2020 UTC (3 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.370: +7 -10 lines
Diff to previous 1.370 (colored) to selected 1.239.2.4 (colored)

simplify the acl setup, and fix reversed mask in the fs_flags code.

Revision 1.370 / (download) - annotate - [select for diffs], Mon May 18 08:28:44 2020 UTC (3 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.369: +8 -2 lines
Diff to previous 1.369 (colored) to selected 1.239.2.4 (colored)

Assert ufs_strategy() always gets used while current thread
holds a fstrans lock.

Revision 1.369 / (download) - annotate - [select for diffs], Sat May 16 18:31:53 2020 UTC (3 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.368: +54 -2 lines
Diff to previous 1.368 (colored) to selected 1.239.2.4 (colored)

Add ACL support for FFS. From FreeBSD.

Revision 1.368 / (download) - annotate - [select for diffs], Tue May 12 23:17:41 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.367: +4 -4 lines
Diff to previous 1.367 (colored) to selected 1.239.2.4 (colored)

cache_enter_id(): give it a boolean parameter to indicate whether the cached
identity is valid.

Revision 1.357.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:21 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.357.2.2: +2 -2 lines
Diff to previous 1.357.2.2 (colored) to branchpoint 1.357 (colored) next main 1.358 (colored) to selected 1.239.2.4 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.357.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:03 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.357.2.1: +67 -63 lines
Diff to previous 1.357.2.1 (colored) to branchpoint 1.357 (colored) to selected 1.239.2.4 (colored)

Merge changes from current as of 20200406

Revision 1.367 / (download) - annotate - [select for diffs], Sat Apr 4 20:49:31 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.366: +6 -3 lines
Diff to previous 1.366 (colored) to selected 1.239.2.4 (colored)

Merge the remaining changes from the ad-namecache branch, affecting namei()
and getcwd():

- push vnode locking back as far as possible.
- do most lookups directly in the namecache, avoiding vnode locks & refs.
- don't block new refs to vnodes across VOP_INACTIVE().
- get shared locks for VOP_LOOKUP() if the file system supports it.
- correct lock types for VOP_ACCESS() / VOP_GETATTR() in a few places.

Possible future enhancements:

- make the lookups lockless.
- support dotdot lookups by being lockless and inferring absence of chroot.
- maybe make it work for layered file systems.
- avoid vnode references at the root & cwd.

Revision 1.366 / (download) - annotate - [select for diffs], Mon Mar 16 21:20:12 2020 UTC (4 years, 1 month ago) by pgoyette
Branch: MAIN
Changes since 1.365: +59 -58 lines
Diff to previous 1.365 (colored) to selected 1.239.2.4 (colored)

Use the module subsystem's ability to process SYSCTL_SETUP() entries to
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.

Revision 1.362.4.5 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:11 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.362.4.4: +4 -4 lines
Diff to previous 1.362.4.4 (colored) to branchpoint 1.362 (colored) next main 1.363 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.365 / (download) - annotate - [select for diffs], Thu Feb 27 22:12:54 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.364: +3 -3 lines
Diff to previous 1.364 (colored) to selected 1.239.2.4 (colored)

Tighten up the locking around vp->v_iflag a little more after the recent
split of vmobjlock & v_interlock.

Revision 1.364 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:42 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.363: +3 -3 lines
Diff to previous 1.363 (colored) to selected 1.239.2.4 (colored)

UVM locking changes, proposed on tech-kern:

- 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.

Revision 1.362.4.4 / (download) - annotate - [select for diffs], Fri Jan 24 16:48:59 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.362.4.3: +6 -5 lines
Diff to previous 1.362.4.3 (colored) to branchpoint 1.362 (colored) to selected 1.239.2.4 (colored)

- Put all the namecache stuff back into vnode_impl_t.
- Tidy vfs_cache.c up, finish the comments.
- Finalise how ID information is entered to the cache.
- Handle very small/old systems.

Revision 1.362.4.3 / (download) - annotate - [select for diffs], Sun Jan 19 21:21:55 2020 UTC (4 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.362.4.2: +3 -3 lines
Diff to previous 1.362.4.2 (colored) to branchpoint 1.362 (colored) to selected 1.239.2.4 (colored)

Set IMNT_SHRLOOKUP and use it for the in-cache case.  Need to check what
more can be done with tmpfs though, it can probably do the whole lookup.

Revision 1.362.4.2 / (download) - annotate - [select for diffs], Fri Jan 17 22:26:26 2020 UTC (4 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.362.4.1: +4 -2 lines
Diff to previous 1.362.4.1 (colored) to branchpoint 1.362 (colored) to selected 1.239.2.4 (colored)

vfs_lookup:

- Do the easy component name lookups directly in the namecache without
  taking vnode locks nor vnode references (between the start and the leaf /
  parent), which seems to largely solve the lock contention problem with
  namei().  It needs support from the file system, which has to tell the
  name cache about directory permissions (only ffs and tmpfs tried so far),
  and I'm not sure how or if it can work with layered file systems yet.
  Work in progress.

vfs_cache:

- Make the rbtree operations more efficient: inline the lookup, and key on a
  64-bit hash value (32 bits plus 16 bits length) rather than names.

- Take namecache stuff out of vnode_impl, and take the rwlocks, and put them
  all together an an nchnode struct which is mapped 1:1: with vnodes.  Saves
  memory and nicer cache profile.

- Add a routine to help vfs_lookup do its easy component name lookups.

- Report some more stats.

- Tidy up the file a bit.

Revision 1.362.4.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:37 2020 UTC (4 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.362: +4 -4 lines
Diff to previous 1.362 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.363 / (download) - annotate - [select for diffs], Fri Jan 17 20:08:10 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.362: +4 -4 lines
Diff to previous 1.362 (colored) to selected 1.239.2.4 (colored)

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.

Revision 1.362 / (download) - annotate - [select for diffs], Thu Jun 20 03:31:30 2019 UTC (4 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20191119, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, ad-namecache-base
Branch point for: netbsd-9, ad-namecache
Changes since 1.361: +4 -4 lines
Diff to previous 1.361 (colored) to selected 1.239.2.4 (colored)

Split the ufs code out of the ffs module and into its own module.

Adapt chfs and ext2fs modules accordingly.

Revision 1.357.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:57 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.357: +5 -6 lines
Diff to previous 1.357 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.356.2.4 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:59 2019 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.356.2.3: +3 -3 lines
Diff to previous 1.356.2.3 (colored) to branchpoint 1.356 (colored) next main 1.357 (colored) to selected 1.239.2.4 (colored)

Synch with HEAD

Revision 1.361 / (download) - annotate - [select for diffs], Tue Jan 1 10:06:55 2019 UTC (5 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, isaki-audio2-base, isaki-audio2
Changes since 1.360: +3 -3 lines
Diff to previous 1.360 (colored) to selected 1.239.2.4 (colored)

Add "void *extra" argument to vcache_new() so a file system may
pass more information about the file to create.

Welcome to 8.99.30

Revision 1.356.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:08 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.356.2.2: +3 -4 lines
Diff to previous 1.356.2.2 (colored) to branchpoint 1.356 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.360 / (download) - annotate - [select for diffs], Mon Dec 10 19:29:41 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-1226
Changes since 1.359: +3 -3 lines
Diff to previous 1.359 (colored) to selected 1.239.2.4 (colored)

make UFS_WAPBL_JLOCK_ASSERT() #ifdef DIAGNOSTIC, same as the underlying
function KASSERT(), so that it actually does something; fix code using
it to actually pass correct params, so that it compiles

remove UFS_WAPBL_JUNLOCK_ASSERT(), as that is inherently racy (it's
okay on those places if the rwlock is held by other lwp); depend
on the RW_ASSERT()/LOCKDEBUG inside rw_enter() to catch the case
with wapbl rwlock held by current lwp

Revision 1.359 / (download) - annotate - [select for diffs], Mon Dec 10 14:46:24 2018 UTC (5 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.358: +2 -3 lines
Diff to previous 1.358 (colored) to selected 1.239.2.4 (colored)

Remove unused mbuf.h includes.

Revision 1.356.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:12 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.356.2.1: +3 -3 lines
Diff to previous 1.356.2.1 (colored) to branchpoint 1.356 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.358 / (download) - annotate - [select for diffs], Wed Jul 18 22:40:56 2018 UTC (5 years, 9 months ago) by uwe
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.357: +3 -3 lines
Diff to previous 1.357 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate - check fs_old_size too.

Now I can mount OpenWindows Version 3 CD from 1991.

Revision 1.356.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:08 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.356: +3 -2 lines
Diff to previous 1.356 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.357 / (download) - annotate - [select for diffs], Mon May 28 21:04:38 2018 UTC (5 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.356: +3 -2 lines
Diff to previous 1.356 (colored) to selected 1.239.2.4 (colored)

add a genfs method to allow a file system to limit the range of pages
that are given to a single GOP_WRITE() call.  needed by ZFS.

Revision 1.353.4.2 / (download) - annotate - [select for diffs], Wed Apr 11 14:49:08 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.353.4.1: +56 -62 lines
Diff to previous 1.353.4.1 (colored) to branchpoint 1.353 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by christos in ticket #738):

	sys/ufs/ffs/ffs_vfsops.c: revision 1.355

PR/52728: Izumi Tsutsui: "mount -u /dev/ /" triggers kernel panic

Simplify the control flow of the mount code and make sure that the
mountfrom argument can be converted to a block device in the update
case.

Revision 1.353.4.1 / (download) - annotate - [select for diffs], Sun Feb 4 12:52:02 2018 UTC (6 years, 2 months ago) by martin
Branch: netbsd-8
Changes since 1.353: +5 -5 lines
Diff to previous 1.353 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by christos in ticket #523):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.356
	sys/ufs/ufs/ufs_inode.c: revision 1.103
Make sure inode blocks and size are zero when VOP_INACTIVE()
finalises a now unlinked inode.
Counterpart of the check in ffs_newvnode().
Prevent use-after-free where genfs_node_destroy() would destroy
a lock residing in the just freed inode data.

Revision 1.356 / (download) - annotate - [select for diffs], Sun Jan 28 10:02:00 2018 UTC (6 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.355: +5 -5 lines
Diff to previous 1.355 (colored) to selected 1.239.2.4 (colored)

Prevent use-after-free where genfs_node_destroy() would destroy
a lock residing in the just freed inode data.

Revision 1.278.2.7 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:21 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.278.2.6: +686 -326 lines
Diff to previous 1.278.2.6 (colored) next main 1.279 (colored) to selected 1.239.2.4 (colored)

update from HEAD

Revision 1.355 / (download) - annotate - [select for diffs], Wed Nov 15 21:21:18 2017 UTC (6 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.354: +56 -62 lines
Diff to previous 1.354 (colored) to selected 1.239.2.4 (colored)

PR/52728: Izumi Tsutsui: "mount -u /dev/ /" triggers kernel panic
Simplify the control flow of the mount code and make sure that the
mountfrom argument can be converted to a block device in the update
case.
XXX: pullup-8

Revision 1.302.2.9 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:17 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.8: +26 -69 lines
Diff to previous 1.302.2.8 (colored) to branchpoint 1.302 (colored) next main 1.303 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.354 / (download) - annotate - [select for diffs], Sun Aug 20 12:51:38 2017 UTC (6 years, 8 months ago) by maya
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.353: +3 -3 lines
Diff to previous 1.353 (colored) to selected 1.239.2.4 (colored)

print mode as octal for readability

Revision 1.353.2.1 / (download) - annotate - [select for diffs], Thu Apr 27 05:36:38 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.353: +16 -10 lines
Diff to previous 1.353 (colored) next main 1.354 (colored) to selected 1.239.2.4 (colored)

Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita.  There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.

Revision 1.339.2.7 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:31 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.339.2.6: +7 -5 lines
Diff to previous 1.339.2.6 (colored) to branchpoint 1.339 (colored) next main 1.340 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.342.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:08 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.342: +25 -68 lines
Diff to previous 1.342 (colored) next main 1.343 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.353 / (download) - annotate - [select for diffs], Mon Apr 17 08:32:01 2017 UTC (7 years ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: prg-localcount2, netbsd-8
Changes since 1.352: +4 -4 lines
Diff to previous 1.352 (colored) to selected 1.239.2.4 (colored)

Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.

Revision 1.352 / (download) - annotate - [select for diffs], Mon Apr 17 08:31:02 2017 UTC (7 years ago) by hannken
Branch: MAIN
Changes since 1.351: +3 -3 lines
Diff to previous 1.351 (colored) to selected 1.239.2.4 (colored)

Add vfs_ref(mp) and vfs_rele(mp) to add or remove a reference to
struct mount.  Rename vfs_destroy(mp) to vfs_rele(mp) and replace
incrementing mp->mnt_refcnt with vfs_ref(mp).

Revision 1.351 / (download) - annotate - [select for diffs], Sat Apr 1 19:35:56 2017 UTC (7 years ago) by riastradh
Branch: MAIN
CVS Tags: jdolecek-ncq-base, jdolecek-ncq
Changes since 1.350: +4 -2 lines
Diff to previous 1.350 (colored) to selected 1.239.2.4 (colored)

KASSERT(mutex_owned(vp->v_interlock)) in vnode iterator selector.

Revision 1.339.2.6 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:54 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.339.2.5: +20 -65 lines
Diff to previous 1.339.2.5 (colored) to branchpoint 1.339 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.350 / (download) - annotate - [select for diffs], Fri Mar 10 20:38:28 2017 UTC (7 years, 1 month ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.349: +13 -10 lines
Diff to previous 1.349 (colored) to selected 1.239.2.4 (colored)

slightly rearrange the code for IMNT_WANTRDONLY + MNT_UPDATE case for
better readability, no functional change

Revision 1.349 / (download) - annotate - [select for diffs], Mon Mar 6 10:12:00 2017 UTC (7 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.348: +4 -3 lines
Diff to previous 1.348 (colored) to selected 1.239.2.4 (colored)

Adapt the test "enable WAPBL on rw mounts only" to the recent change of
the protocol to update a mounted file.

Should fix PR kern/52031 (FFS mount update doesn't play nice with WAPBL)

Revision 1.348 / (download) - annotate - [select for diffs], Wed Mar 1 10:46:43 2017 UTC (7 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.347: +5 -5 lines
Diff to previous 1.347 (colored) to selected 1.239.2.4 (colored)

Bring back read-write to read-only mount update for ffs.

Revision 1.347 / (download) - annotate - [select for diffs], Wed Mar 1 10:42:45 2017 UTC (7 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.346: +2 -12 lines
Diff to previous 1.346 (colored) to selected 1.239.2.4 (colored)

Remove now redundant calls to fstrans_start()/fstrans_done().

Revision 1.346 / (download) - annotate - [select for diffs], Wed Feb 22 09:50:13 2017 UTC (7 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.345: +2 -10 lines
Diff to previous 1.345 (colored) to selected 1.239.2.4 (colored)

Enable fstrans on all file systems.

Welcome to 7.99.61

Revision 1.345 / (download) - annotate - [select for diffs], Fri Feb 17 08:31:26 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.344: +3 -27 lines
Diff to previous 1.344 (colored) to selected 1.239.2.4 (colored)

Add generic genfs_suspendctl() and use it for all file systems.
Layered file systems need work.

Revision 1.344 / (download) - annotate - [select for diffs], Fri Feb 17 08:29:11 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.343: +3 -10 lines
Diff to previous 1.343 (colored) to selected 1.239.2.4 (colored)

Untangle VFS_SYNC() from VFS_SUSPENDCTL().

Revision 1.343 / (download) - annotate - [select for diffs], Fri Feb 17 08:26:41 2017 UTC (7 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.342: +3 -3 lines
Diff to previous 1.342 (colored) to selected 1.239.2.4 (colored)

Flush the log to disk when ffs_sync() gets called with MNT_WAIT.

Revision 1.302.2.8 / (download) - annotate - [select for diffs], Sun Feb 5 13:41:01 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.7: +4 -3 lines
Diff to previous 1.302.2.7 (colored) to branchpoint 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.339.2.5 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:53 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.339.2.4: +4 -3 lines
Diff to previous 1.339.2.4 (colored) to branchpoint 1.339 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.342 / (download) - annotate - [select for diffs], Tue Dec 27 10:54:38 2016 UTC (7 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.341: +4 -3 lines
Diff to previous 1.341 (colored) to selected 1.239.2.4 (colored)

Fix a bug introduced with Rev. 1.294:  use LK_NOWAIT when called with MNT_LAZY.

Revision 1.302.2.7 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:30 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.6: +4 -2 lines
Diff to previous 1.302.2.6 (colored) to branchpoint 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.339.2.4 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:22 2016 UTC (7 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.339.2.3: +4 -2 lines
Diff to previous 1.339.2.3 (colored) to branchpoint 1.339 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.341 / (download) - annotate - [select for diffs], Thu Oct 20 19:31:32 2016 UTC (7 years, 6 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204
Changes since 1.340: +4 -2 lines
Diff to previous 1.340 (colored) to selected 1.239.2.4 (colored)

add assertion to ensure ffs_cgupdate() is always called from
within a WAPBL transaction (if logging is on)

Revision 1.302.2.6 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:12 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.5: +7 -5 lines
Diff to previous 1.302.2.5 (colored) to branchpoint 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.299.2.3.2.1 / (download) - annotate - [select for diffs], Sat Aug 27 15:18:05 2016 UTC (7 years, 7 months ago) by bouyer
Branch: netbsd-7-0
CVS Tags: netbsd-7-0-2-RELEASE
Changes since 1.299.2.3: +6 -4 lines
Diff to previous 1.299.2.3 (colored) next main 1.299.2.4 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by martin in ticket #1210):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.340
	usr.sbin/quot/quot.c: revision 1.34
	sbin/fsdb/fsdb.c: revision 1.49
From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.

Revision 1.299.2.4 / (download) - annotate - [select for diffs], Sat Aug 27 15:17:34 2016 UTC (7 years, 7 months ago) by bouyer
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.299.2.3: +6 -4 lines
Diff to previous 1.299.2.3 (colored) to branchpoint 1.299 (colored) next main 1.300 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by martin in ticket #1210):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.340
	usr.sbin/quot/quot.c: revision 1.34
	sbin/fsdb/fsdb.c: revision 1.49
From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.

Revision 1.275.2.2.4.2 / (download) - annotate - [select for diffs], Sat Aug 27 14:41:48 2016 UTC (7 years, 7 months ago) by bouyer
Branch: netbsd-6-1
Changes since 1.275.2.2.4.1: +6 -4 lines
Diff to previous 1.275.2.2.4.1 (colored) to branchpoint 1.275.2.2 (colored) next main 1.275.2.3 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by martin in ticket #1395):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.340
	usr.sbin/quot/quot.c: revision 1.34
	sbin/fsdb/fsdb.c: revision 1.49
From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.

Revision 1.275.2.2.2.2 / (download) - annotate - [select for diffs], Sat Aug 27 14:41:00 2016 UTC (7 years, 7 months ago) by bouyer
Branch: netbsd-6-0
Changes since 1.275.2.2.2.1: +6 -4 lines
Diff to previous 1.275.2.2.2.1 (colored) to branchpoint 1.275.2.2 (colored) next main 1.275.2.3 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by martin in ticket #1395):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.340
	usr.sbin/quot/quot.c: revision 1.34
	sbin/fsdb/fsdb.c: revision 1.49
From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.

Revision 1.275.2.5 / (download) - annotate - [select for diffs], Sat Aug 27 14:40:35 2016 UTC (7 years, 7 months ago) by bouyer
Branch: netbsd-6
Changes since 1.275.2.4: +6 -4 lines
Diff to previous 1.275.2.4 (colored) to branchpoint 1.275 (colored) next main 1.276 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by martin in ticket #1395):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.340
	usr.sbin/quot/quot.c: revision 1.34
	sbin/fsdb/fsdb.c: revision 1.49
From Michael Plass:
The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.
Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.

Revision 1.339.2.3 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:11 2016 UTC (7 years, 8 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.339.2.2: +6 -4 lines
Diff to previous 1.339.2.2 (colored) to branchpoint 1.339 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.340 / (download) - annotate - [select for diffs], Thu Jul 28 08:24:58 2016 UTC (7 years, 8 months ago) by martin
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806, nick-nhusb-base-20161004, localcount-20160914
Changes since 1.339: +6 -4 lines
Diff to previous 1.339 (colored) to selected 1.239.2.4 (colored)

From Michael Plass:

The superblock field that distinguishes between 4.2BSD and 4.4BSD
inodes is really only relevant on a UFS1 file system. Make sure that
it is a UFS1 fs before using fs_old_inodefmt.

Note that the NetBSD newfs and mkfs utilities initialize fs_old_inodefmt
even for UFS2, so problems were apparent only on file systems created
by other operating systems, for example, FreeBSD.

Revision 1.339.2.2 / (download) - annotate - [select for diffs], Thu Jul 21 10:37:09 2016 UTC (7 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.339.2.1: +9 -6 lines
Diff to previous 1.339.2.1 (colored) to branchpoint 1.339 (colored) to selected 1.239.2.4 (colored)

Actually save the bdev value when it is retrieved, so we can use it
later in a call to bdevsw_release().

Revision 1.339.2.1 / (download) - annotate - [select for diffs], Wed Jul 20 23:47:57 2016 UTC (7 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.339: +10 -7 lines
Diff to previous 1.339 (colored) to selected 1.239.2.4 (colored)

Adapt machine-independant code to the new {b,c}devsw reference-counting
(using localcount(9)).  All callers of {b,c}devsw_lookup() now call
{b,c}devsw_lookup_acquire() which retains a reference on the 'struct
{b,c}devsw'.  This reference must be released by the caller once it is
finished with the structure's content (or other data that would disappear
if the 'struct {b,c}devsw' were to disappear).

Revision 1.302.2.5 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:24 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.4: +21 -14 lines
Diff to previous 1.302.2.4 (colored) to branchpoint 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.339 / (download) - annotate - [select for diffs], Sun Jun 19 22:41:31 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.338: +21 -14 lines
Diff to previous 1.338 (colored) to selected 1.239.2.4 (colored)

Relax the dup alloc tests to not include the on-disk data for ffsv2, since
nothing checks that the lazy-initialized inodes are correct and if they happen
to get corrupted, there is no way to fix them.

Revision 1.302.2.4 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:18 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.3: +62 -25 lines
Diff to previous 1.302.2.3 (colored) to branchpoint 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.338 / (download) - annotate - [select for diffs], Wed Dec 23 23:31:28 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.337: +54 -7 lines
Diff to previous 1.337 (colored) to selected 1.239.2.4 (colored)

We need to check if the inode is initialized for ffsv2 when we translate a
filehandle to a vnode. This can come from nfs and it could be out of range.
In that case we read garbage from the disk, end up trying to free bogus data
when we put the vnode back and we crash.
XXX: pullup-7

Revision 1.337 / (download) - annotate - [select for diffs], Sun Nov 15 01:39:23 2015 UTC (8 years, 5 months ago) by pgoyette
Branch: MAIN
Changes since 1.336: +6 -2 lines
Diff to previous 1.336 (colored) to selected 1.239.2.4 (colored)

If file system ffs is built with WAPBL defined, make sure that the
module depends on the wapbl module.

No impact to users of built-in ffs file system code, as the WAPBL
#define will cause inclusion of the code in the kernel.

A standard build of the modular ffs file system code will #define
WAPBL, so the module will only work on a kernel which was also
built with WAPBL defined (or, once I commit it, with a dynamically-
loaded wapbl module).

Revision 1.336 / (download) - annotate - [select for diffs], Thu Oct 22 11:31:31 2015 UTC (8 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.335: +6 -20 lines
Diff to previous 1.335 (colored) to selected 1.239.2.4 (colored)

Fix PR 50070. From hannken@.

Revision 1.302.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:17 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.2: +3 -3 lines
Diff to previous 1.302.2.2 (colored) to branchpoint 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.335 / (download) - annotate - [select for diffs], Fri Jul 24 13:02:52 2015 UTC (8 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.334: +3 -3 lines
Diff to previous 1.334 (colored) to selected 1.239.2.4 (colored)

Unused inits (harmless).

Found by Brainy.

Revision 1.302.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:30 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.302.2.1: +78 -68 lines
Diff to previous 1.302.2.1 (colored) to branchpoint 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.334 / (download) - annotate - [select for diffs], Sat May 23 16:59:13 2015 UTC (8 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.333: +4 -2 lines
Diff to previous 1.333 (colored) to selected 1.239.2.4 (colored)

Add a missing goto.

(was here before my changes)

ok christos@

Revision 1.333 / (download) - annotate - [select for diffs], Tue May 19 06:44:42 2015 UTC (8 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.332: +3 -3 lines
Diff to previous 1.332 (colored) to selected 1.239.2.4 (colored)

Cosmetics: fix netbsd.org spelling

Revision 1.332 / (download) - annotate - [select for diffs], Mon May 18 08:33:29 2015 UTC (8 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.331: +6 -5 lines
Diff to previous 1.331 (colored) to selected 1.239.2.4 (colored)

Print all sizes as size_t

Revision 1.331 / (download) - annotate - [select for diffs], Mon May 18 08:07:29 2015 UTC (8 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.330: +17 -4 lines
Diff to previous 1.330 (colored) to selected 1.239.2.4 (colored)

Make the recently added fs_cgsize test less strict, as it prevents existing
installs from booting.
Catch the common case and warn about it, pointing to a web page describing
the issue - but allow mounting. In all other cases, print more details about
the inconsistency and fail the mount.

Revision 1.330 / (download) - annotate - [select for diffs], Sun Apr 26 06:19:36 2015 UTC (8 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.329: +8 -3 lines
Diff to previous 1.329 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): check the size of cylinder groups.

Revision 1.329 / (download) - annotate - [select for diffs], Wed Apr 22 07:27:09 2015 UTC (9 years ago) by maxv
Branch: MAIN
Changes since 1.328: +54 -65 lines
Diff to previous 1.328 (colored) to selected 1.239.2.4 (colored)

Instead of duplicating code, create ffs_is_appleufs(): returns 1 if the
device is an AppleUFS FS, 0 otherwise.

This changes the behavior a bit: if the kernel cannot determine whether the
disk is an AppleUFS one or not, it now considers it as a normal UFS rather
than returning an error and not mounting/reloading it.

No particular comment on tech-kern@

Revision 1.302.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:32 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.302: +518 -161 lines
Diff to previous 1.302 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.328 / (download) - annotate - [select for diffs], Sat Apr 4 06:00:12 2015 UTC (9 years ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.327: +6 -2 lines
Diff to previous 1.327 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): ensure fs_ncg!=0 and fs_maxbpg!=0 to prevent
several divisions by zero.

Revision 1.327 / (download) - annotate - [select for diffs], Sat Mar 28 19:24:04 2015 UTC (9 years ago) by maxv
Branch: MAIN
Changes since 1.326: +11 -11 lines
Diff to previous 1.326 (colored) to selected 1.239.2.4 (colored)

Remove the 'cred' argument from bread(). Remove a now unused var in
ffs_snapshot.c. Update the man page accordingly.

ok hannken@

Revision 1.326 / (download) - annotate - [select for diffs], Fri Mar 27 17:27:56 2015 UTC (9 years ago) by riastradh
Branch: MAIN
Changes since 1.325: +4 -2 lines
Diff to previous 1.325 (colored) to selected 1.239.2.4 (colored)

Disentangle buffer-cached I/O from page-cached I/O in UFS.

Page-cached I/O is used for regular files, and is initiated by VFS
users such as userland and NFS.

Buffer-cached I/O is used for directories and symlinks, and is issued
only internally by UFS.

New UFS routine ufs_bufio replaces vn_rdwr for internal use.
ufs_bufio is implemented by new UFS operations uo_bufrd/uo_bufwr,
which sit in ufs_readwrite.c alongside the VOP_READ/VOP_WRITE
implementations.

I preserved the code as much as possible and will leave further
simplification for future commits.  I kept the ulfs_readwrite.c
copypasta close to ufs_readwrite.c in case we ever want to merge them
back; likewise ext2fs_readwrite.c.

No externally visible semantic change.  All atf fs tests still pass.

Revision 1.325 / (download) - annotate - [select for diffs], Tue Mar 17 09:39:29 2015 UTC (9 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.324: +187 -29 lines
Diff to previous 1.324 (colored) to selected 1.239.2.4 (colored)

Change ffs to use vcache_new:
- Change ffs_valloc to return an inode number.
- Remove now obsolete UFS operations UFS_VALLOC and UFS_VFREE.
- Make ufs_makeinode private to ufs_vnops.c and pass vattr instead of mode.

Revision 1.324 / (download) - annotate - [select for diffs], Sun Mar 15 09:21:01 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.323: +7 -8 lines
Diff to previous 1.323 (colored) to selected 1.239.2.4 (colored)

ffs_reload(): fix a bug that prevents Big Endian FSes from being reloaded.
'newfs' should be tagged as FS_SWAPPED, not 'fs'.

Was here before my changes.

While here, also KNF a bit.

Revision 1.323 / (download) - annotate - [select for diffs], Sat Mar 14 19:52:54 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.322: +10 -2 lines
Diff to previous 1.322 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): ensure fs_ipg and fs_fpg are != 0. Otherwise
division by zero in several places.

Revision 1.322 / (download) - annotate - [select for diffs], Tue Mar 10 12:59:32 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.321: +11 -2 lines
Diff to previous 1.321 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): check the number of inodes per block. Otherwise
a malformed value could panic the system.

Revision 1.321 / (download) - annotate - [select for diffs], Tue Mar 3 17:56:51 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.320: +2 -4 lines
Diff to previous 1.320 (colored) to selected 1.239.2.4 (colored)

ffs_reload(): release 'bp' earlier

Revision 1.320 / (download) - annotate - [select for diffs], Tue Mar 3 17:46:39 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.319: +16 -8 lines
Diff to previous 1.319 (colored) to selected 1.239.2.4 (colored)

ffs_reload(): the current implementation blindly guesses critical fields
of the superblock didn't change. Add checks to ensure they didn't change
for real. This prevents several memory corruptions.

Revision 1.319 / (download) - annotate - [select for diffs], Mon Feb 23 13:38:54 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.318: +59 -74 lines
Diff to previous 1.318 (colored) to selected 1.239.2.4 (colored)

Small changes:
 - instead of always calling DPRINTF with __func__, put __func__ directly
   in the macro
 - ffs_mountfs(): rename fsblockloc -> fs_sblockloc, initialize fs_sbsize
   to zero
No real functional change

Revision 1.318 / (download) - annotate - [select for diffs], Sun Feb 22 14:22:34 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.317: +27 -7 lines
Diff to previous 1.317 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): sanitize fs_fragshift, fs_bmask and fs_fmask.

Revision 1.317 / (download) - annotate - [select for diffs], Fri Feb 20 17:10:17 2015 UTC (9 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.316: +5 -8 lines
Diff to previous 1.316 (colored) to selected 1.239.2.4 (colored)

Style, and fix a DPRINTF

No functional change

Revision 1.316 / (download) - annotate - [select for diffs], Sat Feb 14 13:43:28 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.315: +6 -4 lines
Diff to previous 1.315 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): when checking the number of frag blocks, also
make sure it matches fs->fs_frag. This also prevents an infinite loop if
fs->fs_frag=0.

Revision 1.315 / (download) - annotate - [select for diffs], Sat Feb 14 10:21:29 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.314: +19 -3 lines
Diff to previous 1.314 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): compute fs_bshift and fs_fshift, and ensure
they are consistent with what is indicated in the superblock. This allows
us to safely use some ffs_ macros.

Revision 1.314 / (download) - annotate - [select for diffs], Sat Feb 14 09:55:53 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.313: +38 -26 lines
Diff to previous 1.313 (colored) to selected 1.239.2.4 (colored)

In fact, we need to sanitize the superblock *after* swapping it. Therefore,
move the swap code inside the loop.

'fs->fs_sbsize' is swapped twice: the first time in order to get the
correct superblock size, and later when swapping the whole superblock
structure. As a result, we need to check 'fs->fs_sbsize' twice.

This:
 - fixes my previous changes for swapped FSes
 - allows the kernel to look for other superblock locations if the
   current superblock is not validated

And now:
 - ffs_superblock_validate() takes only one argument: the fs structure
 - 'fs_bsize' is unused, so delete it

Add some comments to explain a bit what we are doing.

Revision 1.313 / (download) - annotate - [select for diffs], Sat Feb 14 09:00:12 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.312: +6 -2 lines
Diff to previous 1.312 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): sanitize the number of frag blocks.

Revision 1.312 / (download) - annotate - [select for diffs], Sat Feb 14 07:41:40 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.311: +19 -11 lines
Diff to previous 1.311 (colored) to selected 1.239.2.4 (colored)

Currently, in ffs_reload(), we don't handle the possibility that the
superblock location may have changed. But that implies that we don't
handle the possibility that its size may have changed either.

Therefore: add a check to ensure the size hasn't changed. Otherwise the
mismatch leads to a memory corruption with kmem.

Revision 1.311 / (download) - annotate - [select for diffs], Sat Feb 14 07:20:11 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.310: +8 -7 lines
Diff to previous 1.310 (colored) to selected 1.239.2.4 (colored)

Style. No functional change.

Revision 1.310 / (download) - annotate - [select for diffs], Sat Feb 14 07:11:34 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.309: +15 -6 lines
Diff to previous 1.309 (colored) to selected 1.239.2.4 (colored)

ffs_reload(): call ffs_superblock_validate() with the new superblock.

Revision 1.309 / (download) - annotate - [select for diffs], Fri Feb 13 17:13:20 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.308: +4 -2 lines
Diff to previous 1.308 (colored) to selected 1.239.2.4 (colored)

ffs_superblock_validate(): ensure fs->fs_cssize!=0, otherwise the kernel
panics with kmem_alloc(0).

Revision 1.308 / (download) - annotate - [select for diffs], Fri Feb 13 16:59:52 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.307: +13 -3 lines
Diff to previous 1.307 (colored) to selected 1.239.2.4 (colored)

Add some checks in ffs_superblock_validate():
 - fs_bsize < MINBSIZE
 - !powerof2(fs_bsize)
 - !powerof2(fs->fs_fsize)
 - fs_bsize < fs->fs_fsize

Based on makefs/ffs.

Revision 1.307 / (download) - annotate - [select for diffs], Fri Feb 13 15:52:29 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.306: +21 -11 lines
Diff to previous 1.306 (colored) to selected 1.239.2.4 (colored)

Add a new function: ffs_superblock_validate(). And add a new check to
ensure fs_size!=0; otherwise the kernel panics with a division by zero.

Revision 1.306 / (download) - annotate - [select for diffs], Fri Feb 13 15:28:56 2015 UTC (9 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.305: +32 -32 lines
Diff to previous 1.305 (colored) to selected 1.239.2.4 (colored)

Make this a bit more readable. No functional change.

Revision 1.299.2.3 / (download) - annotate - [select for diffs], Wed Jan 28 18:34:11 2015 UTC (9 years, 2 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-0
Changes since 1.299.2.2: +148 -53 lines
Diff to previous 1.299.2.2 (colored) to branchpoint 1.299 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by christos in ticket #425):
	sys/ufs/ufs/ufs_inode.c: revision 1.91-1.92
	sys/ufs/ufs/ufs_vnops.c: revision 1.223-1.224
	sys/ufs/ufs/ufs_extern.h: revision 1.76-1.77
	sys/ufs/ffs/ffs_vfsops.c: revision 1.303-1.305
Add debugging for mount...
Merge some error returns
Check more errors
Restore apple ufs error handling.
Move and unify indirect block truncate algorithm into a separate function.
PR/39371: Tobias Nygren: Don't fail mounting root if WAPBL log is corrupt.
Patch from Sergio L. Pascual.

Revision 1.305 / (download) - annotate - [select for diffs], Fri Jan 16 03:57:52 2015 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.304: +13 -8 lines
Diff to previous 1.304 (colored) to selected 1.239.2.4 (colored)

PR/39371: Tobias Nygren: Don't fail mounting root if WAPBL log is corrupt.
Patch from Sergio L. Pascual.
XXX: pullup-7

Revision 1.299.2.2 / (download) - annotate - [select for diffs], Mon Dec 29 16:28:14 2014 UTC (9 years, 3 months ago) by martin
Branch: netbsd-7
Changes since 1.299.2.1: +3 -3 lines
Diff to previous 1.299.2.1 (colored) to branchpoint 1.299 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by maxv in ticket #352):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.301
Limit the superblock size to SBLOCKSIZE, not MAXBSIZE. Otherwise memcpy
will read beyond the allocated buffer.
Discussed a bit on tech-kern@.

Revision 1.304 / (download) - annotate - [select for diffs], Sun Dec 14 01:13:57 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.303: +7 -11 lines
Diff to previous 1.303 (colored) to selected 1.239.2.4 (colored)

Restore apple ufs error handling.

Revision 1.303 / (download) - annotate - [select for diffs], Sun Dec 14 00:36:07 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.302: +139 -45 lines
Diff to previous 1.302 (colored) to selected 1.239.2.4 (colored)

- Add debugging for mount...
- Merge some error returns
- Check more errors

Revision 1.275.2.4 / (download) - annotate - [select for diffs], Thu Dec 4 05:38:54 2014 UTC (9 years, 4 months ago) by snj
Branch: netbsd-6
Changes since 1.275.2.3: +3 -10 lines
Diff to previous 1.275.2.3 (colored) to branchpoint 1.275 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by manu in ticket #1196):
	sys/kern/vfs_mount.c: revision 1.31
	sys/ufs/ffs/ffs_vfsops.c: revision 1.302
	sys/ufs/ufs/ufs_extattr.c: revision 1.44
Fix use-after-free on failed unmount with extended attribute enabled
When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.
The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart
As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.

Revision 1.299.2.1 / (download) - annotate - [select for diffs], Tue Nov 18 18:40:06 2014 UTC (9 years, 5 months ago) by snj
Branch: netbsd-7
Changes since 1.299: +3 -10 lines
Diff to previous 1.299 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by manu in ticket #246):
	sys/kern/vfs_mount.c: revision 1.31
	sys/ufs/ffs/ffs_vfsops.c: revision 1.302
	sys/ufs/ufs/ufs_extattr.c: revision 1.44
Fix use-after-free on failed unmount with extended attribute enabled
When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.
The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart
As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.

Revision 1.302 / (download) - annotate - [select for diffs], Fri Nov 14 10:09:50 2014 UTC (9 years, 5 months ago) by manu
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.301: +3 -10 lines
Diff to previous 1.301 (colored) to selected 1.239.2.4 (colored)

Fix use-after-free on failed unmount with extended attribute enabled

When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.

The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart

As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.

Revision 1.301 / (download) - annotate - [select for diffs], Thu Oct 30 17:13:41 2014 UTC (9 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.300: +3 -3 lines
Diff to previous 1.300 (colored) to selected 1.239.2.4 (colored)

Limit the superblock size to SBLOCKSIZE, not MAXBSIZE. Otherwise memcpy
will read beyond the allocated buffer.

Discussed a bit on tech-kern@.

Revision 1.300 / (download) - annotate - [select for diffs], Fri Oct 24 13:18:51 2014 UTC (9 years, 5 months ago) by njoly
Branch: MAIN
Changes since 1.299: +3 -3 lines
Diff to previous 1.299 (colored) to selected 1.239.2.4 (colored)

One semicolon is enough.

Revision 1.278.2.6 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:44 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.278.2.5: +132 -232 lines
Diff to previous 1.278.2.5 (colored) to selected 1.239.2.4 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.296.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:58 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.296: +81 -118 lines
Diff to previous 1.296 (colored) next main 1.297 (colored) to selected 1.239.2.4 (colored)

Rebase.

Revision 1.299 / (download) - annotate - [select for diffs], Sat May 24 16:34:04 2014 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.298: +54 -40 lines
Diff to previous 1.298 (colored) to selected 1.239.2.4 (colored)

Introduce a selector function to the vfs vnode iterator so that we don't
need to vget() vnodes that we are not interested at, and optimize locking
a bit. Iterator changes reviewed by Hannken (thanks), the rest of the bugs
are mine.

Revision 1.269.2.6 / (download) - annotate - [select for diffs], Thu May 22 11:41:18 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.269.2.5: +94 -207 lines
Diff to previous 1.269.2.5 (colored) to branchpoint 1.269 (colored) next main 1.270 (colored) to selected 1.239.2.4 (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.286.2.2 / (download) - annotate - [select for diffs], Sun May 18 17:46:21 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.286.2.1: +85 -198 lines
Diff to previous 1.286.2.1 (colored) to branchpoint 1.286 (colored) next main 1.287 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.298 / (download) - annotate - [select for diffs], Thu May 8 08:21:53 2014 UTC (9 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.297: +27 -80 lines
Diff to previous 1.297 (colored) to selected 1.239.2.4 (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.239.2.4.6.1 / (download) - annotate - [select for diffs], Mon Apr 28 16:05:37 2014 UTC (9 years, 11 months ago) by sborrill
Branch: netbsd-5-2
CVS Tags: netbsd-5-2-3-RELEASE
Changes since 1.239.2.4: +4 -2 lines
Diff to previous 1.239.2.4 (colored) next main 1.239.2.5 (colored)

Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.

Revision 1.239.2.4.2.1 / (download) - annotate - [select for diffs], Mon Apr 28 16:03:16 2014 UTC (9 years, 11 months ago) by sborrill
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE
Changes since 1.239.2.4: +4 -2 lines
Diff to previous 1.239.2.4 (colored) next main 1.239.2.5 (colored)

Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.

Revision 1.239.2.5 / (download) - annotate - [select for diffs], Fri Apr 25 15:43:51 2014 UTC (9 years, 11 months ago) by sborrill
Branch: netbsd-5
Changes since 1.239.2.4: +4 -2 lines
Diff to previous 1.239.2.4 (colored) to branchpoint 1.239 (colored) next main 1.240 (colored)

Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.

Revision 1.275.2.2.4.1 / (download) - annotate - [select for diffs], Mon Apr 21 10:17:47 2014 UTC (10 years ago) by bouyer
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE
Changes since 1.275.2.2: +4 -2 lines
Diff to previous 1.275.2.2 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by maxv in ticket #1050):
	sys/ufs/chfs/chfs_vfsops.c: revision 1.11
	sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
	sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
	sys/ufs/mfs/mfs_vfsops.c: revision 1.107
	sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
	sys/ufs/ffs/ffs_vfsops.c: revision 1.297
	sys/kern/vfs_syscalls.c: revision 1.478
	sys/kern/vfs_syscalls.c: revision 1.479
	sys/fs/puffs/puffs_vfsops.c: revision 1.110
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
	sys/nfs/nfs_vfsops.c: revision 1.227
	sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
	sys/miscfs/nullfs/null_vfsops.c: revision 1.88
	sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
	sys/coda/coda_vfsops.c: revision 1.81
	sys/ufs/lfs/lfs_vfsops.c: revision 1.321
	sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
	sys/fs/hfs/hfs_vfsops.c: revision 1.31
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
	sys/fs/union/union_vfsops.c: revision 1.72
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
	sys/kern/vfs_syscalls.c: revision 1.480
	sys/fs/efs/efs_vfsops.c: revision 1.25
	sys/kern/vfs_syscalls.c: revision 1.482
	sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
	external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
	sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
	sys/fs/adosfs/advfsops.c: revision 1.70
	sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).

Revision 1.275.2.2.2.1 / (download) - annotate - [select for diffs], Mon Apr 21 10:15:36 2014 UTC (10 years ago) by bouyer
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE
Changes since 1.275.2.2: +4 -2 lines
Diff to previous 1.275.2.2 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by maxv in ticket #1050):
	sys/ufs/chfs/chfs_vfsops.c: revision 1.11
	sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
	sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
	sys/ufs/mfs/mfs_vfsops.c: revision 1.107
	sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
	sys/ufs/ffs/ffs_vfsops.c: revision 1.297
	sys/kern/vfs_syscalls.c: revision 1.478
	sys/kern/vfs_syscalls.c: revision 1.479
	sys/fs/puffs/puffs_vfsops.c: revision 1.110
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
	sys/nfs/nfs_vfsops.c: revision 1.227
	sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
	sys/miscfs/nullfs/null_vfsops.c: revision 1.88
	sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
	sys/coda/coda_vfsops.c: revision 1.81
	sys/ufs/lfs/lfs_vfsops.c: revision 1.321
	sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
	sys/fs/hfs/hfs_vfsops.c: revision 1.31
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
	sys/fs/union/union_vfsops.c: revision 1.72
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
	sys/kern/vfs_syscalls.c: revision 1.480
	sys/fs/efs/efs_vfsops.c: revision 1.25
	sys/kern/vfs_syscalls.c: revision 1.482
	sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
	external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
	sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
	sys/fs/adosfs/advfsops.c: revision 1.70
	sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).

Revision 1.275.2.3 / (download) - annotate - [select for diffs], Mon Apr 21 10:14:17 2014 UTC (10 years ago) by bouyer
Branch: netbsd-6
Changes since 1.275.2.2: +4 -2 lines
Diff to previous 1.275.2.2 (colored) to branchpoint 1.275 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by maxv in ticket #1050):
	sys/ufs/chfs/chfs_vfsops.c: revision 1.11
	sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
	sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
	sys/ufs/mfs/mfs_vfsops.c: revision 1.107
	sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
	sys/ufs/ffs/ffs_vfsops.c: revision 1.297
	sys/kern/vfs_syscalls.c: revision 1.478
	sys/kern/vfs_syscalls.c: revision 1.479
	sys/fs/puffs/puffs_vfsops.c: revision 1.110
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
	sys/nfs/nfs_vfsops.c: revision 1.227
	sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
	sys/miscfs/nullfs/null_vfsops.c: revision 1.88
	sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
	sys/coda/coda_vfsops.c: revision 1.81
	sys/ufs/lfs/lfs_vfsops.c: revision 1.321
	sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
	sys/fs/hfs/hfs_vfsops.c: revision 1.31
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
	sys/fs/union/union_vfsops.c: revision 1.72
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
	sys/kern/vfs_syscalls.c: revision 1.480
	sys/fs/efs/efs_vfsops.c: revision 1.25
	sys/kern/vfs_syscalls.c: revision 1.482
	sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
	external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
	sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
	sys/fs/adosfs/advfsops.c: revision 1.70
	sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).

Revision 1.297 / (download) - annotate - [select for diffs], Wed Apr 16 18:55:19 2014 UTC (10 years ago) by maxv
Branch: MAIN
Changes since 1.296: +4 -2 lines
Diff to previous 1.296 (colored) to selected 1.239.2.4 (colored)

An (un)privileged user can easily make the kernel dereference a NULL
pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).

ok christos@

Revision 1.296 / (download) - annotate - [select for diffs], Tue Apr 1 14:28:17 2014 UTC (10 years ago) by christos
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Changes since 1.295: +6 -6 lines
Diff to previous 1.295 (colored) to selected 1.239.2.4 (colored)

Check for bread errors before we do the size check. Otherwise we de-reference
NULL...

Revision 1.295 / (download) - annotate - [select for diffs], Sun Mar 23 15:21:16 2014 UTC (10 years ago) by hannken
Branch: MAIN
Changes since 1.294: +25 -27 lines
Diff to previous 1.294 (colored) to selected 1.239.2.4 (colored)

Change all vfsops to use C99 designated initializers.

No functional changes intended.

Revision 1.294 / (download) - annotate - [select for diffs], Mon Mar 17 09:29:55 2014 UTC (10 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.293: +16 -50 lines
Diff to previous 1.293 (colored) to selected 1.239.2.4 (colored)

Change ffs_sync() to use vfs_vnode_iterator.

Revision 1.293 / (download) - annotate - [select for diffs], Wed Mar 5 09:37:29 2014 UTC (10 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.292: +12 -29 lines
Diff to previous 1.292 (colored) to selected 1.239.2.4 (colored)

Current support for iterating over mnt_vnodelist is rudimentary.  Every
caller has to care about list and vnode mutexes, reference count being zero,
intermediate vnode states like VI_CLEAN, VI_XLOCK, VI_MARKER and so on.

Add an interface to iterate over a vnode list:

void vfs_vnode_iterator_init(struct mount *mp, struct vnode_iterator **marker)
void vfs_vnode_iterator_destroy(struct vnode_iterator *marker)
bool vfs_vnode_iterator_next(struct vnode_iterator *marker, struct vnode **vpp)

vfs_vnode_iterator_next() returns either "false / *vpp == NULL" when done
or "true / *vpp != NULL" to return the next referenced vnode from the list.

To make vrecycle() work in this environment change it to

bool vrecycle(struct vnode *vp)

where "vp" is a referenced vnode to be destroyed if this is the last reference.

Discussed on tech-kern.

Welcome to 6.99.34

Revision 1.292 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:13 2014 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.291: +2 -7 lines
Diff to previous 1.291 (colored) to selected 1.239.2.4 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.291 / (download) - annotate - [select for diffs], Sat Nov 23 13:35:37 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.290: +3 -5 lines
Diff to previous 1.290 (colored) to selected 1.239.2.4 (colored)

change the mountlist CIRCLEQ into a TAILQ

Revision 1.290 / (download) - annotate - [select for diffs], Tue Oct 29 09:53:51 2013 UTC (10 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.289: +3 -3 lines
Diff to previous 1.289 (colored) to selected 1.239.2.4 (colored)

Vnode API cleanup pass 1.

- Make these defines and functions private to vfs_vnode.c:

  VC_MASK, VC_LOCK, DOCLOSE, VI_IANCTREDO and VI_INACTNOW
  vclean() and vrelel()

- Remove the long time unused lwp argument from vrecycle().

- Remove vtryget(), it is responsible for ugly hacks and doesn't
  look that effective.

Presented on tech-kern.

Welcome to 6.99.25

Revision 1.289 / (download) - annotate - [select for diffs], Mon Sep 30 18:58:00 2013 UTC (10 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.288: +7 -7 lines
Diff to previous 1.288 (colored) to selected 1.239.2.4 (colored)

Replace macro v_specmountpoint with two functions spec_node_getmountedfs()
and spec_node_setmountedfs() to manage the file system mounted on a device.
Assert the device is a block device.

Welcome to 6.99.24

Discussed on tech-kern@ some time ago.

Reviewed by: David Holland <dholland@netbsd.org>

Revision 1.288 / (download) - annotate - [select for diffs], Mon Sep 16 12:36:54 2013 UTC (10 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.287: +2 -4 lines
Diff to previous 1.287 (colored) to selected 1.239.2.4 (colored)

Function ffs_reload() works on a read-only mount, so remove the call
to ffs_snapshot_mount() as it would panic later with "already on list"
when remounting read-write.

Should fix PR kern/48211 (Unclean shutdown with active snapshot causes
panic during reboot)

Revision 1.286.2.1 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:38 2013 UTC (10 years, 7 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.286: +2 -3 lines
Diff to previous 1.286 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.287 / (download) - annotate - [select for diffs], Sun Aug 11 04:36:17 2013 UTC (10 years, 8 months ago) by dholland
Branch: MAIN
Changes since 1.286: +2 -3 lines
Diff to previous 1.286 (colored) to selected 1.239.2.4 (colored)

Kill off uo_unmark_vnode/UFS_UNMARK_VNODE as it's now a leftover.

Revision 1.286 / (download) - annotate - [select for diffs], Sun Jun 23 22:03:34 2013 UTC (10 years, 9 months ago) by dholland
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.285: +3 -3 lines
Diff to previous 1.285 (colored) to selected 1.239.2.4 (colored)

Stick ffs_ in front of the following macros:
   fragstoblks()
   blkstofrags()
   fragnum()
   blknum()

to finish the job of distinguishing them from the lfs versions, which
Christos renamed the other day.

I believe this is the last of the overtly ambiguous exported symbols
from ffs... or at least, the last of the ones that conflicted with lfs.
ffs still pollutes the C namespace very broadly (as does ufs) and this
needs quite a bit more cleanup.

XXX: boo on macros with lowercase names. But I'm not tackling that just yet.

Revision 1.278.2.5 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:39 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.278.2.4: +5 -4 lines
Diff to previous 1.278.2.4 (colored) to selected 1.239.2.4 (colored)

resync from head

Revision 1.285 / (download) - annotate - [select for diffs], Sun Jun 23 02:06:05 2013 UTC (10 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.284: +9 -9 lines
Diff to previous 1.284 (colored) to selected 1.239.2.4 (colored)

fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)

Revision 1.284 / (download) - annotate - [select for diffs], Sun Jun 16 13:33:30 2013 UTC (10 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.283: +3 -2 lines
Diff to previous 1.283 (colored) to selected 1.239.2.4 (colored)

Add an UFS_SNAPGONE() ufs op replacing the calls
to ffs_snapgone() in ufs_lookup.c.

Ok: David Holland <dholland@netbsd.org>

Welcome to 6.99.22

Revision 1.283 / (download) - annotate - [select for diffs], Sun Jun 9 17:57:08 2013 UTC (10 years, 10 months ago) by dholland
Branch: MAIN
Changes since 1.282: +4 -4 lines
Diff to previous 1.282 (colored) to selected 1.239.2.4 (colored)

Stick UFS_ in front of these symbols:
   DIRBLKSIZ
   DIRECTSIZ
   DIRSIZ
   OLDDIRFMT
   NEWDIRFMT

Part of PR 47909.

Revision 1.278.2.4 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:15 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.278.2.3: +9 -10 lines
Diff to previous 1.278.2.3 (colored) to selected 1.239.2.4 (colored)

resync with head

Revision 1.278.2.3 / (download) - annotate - [select for diffs], Sun Feb 10 16:26:34 2013 UTC (11 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.278.2.2: +7 -13 lines
Diff to previous 1.278.2.2 (colored) to selected 1.239.2.4 (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.269.2.5 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:32 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.269.2.4: +5 -10 lines
Diff to previous 1.269.2.4 (colored) to branchpoint 1.269 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.282 / (download) - annotate - [select for diffs], Tue Jan 22 09:39:16 2013 UTC (11 years, 2 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base8, khorben-n900, agc-symver-base, agc-symver
Changes since 1.281: +4 -4 lines
Diff to previous 1.281 (colored) to selected 1.239.2.4 (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.269.2.4 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:55 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.269.2.3: +6 -2 lines
Diff to previous 1.269.2.3 (colored) to branchpoint 1.269 (colored) to selected 1.239.2.4 (colored)

sync with (a bit old) head

Revision 1.281 / (download) - annotate - [select for diffs], Thu Dec 20 08:03:44 2012 UTC (11 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.280: +3 -8 lines
Diff to previous 1.280 (colored) to selected 1.239.2.4 (colored)

Change bread() and breadn() to never return a buffer on
error and modify all callers to not brelse() on error.

Welcome to 6.99.16

PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)

Revision 1.280 / (download) - annotate - [select for diffs], Mon Nov 26 16:22:21 2012 UTC (11 years, 4 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.279: +6 -2 lines
Diff to previous 1.279 (colored) to selected 1.239.2.4 (colored)

allow to enable ffs "discard" by update mounts, make the flag visible
to userland

Revision 1.278.2.2 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:53 2012 UTC (11 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.278.2.1: +10 -2 lines
Diff to previous 1.278.2.1 (colored) to selected 1.239.2.4 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.275.2.1.2.1 / (download) - annotate - [select for diffs], Thu Nov 1 16:45:04 2012 UTC (11 years, 5 months ago) by matt
Branch: matt-nb6-plus
Changes since 1.275.2.1: +10 -8 lines
Diff to previous 1.275.2.1 (colored) next main 1.275.2.2 (colored) to selected 1.239.2.4 (colored)

sync with netbsd-6-0-RELEASE.

Revision 1.269.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:23:00 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.269.2.2: +18 -8 lines
Diff to previous 1.269.2.2 (colored) to branchpoint 1.269 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.279 / (download) - annotate - [select for diffs], Fri Oct 19 17:09:08 2012 UTC (11 years, 6 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Changes since 1.278: +10 -2 lines
Diff to previous 1.278 (colored) to selected 1.239.2.4 (colored)

Implement experimental support to pass notifications that a file
was deleted from the filesystem to the disk driver, commonly
known as "discard" or "trim".
fs/driver support is in ffs and ata wd for now.
This is what was posted here:
http://mail-index.netbsd.org/tech-kern/2012/02/28/msg012813.html
with minor cleanup, and the global switch replaced by a mount option.

Revision 1.275.2.2 / (download) - annotate - [select for diffs], Thu Sep 13 22:27:43 2012 UTC (11 years, 7 months ago) by riz
Branch: netbsd-6
CVS Tags: 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-0-RELEASE, netbsd-6-0-RC2, 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, matt-nb6-plus-nbase, matt-nb6-plus-base
Branch point for: netbsd-6-1, netbsd-6-0
Changes since 1.275.2.1: +10 -8 lines
Diff to previous 1.275.2.1 (colored) to branchpoint 1.275 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by manu in ticket #553):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.278
Stop extended attributes at the appropriate place so that unmount
does not fail with EBUSY on filesystem with extended attributes ensabled.

Revision 1.278.2.1 / (download) - annotate - [select for diffs], Wed Sep 12 06:15:35 2012 UTC (11 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.278: +14 -2 lines
Diff to previous 1.278 (colored) to selected 1.239.2.4 (colored)

Initial snapshot of work to eliminate 64K MAXPHYS.  Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far.  Not hard to add support to other
ports.  If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier.  Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.

Revision 1.278 / (download) - annotate - [select for diffs], Mon Sep 10 07:57:50 2012 UTC (11 years, 7 months ago) by manu
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.277: +10 -8 lines
Diff to previous 1.277 (colored) to selected 1.239.2.4 (colored)

Stop extended attributes at the appropriate place so that unmount
does not fail with EBUSY on filesystem with extended attributes ensabled.

Revision 1.271.4.3 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:40 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.271.4.2: +1 -1 lines
Diff to previous 1.271.4.2 (colored) to branchpoint 1.271 (colored) next main 1.272 (colored) to selected 1.239.2.4 (colored)

sync to latest -current.

Revision 1.269.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:18 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.269.2.1: +3 -3 lines
Diff to previous 1.269.2.1 (colored) to branchpoint 1.269 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.275.2.1 / (download) - annotate - [select for diffs], Mon May 7 03:01:12 2012 UTC (11 years, 11 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-0-RC1
Branch point for: matt-nb6-plus
Changes since 1.275: +3 -3 lines
Diff to previous 1.275 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by chs in ticket #204):
	sys/fs/sysvbfs/sysvbfs_vnops.c: revision 1.44
	sys/ufs/ffs/ffs_vfsops.c: revision 1.277
	sys/fs/v7fs/v7fs_vnops.c: revision 1.11
	sys/ufs/chfs/chfs_vnops.c: revision 1.7
	sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.61
	sys/miscfs/genfs/genfs_io.c: revision 1.54
	sys/kern/vfs_wapbl.c: revision 1.52
	sys/uvm/uvm_pager.h: revision 1.43
	sys/ufs/ffs/ffs_vnops.c: revision 1.121
	sys/kern/vfs_subr.c: revision 1.434
	sys/fs/msdosfs/msdosfs_vnops.c: revision 1.83
	sys/fs/ntfs/ntfs_vnops.c: revision 1.51
	sys/fs/udf/udf_subr.c: revision 1.119
	sys/miscfs/specfs/spec_vnops.c: revision 1.135
	sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.103
	sys/fs/udf/udf_vnops.c: revision 1.71
	sys/ufs/ufs/ufs_readwrite.c: revision 1.104
change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.
mark all wapbl I/O as BPRIO_TIMECRITICAL.
this is the second part of addressing PR 46325.

Revision 1.277 / (download) - annotate - [select for diffs], Sun Apr 29 22:54:00 2012 UTC (11 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Changes since 1.276: +3 -3 lines
Diff to previous 1.276 (colored) to selected 1.239.2.4 (colored)

change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.

Revision 1.269.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:56 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.269: +72 -36 lines
Diff to previous 1.269 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.271.4.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:51 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.271.4.1: +30 -3 lines
Diff to previous 1.271.4.1 (colored) to branchpoint 1.271 (colored) to selected 1.239.2.4 (colored)

sync to latest -current.

Revision 1.276 / (download) - annotate - [select for diffs], Tue Mar 13 18:41:13 2012 UTC (12 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8
Changes since 1.275: +30 -3 lines
Diff to previous 1.275 (colored) to selected 1.239.2.4 (colored)

Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.

Revision 1.271.4.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:53 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.271: +35 -27 lines
Diff to previous 1.271 (colored) to selected 1.239.2.4 (colored)

merge to -current.

Revision 1.275 / (download) - annotate - [select for diffs], Sun Jan 29 00:58:14 2012 UTC (12 years, 2 months ago) by nonaka
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.274: +4 -4 lines
Diff to previous 1.274 (colored) to selected 1.239.2.4 (colored)

use FS_UFS[12]_MAGIC_SWAPPED instead of bswap32(FS_UFS[12]_MAGIC).

Revision 1.274 / (download) - annotate - [select for diffs], Sat Jan 28 00:00:06 2012 UTC (12 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.273: +3 -4 lines
Diff to previous 1.273 (colored) to selected 1.239.2.4 (colored)

pool_page_alloc, pool_page_alloc_meta: avoid extra compare, use const.
ffs_mountfs,sys_swapctl: replace memset with kmem_zalloc.
sys_swapctl: move kmem_free outside the lock path.
uvm_init: fix comment, remove pointless numeration of steps.
uvm_map_enter: remove meflagval variable.
Fix some indentation.

Revision 1.273 / (download) - annotate - [select for diffs], Fri Jan 27 19:22:49 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
Changes since 1.272: +32 -23 lines
Diff to previous 1.272 (colored) to selected 1.239.2.4 (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.272 / (download) - annotate - [select for diffs], Tue Jan 3 15:44:00 2012 UTC (12 years, 3 months ago) by pgoyette
Branch: MAIN
Changes since 1.271: +3 -3 lines
Diff to previous 1.271 (colored) to selected 1.239.2.4 (colored)

Display current mount point, rather than previous one, when printing
the "replaying log to disk" message.

OK dholland@

Fixes PR kern/39609

Revision 1.271 / (download) - annotate - [select for diffs], Mon Nov 14 18:35:14 2011 UTC (12 years, 5 months ago) by hannken
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.270: +4 -2 lines
Diff to previous 1.270 (colored) to selected 1.239.2.4 (colored)

VOP_OPEN() needs a locked vnode.  All these copy-and-pasted xxxfs_mount()
implementations need more review.

Revision 1.270 / (download) - annotate - [select for diffs], Sun Nov 13 23:10:34 2011 UTC (12 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.269: +9 -10 lines
Diff to previous 1.269 (colored) to selected 1.239.2.4 (colored)

use getdiskinfo()

Revision 1.269 / (download) - annotate - [select for diffs], Fri Oct 7 09:35:07 2011 UTC (12 years, 6 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.268: +4 -6 lines
Diff to previous 1.268 (colored) to selected 1.239.2.4 (colored)

As vnalloc() always allocates with PR_WAITOK there is no longer the need
to test its result for NULL.

Revision 1.266.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:30 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.266: +31 -25 lines
Diff to previous 1.266 (colored) next main 1.267 (colored) to selected 1.239.2.4 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.268 / (download) - annotate - [select for diffs], Fri Jun 17 14:23:52 2011 UTC (12 years, 10 months ago) by manu
Branch: MAIN
Changes since 1.267: +20 -15 lines
Diff to previous 1.267 (colored) to selected 1.239.2.4 (colored)

Add mount -o extattr option to enable extended attributs (corrently only
for UFS1).
Remove kernel option for EA backing store autocreation and do it by
default. Add a sysctl so that autocreated attriutr size can be modified.

Revision 1.267 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:00 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.266: +13 -12 lines
Diff to previous 1.266 (colored) to selected 1.239.2.4 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.263.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:16 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.263: +64 -101 lines
Diff to previous 1.263 (colored) next main 1.264 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.258.2.6 / (download) - annotate - [select for diffs], Tue May 31 03:05:13 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.258.2.5: +6 -79 lines
Diff to previous 1.258.2.5 (colored) to branchpoint 1.258 (colored) next main 1.259 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.258.2.5 / (download) - annotate - [select for diffs], Thu May 19 03:43:04 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.258.2.4: +4 -3 lines
Diff to previous 1.258.2.4 (colored) to branchpoint 1.258 (colored) to selected 1.239.2.4 (colored)

Implement sharing of vnode_t::v_interlock amongst vnodes:
- Lock is shared amongst UVM objects using uvm_obj_setlock() or getnewvnode().
- Adjust vnode cache to handle unsharing, add VI_LOCKSHARE flag for that.
- Use sharing in tmpfs and layerfs for underlying object.
- Simplify locking in ubc_fault().
- Sprinkle some asserts.

Discussed with ad@.

Revision 1.266 / (download) - annotate - [select for diffs], Wed Apr 27 07:24:53 2011 UTC (12 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.265: +6 -79 lines
Diff to previous 1.265 (colored) to selected 1.239.2.4 (colored)

Cleanup ffs fsync and make devices on wapbl enabled file systems work here:

- Replace the ugly sync loop in ffs_full_fsync() and ffs_vfs_fsync() with
  vflushbuf().  This loop is a relic of softdeps and not needed anymore.

- Add ffs_spec_fsync() for device nodes on ffs file systems that calls
  spec_fsync() like all other file systems do and then updates the ctime.

Discussed on tech-kern.

Should fix PRs:
PR #41192 wapbl diagnostic panic during cgdconfig
PR #41977 kernel diagnostic assertion "rw_lock_held(&wl->wl_rwlock)" failed
PR #42149 wapbl locking panic if watching DVD
PR #42551 Lockdebug assert in wapbl when running zpool

Revision 1.258.2.4 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:20 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.258.2.3: +58 -22 lines
Diff to previous 1.258.2.3 (colored) to branchpoint 1.258 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.265 / (download) - annotate - [select for diffs], Sun Mar 27 08:04:50 2011 UTC (13 years ago) by mlelstv
Branch: MAIN
Changes since 1.264: +12 -7 lines
Diff to previous 1.264 (colored) to selected 1.239.2.4 (colored)

Don't abort when APPLE_UFS autodetection cannot read the apple ufs label
due to sector size or alignment problems. Autodetection is only a safety
measure, you should mark the filesystem type in the BSD disklabel.

Revision 1.264 / (download) - annotate - [select for diffs], Sun Mar 6 17:08:38 2011 UTC (13 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.263: +50 -19 lines
Diff to previous 1.263 (colored) to selected 1.239.2.4 (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.258.2.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:30 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.258.2.2: +18 -17 lines
Diff to previous 1.258.2.2 (colored) to branchpoint 1.258 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.263.4.3 / (download) - annotate - [select for diffs], Wed Feb 9 19:49:44 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.263.4.2: +20 -2 lines
Diff to previous 1.263.4.2 (colored) to branchpoint 1.263 (colored) next main 1.264 (colored) to selected 1.239.2.4 (colored)

Support MNT_UPDATE for quota2 (especially r/o -> r/w transitions)

Revision 1.263.4.2 / (download) - annotate - [select for diffs], Tue Feb 8 20:00:53 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.263.4.1: +6 -17 lines
Diff to previous 1.263.4.1 (colored) to branchpoint 1.263 (colored) to selected 1.239.2.4 (colored)

Minimal hacking to make 'options QUOTA' compile again.

Revision 1.263.4.1 / (download) - annotate - [select for diffs], Thu Jan 20 14:25:02 2011 UTC (13 years, 3 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.263: +29 -5 lines
Diff to previous 1.263 (colored) to selected 1.239.2.4 (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.263 / (download) - annotate - [select for diffs], Mon Dec 27 18:49:42 2010 UTC (13 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: uebayasi-xip-base7, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.262: +5 -16 lines
Diff to previous 1.262 (colored) to selected 1.239.2.4 (colored)

Extend the range of fstrans transactions to a sequence of vnode operations
on a locked vnode.  This leaves a suspended file system and therefore a
snapshot with either all or no operations of such a sequence done.

Revision 1.257.2.14 / (download) - annotate - [select for diffs], Fri Nov 19 02:29:55 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.13: +14 -1 lines
Diff to previous 1.257.2.13 (colored) to branchpoint 1.257 (colored) next main 1.258 (colored) to selected 1.239.2.4 (colored)

- Check FFS fragment size to be page-aligned too.
- Hook the new cdev_mmap() method.

Revision 1.257.2.13 / (download) - annotate - [select for diffs], Mon Oct 25 08:07:22 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.12: +15 -9 lines
Diff to previous 1.257.2.12 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Fragment size doesn't need to be page-aligned.

Return EINVAL if read-only mount option is not set, other failures
reported as ENXIO.

Revision 1.257.2.12 / (download) - annotate - [select for diffs], Thu Oct 21 17:45:21 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.11: +13 -8 lines
Diff to previous 1.257.2.11 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Handle XIP mount error properly.

Revision 1.257.2.11 / (download) - annotate - [select for diffs], Thu Oct 21 08:45:04 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.10: +8 -10 lines
Diff to previous 1.257.2.10 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

After consideration, put back "xip" mount option.

The internal behavior is totally different between with and without
the option; automatic detection and/or fall-through are not user
friendly.  mount(8) returning the "xip" flag is also informative.

Revision 1.257.2.10 / (download) - annotate - [select for diffs], Thu Oct 7 08:54:16 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.9: +15 -12 lines
Diff to previous 1.257.2.9 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Check filesystem's bsize/fsize are aligned to PAGE_SIZE, or fail with
ENXIO.

Revision 1.257.2.9 / (download) - annotate - [select for diffs], Sun Sep 26 06:35:32 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.8: +7 -6 lines
Diff to previous 1.257.2.8 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

ffs_vget: Mark XIP only for VREG vnodes.

Revision 1.257.2.8 / (download) - annotate - [select for diffs], Tue Aug 17 06:48:10 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.7: +21 -9 lines
Diff to previous 1.257.2.7 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.223.4.7 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:13 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.223.4.6: +23 -11 lines
Diff to previous 1.223.4.6 (colored) to branchpoint 1.223 (colored) next main 1.224 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.262 / (download) - annotate - [select for diffs], Mon Aug 9 17:12:18 2010 UTC (13 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.261: +3 -3 lines
Diff to previous 1.261 (colored) to selected 1.239.2.4 (colored)

add a linefeed to the previous

Revision 1.261 / (download) - annotate - [select for diffs], Mon Aug 9 15:50:13 2010 UTC (13 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.260: +14 -2 lines
Diff to previous 1.260 (colored) to selected 1.239.2.4 (colored)

Return error if we try to mount a file system with block size > MAXBSIZE.

Note: there is a billion ways to make the kernel panic by trying
to mount a garbage file system and I don't imagine we'll ever get
close to fixing even half of them.  However, for this one failing
gracefully is a bonus since Xen DomU only does 32k MAXBSIZE and
the 64k MAXBSIZE file systems are out there (PR port-xen/43727).

Tested by compiling sys/rump with CPPFLAGS+=-DMAXPHYS=32768 (all
tests in tests/fs still pass).  I don't know how we're going to
translate this into an easy regression test, though.  Maybe with
a hacked newfs?

Revision 1.257.2.7 / (download) - annotate - [select for diffs], Tue Jul 27 00:50:31 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.6: +2 -2 lines
Diff to previous 1.257.2.6 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

s/DIOCGPHYSADDR/DIOCGPHYSSEG/ now that it returns struct vm_physseg *,
not paddr_t.

Revision 1.260 / (download) - annotate - [select for diffs], Wed Jul 21 17:52:13 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.259: +5 -5 lines
Diff to previous 1.259 (colored) to selected 1.239.2.4 (colored)

Make holding v_interlock mandatory for callers of vget().

Announced some time ago on tech-kern.

Revision 1.258.2.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:20:04 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.258.2.1: +8 -8 lines
Diff to previous 1.258.2.1 (colored) to branchpoint 1.258 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.259 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:19 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.258: +8 -8 lines
Diff to previous 1.258 (colored) to selected 1.239.2.4 (colored)

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.

Revision 1.257.2.6 / (download) - annotate - [select for diffs], Fri May 28 09:14:55 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.5: +12 -13 lines
Diff to previous 1.257.2.5 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Remove the "xip" option from mount_ffs(8) for simplicity.

Revision 1.257.2.5 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:34 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.4: +0 -5 lines
Diff to previous 1.257.2.4 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.257.2.4 / (download) - annotate - [select for diffs], Wed Apr 28 16:33:47 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.3: +4 -4 lines
Diff to previous 1.257.2.3 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

When mounting a block device as XIP, pass registered struct vm_physseg
* as a cookie from the block device to the caller (== mount code).
struct vm_physseg * will be passed to XIP vnode pager
(genfs_do_getpages_xip()), then converted back to paddr_t.

(My future plan is to pass struct vm_physseg * back to the fault handler,
and to pmap_enter() as is.)

Revision 1.239.2.3.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:26 2010 UTC (14 years ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.239.2.3: +25 -21 lines
Diff to previous 1.239.2.3 (colored) next main 1.239.2.4 (colored)

sync to netbsd-5

Revision 1.257.2.3 / (download) - annotate - [select for diffs], Tue Mar 23 01:58:14 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.2: +1 -1 lines
Diff to previous 1.257.2.2 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Put run-time XIP-specific per-mount data in struct specdev, not struct mount.

Revision 1.258.2.1 / (download) - annotate - [select for diffs], Tue Mar 16 15:38:14 2010 UTC (14 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.258: +14 -14 lines
Diff to previous 1.258 (colored) to selected 1.239.2.4 (colored)

Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc().  It allows us to share the locks among UVM objects.

Revision 1.223.4.6 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:44 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.223.4.5: +49 -44 lines
Diff to previous 1.223.4.5 (colored) to branchpoint 1.223 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.257.2.2 / (download) - annotate - [select for diffs], Tue Feb 23 07:00:58 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257.2.1: +12 -5 lines
Diff to previous 1.257.2.1 (colored) to branchpoint 1.257 (colored) to selected 1.239.2.4 (colored)

Check XIP mount condition more nicely.

Revision 1.257.2.1 / (download) - annotate - [select for diffs], Thu Feb 11 05:22:38 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.257: +18 -2 lines
Diff to previous 1.257 (colored) to selected 1.239.2.4 (colored)

XIP hook for ffs.

Revision 1.258 / (download) - annotate - [select for diffs], Thu Feb 11 00:06:16 2010 UTC (14 years, 2 months ago) by mlelstv
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.257: +2 -7 lines
Diff to previous 1.257 (colored) to selected 1.239.2.4 (colored)

There is no code left that uses disk size data, so don't query it.
This also failed when querying the simulated block device from mfs.
Fixes PR kern/42782.

Revision 1.257 / (download) - annotate - [select for diffs], Fri Feb 5 20:03:36 2010 UTC (14 years, 2 months ago) by mlelstv
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.256: +3 -3 lines
Diff to previous 1.256 (colored) to selected 1.239.2.4 (colored)

Correct addressing of superblock updates.

Revision 1.256 / (download) - annotate - [select for diffs], Sun Jan 31 10:54:10 2010 UTC (14 years, 2 months ago) by mlelstv
Branch: MAIN
Changes since 1.255: +6 -10 lines
Diff to previous 1.255 (colored) to selected 1.239.2.4 (colored)

Fix block shift to work with different device block sizes.

Unlike other filesystems this has some side issues because
the shift values are stored in the superblock and because
userland utitlies share the same fsbtodb macros.

-> the kernel now ignores the value stored in the superblock.
-> the macro adaption is only done for defined(_KERNEL) code.

Revision 1.255 / (download) - annotate - [select for diffs], Sun Jan 31 10:50:23 2010 UTC (14 years, 2 months ago) by mlelstv
Branch: MAIN
Changes since 1.254: +37 -35 lines
Diff to previous 1.254 (colored) to selected 1.239.2.4 (colored)

Replace individual queries for partition information with
new helper function.

Revision 1.254 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:11 2010 UTC (14 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.253: +3 -3 lines
Diff to previous 1.253 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.253 / (download) - annotate - [select for diffs], Wed Nov 4 09:45:05 2009 UTC (14 years, 5 months ago) by hannken
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.252: +19 -7 lines
Diff to previous 1.252 (colored) to selected 1.239.2.4 (colored)

Now that softdep has left the tree the only place needing the ffs_lock()
hack is ffs_sync().

- Use the generic lock operations for ffs.
- Change ffs_sync() to omit the vnode lock while suspending.

Reviewed by: Antti Kantee <pooka@netbsd.org>

Revision 1.239.2.4 / (download) - annotate - [selected], Sat Oct 3 22:49:43 2009 UTC (14 years, 6 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, 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, matt-nb5-pq3-base, matt-nb5-pq3
Branch point for: netbsd-5-2, netbsd-5-1
Changes since 1.239.2.3: +25 -21 lines
Diff to previous 1.239.2.3 (colored) to branchpoint 1.239 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1036):
	sbin/fsck_ffs/extern.h: revision 1.25 via patch
	sbin/fsck_ffs/setup.c: revision 1.88 via patch
	sbin/fsck_ffs/wapbl.c: revision 1.4 via patch
	sbin/tunefs/tunefs.c: revision 1.41 via patch
	sys/ufs/ffs/ffs_vfsops.c: revision 1.252 via patch
	sys/ufs/ffs/ffs_wapbl.c: revision 1.13 via patch
Allow tunefs to clear any type of WAPBL log, not only in-filesystem
ones. Discussed in
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.
--
Do some basic checks of the WAPBL journal, to abort the boot before the
kernel refuse to mount a filesystem read-write (booting a system
multiuser with critical filesystems read-only is bad):
Add a check_wapbl() which will check some WAPBL values in the superblock,
and try to read the journal via wapbl_replay_start() if there is one.
pfatal() if one of these fail (abort boot if in preen mode,
as "CONTINUE" otherwise). In non-preen mode the bogus journal will
be cleared.
check_wapbl() is always called if the superblock supports WAPBL.
Even if FS_DOWAPBL is not there, there could be flags asking the
kernel to clear or create a log with bogus values which would cause the
kernel refuse to mount the filesystem.
Discussed in
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.
--
If the WAPBL journal can't be read (ffs_wapbl_replay_start() fails),
mount the filesystem anyway if MNT_FORCE is present.
This allows to still boot single-user a system with a corrupted
WAPBL on /, and so get a chance to run fsck to fix it.
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.

Revision 1.223.4.5 / (download) - annotate - [select for diffs], Wed Sep 16 13:38:07 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.223.4.4: +25 -23 lines
Diff to previous 1.223.4.4 (colored) to branchpoint 1.223 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.252 / (download) - annotate - [select for diffs], Sun Sep 13 14:30:21 2009 UTC (14 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, jym-xensuspend-nbase
Changes since 1.251: +25 -21 lines
Diff to previous 1.251 (colored) to selected 1.239.2.4 (colored)

If the WAPBL journal can't be read (ffs_wapbl_replay_start() fails),
mount the filesystem anyway if MNT_FORCE is present.
This allows to still boot single-user a system with a corrupted
WAPBL on /, and so get a chance to run fsck to fix it.
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.

Revision 1.251 / (download) - annotate - [select for diffs], Sun Sep 13 05:17:36 2009 UTC (14 years, 7 months ago) by tsutsui
Branch: MAIN
Changes since 1.250: +2 -4 lines
Diff to previous 1.250 (colored) to selected 1.239.2.4 (colored)

Move declaration of ufs_hashlock into <ufs/ufs_extern.h> from each c source.

Revision 1.223.4.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:34 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.223.4.3: +20 -17 lines
Diff to previous 1.223.4.3 (colored) to branchpoint 1.223 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.250 / (download) - annotate - [select for diffs], Fri Jul 31 20:58:50 2009 UTC (14 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.249: +10 -9 lines
Diff to previous 1.249 (colored) to selected 1.239.2.4 (colored)

Don't free extattr resources until it is certain that unmount
succeeds.  Also, "unmount system call" -> "unmount vfs operation"
in comment just so that our comments aren't 15+ years outdated.

Revision 1.241.4.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:33:03 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.241.4.1: +16 -15 lines
Diff to previous 1.241.4.1 (colored) to branchpoint 1.241 (colored) next main 1.242 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.249 / (download) - annotate - [select for diffs], Thu Jul 23 01:10:02 2009 UTC (14 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: jymxensuspend-base
Changes since 1.248: +12 -10 lines
Diff to previous 1.248 (colored) to selected 1.239.2.4 (colored)

Restore error behaviour bulldozed in rev 1.246.

might fix PR kern/41769

Revision 1.223.4.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:27 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.223.4.2: +6 -7 lines
Diff to previous 1.223.4.2 (colored) to branchpoint 1.223 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.248 / (download) - annotate - [select for diffs], Mon Jul 6 16:07:18 2009 UTC (14 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6
Changes since 1.247: +3 -3 lines
Diff to previous 1.247 (colored) to selected 1.239.2.4 (colored)

Fix bug introduced in revision 1.174 where a NULL fspec with an MNT_UPDATE
command would always return EINVAL. This broke fsck on root, where fsck'ing
a dirty root would always return an error causing rc to resort in a reboot.

Revision 1.247 / (download) - annotate - [select for diffs], Mon Jun 29 05:08:18 2009 UTC (14 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.246: +5 -6 lines
Diff to previous 1.246 (colored) to selected 1.239.2.4 (colored)

Convert 67 namei call sites to use namei_simple, in these functions:

check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.

Revision 1.241.4.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:06 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.241: +222 -196 lines
Diff to previous 1.241 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

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

Revision 1.223.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:37 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.223.4.1: +592 -276 lines
Diff to previous 1.223.4.1 (colored) to branchpoint 1.223 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.238.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:57 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.238.2.2: +51 -31 lines
Diff to previous 1.238.2.2 (colored) to branchpoint 1.238 (colored) next main 1.239 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.246 / (download) - annotate - [select for diffs], Sat Apr 25 18:53:45 2009 UTC (14 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.245: +15 -14 lines
Diff to previous 1.245 (colored) to selected 1.239.2.4 (colored)

Add genfs_can_mount() and use it to prevent some more code duplication of
the security checks when mounting a device (VOP_ACCESS() + kauth(9) call)).

Proposed with no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004859.html

The vnode is always expected to be locked, so no locking is done outside
the file-system code.

Revision 1.239.2.3 / (download) - annotate - [select for diffs], Sat Apr 4 17:38:30 2009 UTC (15 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.239.2.2: +36 -18 lines
Diff to previous 1.239.2.2 (colored) to branchpoint 1.239 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by add in ticket #655):
        sys/ufs/ffs/ffs_vfsops.c: revision 1.245 via patch
fsync:
- atime updates were not being synced.
ffs_sync:
- In some cases the sync vnode was acting like now dead /usr/sbin/update.
  It was examining vnodes that it should have ignored.
- It would find dirty inodes and try to flush them. Often ffs_fsync()
  cheerfully ignored the flush request due to the fsync bug. Such inodes
  remained dirty and were repeatedly re-examined by the syncer until
  vnode reclaim or system shutdown.
- We were marking our place in the per-mount vnode list even though in
  most cases there was not flush to perform. While not a bug, this wasted
  CPU cycles because a TAILQ_NEXT would have sufficed.

Revision 1.245 / (download) - annotate - [select for diffs], Sun Mar 29 10:29:00 2009 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.244: +36 -18 lines
Diff to previous 1.244 (colored) to selected 1.239.2.4 (colored)

fsync:

- atime updates were not being synced.

ffs_sync:

- In some cases the sync vnode was acting like now dead /usr/sbin/update.
  It was examining vnodes that it should have ignored.

- It would find dirty inodes and try to flush them. Often ffs_fsync()
  cheerfully ignored the flush request due to the fsync bug. Such inodes
  remained dirty and were repeatedly re-examined by the syncer until
  vnode reclaim or system shutdown.

- We were marking our place in the per-mount vnode list even though in
  most cases there was not flush to perform. While not a bug, this wasted
  CPU cycles because a TAILQ_NEXT would have sufficed.

Revision 1.239.2.2 / (download) - annotate - [select for diffs], Fri Mar 27 17:18:17 2009 UTC (15 years ago) by msaitoh
Branch: netbsd-5
Changes since 1.239.2.1: +4 -3 lines
Diff to previous 1.239.2.1 (colored) to branchpoint 1.239 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by ad in ticket #600):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.244
ffs_sync: ensure that we *do* flush atime updates periodically.
ffs_update() was eating the flag.

Revision 1.244 / (download) - annotate - [select for diffs], Sat Mar 21 14:35:48 2009 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.243: +4 -3 lines
Diff to previous 1.243 (colored) to selected 1.239.2.4 (colored)

ffs_sync: ensure that we *do* flush atime updates periodically.
ffs_update() was eating the flag.

Revision 1.238.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:34:39 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.238.2.1: +178 -172 lines
Diff to previous 1.238.2.1 (colored) to branchpoint 1.238 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.239.2.1 / (download) - annotate - [select for diffs], Tue Feb 24 04:13:35 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC3
Changes since 1.239: +168 -6 lines
Diff to previous 1.239 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by ad in ticket #490):
	sys/kern/vfs_wapbl.c: revision 1.23
	sys/miscfs/syncfs/sync_subr.c: revision 1.36
	sys/miscfs/syncfs/sync_vnops.c: revision 1.26
	sys/ufs/ffs/ffs_alloc.c: revision 1.121
	sys/ufs/ffs/ffs_vfsops.c: revision 1.242
	sys/ufs/ffs/ffs_vnops.c: revision 1.110
PR kern/39564 wapbl performance issues with disk cache flushing
PR kern/40361 WAPBL locking panic in -current
PR kern/40361 WAPBL locking panic in -current
PR kern/40470 WAPBL corrupts ext2fs
PR kern/40562 busy loop in ffs_sync when unmounting a file system
PR kern/40525 panic: ffs_valloc: dup alloc
- A fix for an issue that can lead to "ffs_valloc: dup" due to dirty cg
  buffers being invalidated. Problem discovered and patch by dholland@.
- If the syncer fails to lazily sync a vnode due to lock contention,
  retry 1 second later instead of 30 seconds later.
- Flush inode atime updates every ~10 seconds (this makes most sense with
  logging). Presently they didn't hit the disk for read-only files or
  devices until the file system was unmounted. It would be better to trickle
  the updates out but that would require more extensive changes.
- Fix issues with file system corruption, busy looping and other nasty
  problems when logging and non-logging file systems are intermixed,
  with one being the root file system.
- For logging, do not flush metadata on an inode-at-a-time basis if the sync
  has been requested by ioflush. Previously, we could try hundreds of log
  sync operations a second due to inode update activity, causing the syncer
  to fall behind and metadata updates to be serialized across the entire
  file system. Instead, burst out metadata and log flushes at a minimum
  interval of every 10 seconds on an active file system (happens more often
  if the log becomes full). Note this does not change the operation of
  fsync() etc.
- With the flush issue fixed, re-enable concurrent metadata updates in
  vfs_wapbl.c.

Revision 1.243 / (download) - annotate - [select for diffs], Sun Feb 22 20:28:06 2009 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.242: +25 -181 lines
Diff to previous 1.242 (colored) to selected 1.239.2.4 (colored)

PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.

Revision 1.242 / (download) - annotate - [select for diffs], Sun Feb 22 20:10:25 2009 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.241: +168 -6 lines
Diff to previous 1.241 (colored) to selected 1.239.2.4 (colored)

PR kern/39564 wapbl performance issues with disk cache flushing
PR kern/40361 WAPBL locking panic in -current
PR kern/40361 WAPBL locking panic in -current
PR kern/40470 WAPBL corrupts ext2fs
PR kern/40562 busy loop in ffs_sync when unmounting a file system
PR kern/40525 panic: ffs_valloc: dup alloc

- A fix for an issue that can lead to "ffs_valloc: dup" due to dirty cg
  buffers being invalidated. Problem discovered and patch by dholland@.

- If the syncer fails to lazily sync a vnode due to lock contention,
  retry 1 second later instead of 30 seconds later.

- Flush inode atime updates every ~10 seconds (this makes most sense with
  logging). Presently they didn't hit the disk for read-only files or
  devices until the file system was unmounted. It would be better to trickle
  the updates out but that would require more extensive changes.

- Fix issues with file system corruption, busy looping and other nasty
  problems when logging and non-logging file systems are intermixed,
  with one being the root file system.

- For logging, do not flush metadata on an inode-at-a-time basis if the sync
  has been requested by ioflush. Previously, we could try hundreds of log
  sync operations a second due to inode update activity, causing the syncer
  to fall behind and metadata updates to be serialized across the entire
  file system. Instead, burst out metadata and log flushes at a minimum
  interval of every 10 seconds on an active file system (happens more often
  if the log becomes full). Note this does not change the operation of
  fsync() etc.

- With the flush issue fixed, re-enable concurrent metadata updates in
  vfs_wapbl.c.

Revision 1.238.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:32 2009 UTC (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.238: +5 -5 lines
Diff to previous 1.238 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.222.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:42 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.222.6.4: +4 -4 lines
Diff to previous 1.222.6.4 (colored) to branchpoint 1.222 (colored) next main 1.223 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.230.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:41 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.230.2.1: +5 -5 lines
Diff to previous 1.230.2.1 (colored) to branchpoint 1.230 (colored) next main 1.231 (colored) to selected 1.239.2.4 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.241 / (download) - annotate - [select for diffs], Thu Nov 13 11:09:45 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.240: +3 -2 lines
Diff to previous 1.240 (colored) to selected 1.239.2.4 (colored)

Remove #ifdef LFS from the ufs code.

Revision 1.240 / (download) - annotate - [select for diffs], Mon Nov 10 20:12:13 2008 UTC (15 years, 5 months ago) by joerg
Branch: MAIN
Changes since 1.239: +3 -4 lines
Diff to previous 1.239 (colored) to selected 1.239.2.4 (colored)

Reduce internals of WAPBL exposed to the rest of the system.

Revision 1.239 / (download) - annotate - [select for diffs], Thu Oct 30 17:03:09 2008 UTC (15 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC2, netbsd-5-0-RC1
Branch point for: netbsd-5
Changes since 1.238: +3 -3 lines
Diff to previous 1.238 (colored) to selected 1.239.2.4 (colored)

Fix indentation.

Revision 1.230.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:18:10 2008 UTC (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.230: +322 -46 lines
Diff to previous 1.230 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.226.2.3 / (download) - annotate - [select for diffs], Fri Oct 10 22:37:10 2008 UTC (15 years, 6 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.226.2.2: +3 -8 lines
Diff to previous 1.226.2.2 (colored) next main 1.227 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.238 / (download) - annotate - [select for diffs], Fri Oct 10 09:21:58 2008 UTC (15 years, 6 months ago) by hannken
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap
Changes since 1.237: +3 -3 lines
Diff to previous 1.237 (colored) to selected 1.239.2.4 (colored)

Break a deadlock where one thread has a wapbl transaction, calls VOP_GETPAGES
and wants to busy a page  while  another thread calls VOP_PUTPAGES on the same
vnode, takes pages busy and wants to start a wapbl transaction.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>

Revision 1.222.6.4 / (download) - annotate - [select for diffs], Sun Sep 28 10:41:06 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.222.6.3: +321 -45 lines
Diff to previous 1.222.6.3 (colored) to branchpoint 1.222 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.237 / (download) - annotate - [select for diffs], Tue Sep 23 15:27:59 2008 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.236: +2 -7 lines
Diff to previous 1.236 (colored) to selected 1.239.2.4 (colored)

Remove some of my debugging code which was not meant to be committed
in the wapbl merge.

Revision 1.236 / (download) - annotate - [select for diffs], Sun Sep 21 23:22:00 2008 UTC (15 years, 7 months ago) by freza
Branch: MAIN
Changes since 1.235: +7 -7 lines
Diff to previous 1.235 (colored) to selected 1.239.2.4 (colored)

Revert previous, pooka@ points out it's wrong.

Revision 1.235 / (download) - annotate - [select for diffs], Sun Sep 21 21:08:22 2008 UTC (15 years, 7 months ago) by freza
Branch: MAIN
Changes since 1.234: +7 -7 lines
Diff to previous 1.234 (colored) to selected 1.239.2.4 (colored)

WAPBL: in '%s: replaying log to disk' message use the path we're
    trying to mount on instead of the misleading last-mounted-on
    path. Reported by jmcneill.

Revision 1.226.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:05 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.226.2.1: +394 -103 lines
Diff to previous 1.226.2.1 (colored) to selected 1.239.2.4 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.234 / (download) - annotate - [select for diffs], Fri Aug 22 10:48:22 2008 UTC (15 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.233: +3 -11 lines
Diff to previous 1.233 (colored) to selected 1.239.2.4 (colored)

Add snapshot support for logging ffs file systems.

- Add UFS_WAPBL_BEGIN() / UFS_WAPBL_END() where needed.

- Expunge WAPBL log inodes from snapshots.

- Ffs_copyonwrite() and ffs_snapblkfree() must run inside a WAPBL transaction.

- Add ffs_gop_write() as a wrapper around genfs_gop_write() that makes sure
  genfs_gop_write() gets always called inside a WAPBL transaction.

- Add VOP_PUTPAGES() flag PGO_JOURNALLOCKED to tag calls to VOP_PUTPAGES()
  inside a WAPBL transaction.

Reviewed by: Simon Burge <simonb@netbsd.org>,  Greg Oster <oster@netbsd.org>

PGO_JOURNALLOCKED / ffs_gop_write() part presented on tech-kern@.

Revision 1.233 / (download) - annotate - [select for diffs], Fri Aug 15 17:32:32 2008 UTC (15 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.232: +6 -2 lines
Diff to previous 1.232 (colored) to selected 1.239.2.4 (colored)

ffs_suspendctl: make sure everything is on disk and the on disk log is empty.

Revision 1.232 / (download) - annotate - [select for diffs], Thu Jul 31 15:37:56 2008 UTC (15 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.231: +12 -5 lines
Diff to previous 1.231 (colored) to selected 1.239.2.4 (colored)

Ffs snapshots don't work (yet) with WAPBL:
- no snapshot creation on logging file systems.
- refuse to mount logging file systems with persistent snapshots.

Ok: Simon Burge <simonb@netbsd.org>

Revision 1.231 / (download) - annotate - [select for diffs], Thu Jul 31 05:38:06 2008 UTC (15 years, 8 months ago) by simonb
Branch: MAIN
Changes since 1.230: +324 -46 lines
Diff to previous 1.230 (colored) to selected 1.239.2.4 (colored)

Merge the simonb-wapbl branch.  From the original branch commit:

   Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.

Revision 1.229.2.7 / (download) - annotate - [select for diffs], Mon Jul 28 12:40:06 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.229.2.6: +12 -5 lines
Diff to previous 1.229.2.6 (colored) to branchpoint 1.229 (colored) next main 1.230 (colored) to selected 1.239.2.4 (colored)

Add support for creating a WAPBL log in the filesystem.  Will
create an in-filesystem log on first "mount -o log" if one doesn't
exist, and will then continue to use same log in the future.  See
(soon to be added) wapbl(4) for more info.

Adds a new B_CONTIG low-level allocation flag that uses hints in
"struct ffs_inode_ext" to lay out an ffs file's data contiguously.

Thanks to Greg Oster for helping with the design of this and to
Antti Kantee for code review and suggestions.

Revision 1.229.2.6 / (download) - annotate - [select for diffs], Thu Jul 3 18:38:24 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.229.2.5: +68 -58 lines
Diff to previous 1.229.2.5 (colored) to branchpoint 1.229 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.229.2.5 / (download) - annotate - [select for diffs], Mon Jun 30 03:59:22 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.229.2.4: +4 -2 lines
Diff to previous 1.229.2.4 (colored) to branchpoint 1.229 (colored) to selected 1.239.2.4 (colored)

During mount, mark the filesystem as clean once we've replayed the
journal.

With much help from Greg Oster.

Revision 1.222.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:21 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.222.6.2: +66 -56 lines
Diff to previous 1.222.6.2 (colored) to branchpoint 1.222 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.230 / (download) - annotate - [select for diffs], Sat Jun 28 01:34:05 2008 UTC (15 years, 9 months ago) by rumble
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.229: +68 -58 lines
Diff to previous 1.229 (colored) to selected 1.239.2.4 (colored)

Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.

Revision 1.226.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:05 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.226: +37 -17 lines
Diff to previous 1.226 (colored) to selected 1.239.2.4 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.229.2.4 / (download) - annotate - [select for diffs], Thu Jun 12 08:39:22 2008 UTC (15 years, 10 months ago) by martin
Branch: simonb-wapbl
Changes since 1.229.2.3: +2 -9 lines
Diff to previous 1.229.2.3 (colored) to branchpoint 1.229 (colored) to selected 1.239.2.4 (colored)

License police

Revision 1.229.2.3 / (download) - annotate - [select for diffs], Wed Jun 11 12:30:47 2008 UTC (15 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.229.2.2: +8 -8 lines
Diff to previous 1.229.2.2 (colored) to branchpoint 1.229 (colored) to selected 1.239.2.4 (colored)

Fix some whitespace and long line niggles.

Revision 1.229.2.2 / (download) - annotate - [select for diffs], Wed Jun 11 12:20:59 2008 UTC (15 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.229.2.1: +10 -3 lines
Diff to previous 1.229.2.1 (colored) to branchpoint 1.229 (colored) to selected 1.239.2.4 (colored)

Comment out the behaviour change that requires "mount -f ..." to mount
a dirty filesystem.

Revision 1.229.2.1 / (download) - annotate - [select for diffs], Tue Jun 10 14:51:23 2008 UTC (15 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.229: +308 -39 lines
Diff to previous 1.229 (colored) to selected 1.239.2.4 (colored)

Initial commit of Wasabi System's WAPBL (Write Ahead Physical Block
Logging) journaling code.  Originally written by Darrin B. Jewell
while at Wasabi and updated to -current by Antti Kantee, Andy Doran,
Greg Oster and Simon Burge.

Still a number of issues - look in doc/BRANCHES for "simonb-wapbl"
for more info.

Revision 1.222.6.2 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:37 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.222.6.1: +9 -5 lines
Diff to previous 1.222.6.1 (colored) to branchpoint 1.222 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Also fix build.

Revision 1.223.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:53 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.223.2.1: +11 -7 lines
Diff to previous 1.223.2.1 (colored) to branchpoint 1.223 (colored) next main 1.224 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.229 / (download) - annotate - [select for diffs], Tue Jun 3 09:47:49 2008 UTC (15 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.228: +11 -7 lines
Diff to previous 1.228 (colored) to selected 1.239.2.4 (colored)

ufs/ffs: replace calls to getblk() with ffs_getblk().  Now all buffers
have been run through copy-on-write and async mounts work again.

Fixes PR kern/38820

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.222.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:35 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.222: +35 -16 lines
Diff to previous 1.222 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.223.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:55 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.223: +31 -14 lines
Diff to previous 1.223 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.228 / (download) - annotate - [select for diffs], Fri May 16 09:22:00 2008 UTC (15 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pf42-base2, hpcarm-cleanup-nbase
Changes since 1.227: +11 -11 lines
Diff to previous 1.227 (colored) to selected 1.239.2.4 (colored)

Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write.  Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn().  If set the caller
  intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
  may clear the buffer and runs copy-on-write.  Process possible errors
  from getblk() or fscow_run().  Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.223.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:26:00 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.223: +22 -5 lines
Diff to previous 1.223 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.227 / (download) - annotate - [select for diffs], Sat May 10 02:26:10 2008 UTC (15 years, 11 months ago) by rumble
Branch: MAIN
CVS Tags: yamt-nfs-mp-base2
Changes since 1.226: +19 -3 lines
Diff to previous 1.226 (colored) to selected 1.239.2.4 (colored)

Convert file systems to dynamically attach with the new module interface.
Make VFS hooks dynamic while we're here and say farewell to VFS_ATTACH and
VFS_HOOKS_ATTACH linksets.

As a consequence, most of the file systems can now be loaded as new style
modules.

Quick sanity check by ad@.

Revision 1.226 / (download) - annotate - [select for diffs], Tue May 6 18:43:45 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.225: +3 -4 lines
Diff to previous 1.225 (colored) to selected 1.239.2.4 (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.225 / (download) - annotate - [select for diffs], Wed Apr 30 12:49:17 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.224: +6 -5 lines
Diff to previous 1.224 (colored) to selected 1.239.2.4 (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.224 / (download) - annotate - [select for diffs], Tue Apr 29 18:18:09 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.223: +3 -2 lines
Diff to previous 1.223 (colored) to selected 1.239.2.4 (colored)

PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

Introduce VFS_FSYNC() and call it when syncing a block device, if it
has a mounted file system.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Apr 17 09:52:47 2008 UTC (16 years ago) by hannken
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.222: +6 -4 lines
Diff to previous 1.222 (colored) to selected 1.239.2.4 (colored)

Replace get/setspecific with a void pointer in struct ufsmount.  Use explicit
initialization/finalization of snapshot private data on creation/deletion
of struct ufsmount.
Snapshot mounts no longer may fail silently because kmem_alloc() fails.

Welcome to 4.99.60

Ok: Andrew Doran <ad@netbsd.org>

Revision 1.208.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:12 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.208.2.2: +24 -27 lines
Diff to previous 1.208.2.2 (colored) to branchpoint 1.208 (colored) next main 1.209 (colored) to selected 1.239.2.4 (colored)

sync with HEAD

Revision 1.210.4.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:28 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.210.4.2: +107 -81 lines
Diff to previous 1.210.4.2 (colored) to branchpoint 1.210 (colored) next main 1.211 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.165.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:25:03 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165.2.7: +9 -25 lines
Diff to previous 1.165.2.7 (colored) next main 1.166 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.222 / (download) - annotate - [select for diffs], Wed Jan 30 11:47:04 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: 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: mjf-devfs2
Changes since 1.221: +4 -5 lines
Diff to previous 1.221 (colored) to selected 1.239.2.4 (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.221 / (download) - annotate - [select for diffs], Mon Jan 28 14:31:20 2008 UTC (16 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.220: +5 -2 lines
Diff to previous 1.220 (colored) to selected 1.239.2.4 (colored)

Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.

Revision 1.220 / (download) - annotate - [select for diffs], Fri Jan 25 10:49:32 2008 UTC (16 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.219: +4 -9 lines
Diff to previous 1.219 (colored) to selected 1.239.2.4 (colored)

Destroy extattr lock when destroying extattrs associated with the
mountpoint.  Make stopping extattrs always succesful to facilitate
always being able to free resources.

Revision 1.219 / (download) - annotate - [select for diffs], Thu Jan 24 17:32:57 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.218: +2 -15 lines
Diff to previous 1.218 (colored) to selected 1.239.2.4 (colored)

specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.

Revision 1.165.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:48:08 2008 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165.2.6: +107 -60 lines
Diff to previous 1.165.2.6 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.212.4.3 / (download) - annotate - [select for diffs], Thu Jan 10 23:44:43 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.212.4.2: +15 -2 lines
Diff to previous 1.212.4.2 (colored) to branchpoint 1.212 (colored) next main 1.213 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.218 / (download) - annotate - [select for diffs], Wed Jan 9 18:20:54 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.217: +17 -4 lines
Diff to previous 1.217 (colored) to selected 1.239.2.4 (colored)

Fix hangs on 'biolock' when creating a directory under / with softdep.

Revision 1.208.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:27 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.208.2.1: +117 -82 lines
Diff to previous 1.208.2.1 (colored) to branchpoint 1.208 (colored) to selected 1.239.2.4 (colored)

sync with HEAD

Revision 1.212.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:12:02 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.212.4.1: +26 -20 lines
Diff to previous 1.212.4.1 (colored) to branchpoint 1.212 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.217 / (download) - annotate - [select for diffs], Mon Jan 7 16:56:27 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.216: +6 -2 lines
Diff to previous 1.216 (colored) to selected 1.239.2.4 (colored)

Fix 'panic: softdep_update_inodeblock: update failed'.

Revision 1.216 / (download) - annotate - [select for diffs], Thu Jan 3 19:28:49 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.215: +20 -18 lines
Diff to previous 1.215 (colored) to selected 1.239.2.4 (colored)

Use pool_cache.

Revision 1.215 / (download) - annotate - [select for diffs], Thu Jan 3 01:26:32 2008 UTC (16 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.214: +6 -6 lines
Diff to previous 1.214 (colored) to selected 1.239.2.4 (colored)

valloc -> vnalloc, vfree -> vnfree
Avoids collision with userland valloc(3).

no functional change
ad ok

Revision 1.212.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:58:19 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.212: +70 -42 lines
Diff to previous 1.212 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.214 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:09 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.213: +64 -41 lines
Diff to previous 1.213 (colored) to selected 1.239.2.4 (colored)

Merge vmlocking2 to head.

Revision 1.210.4.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:49 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.210.4.1: +9 -4 lines
Diff to previous 1.210.4.1 (colored) to branchpoint 1.210 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.211.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:40:00 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.211.2.1: +9 -4 lines
Diff to previous 1.211.2.1 (colored) to branchpoint 1.211 (colored) next main 1.212 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.213 / (download) - annotate - [select for diffs], Thu Dec 20 16:18:57 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.212: +8 -3 lines
Diff to previous 1.212 (colored) to selected 1.239.2.4 (colored)

Call genfs_node_init a little earlier to avoid a vput()ing an
uninitialized node, later, which leads to a kernel panic.  Patch
by Antti Kantee.

Revision 1.207.2.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:53 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.207.2.3: +3 -3 lines
Diff to previous 1.207.2.3 (colored) to branchpoint 1.207 (colored) next main 1.208 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.212 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:55 2007 UTC (16 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.211: +3 -3 lines
Diff to previous 1.211 (colored) to selected 1.239.2.4 (colored)

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.

Revision 1.210.4.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:39 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.210: +26 -25 lines
Diff to previous 1.210 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.165.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:35:20 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165.2.5: +26 -25 lines
Diff to previous 1.165.2.5 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.211.2.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:03:47 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.211: +64 -41 lines
Diff to previous 1.211 (colored) to selected 1.239.2.4 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.207.2.3 / (download) - annotate - [select for diffs], Tue Nov 27 19:39:23 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.207.2.2: +26 -25 lines
Diff to previous 1.207.2.2 (colored) to branchpoint 1.207 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:29 2007 UTC (16 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.210: +26 -25 lines
Diff to previous 1.210 (colored) to selected 1.239.2.4 (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.196.6.22 / (download) - annotate - [select for diffs], Sun Nov 11 14:48:06 2007 UTC (16 years, 5 months ago) by hannken
Branch: vmlocking
Changes since 1.196.6.21: +8 -3 lines
Diff to previous 1.196.6.21 (colored) to branchpoint 1.196 (colored) next main 1.197 (colored) to selected 1.239.2.4 (colored)

Add fstrans_mount() to explicitly allocate fstrans_info.
Replace remaining malloc() to kmem_alloc() in vfs_trans.c.

Ok: Andrew Doran <ad@netbsd.org>

Revision 1.208.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:35:13 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.208: +39 -28 lines
Diff to previous 1.208 (colored) to selected 1.239.2.4 (colored)

sync with HEAD

Revision 1.165.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:43 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165.2.4: +39 -28 lines
Diff to previous 1.165.2.4 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.207.2.2 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:31 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.207.2.1: +39 -28 lines
Diff to previous 1.207.2.1 (colored) to branchpoint 1.207 (colored) to selected 1.239.2.4 (colored)

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.

Revision 1.196.6.21 / (download) - annotate - [select for diffs], Thu Oct 25 20:52:18 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.20: +13 -12 lines
Diff to previous 1.196.6.20 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Fix up mnt_vnodelist handling.

Revision 1.196.6.20 / (download) - annotate - [select for diffs], Tue Oct 23 20:17:30 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.19: +3 -3 lines
Diff to previous 1.196.6.19 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.208.4.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:49:16 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.208: +39 -28 lines
Diff to previous 1.208 (colored) next main 1.209 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.210 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:34 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.209: +6 -6 lines
Diff to previous 1.209 (colored) to selected 1.239.2.4 (colored)

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.

Revision 1.196.6.19 / (download) - annotate - [select for diffs], Mon Oct 8 20:31:13 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.18: +3 -2 lines
Diff to previous 1.196.6.18 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Call fstrans_unmount().

Revision 1.209 / (download) - annotate - [select for diffs], Mon Oct 8 18:01:29 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.208: +35 -24 lines
Diff to previous 1.208 (colored) to selected 1.239.2.4 (colored)

Merge ffs locking & brelse changes from the vmlocking branch.

Revision 1.196.6.18 / (download) - annotate - [select for diffs], Sun Sep 16 19:02:47 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.17: +28 -13 lines
Diff to previous 1.196.6.17 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

- Checkpoint work in progress on the vnode lifecycle and reference counting
  stuff. This makes it work properly without kernel_lock and fixes a few
  quite old bugs. See vfs_subr.c 1.283.2.17 for details.

- Fix some problems with softdep. Unfortunately our softdep code appears
  to have some longstanding bugs that cause it fail under stress test.

Revision 1.165.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:46:49 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165.2.3: +40 -54 lines
Diff to previous 1.165.2.3 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.190.4.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:05:18 2007 UTC (16 years, 7 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.190: +5 -5 lines
Diff to previous 1.190 (colored) next main 1.191 (colored) to selected 1.239.2.4 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.196.6.17 / (download) - annotate - [select for diffs], Thu Aug 30 20:08:57 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.16: +8 -3 lines
Diff to previous 1.196.6.16 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

- Mark ffs MPSAFE. There are still a few minor problems and I'm not yet
  sure about the snapshot code, but by and large it's there.
- Grap ump->um_lock in a few more places.

Revision 1.196.6.16 / (download) - annotate - [select for diffs], Tue Aug 28 22:07:23 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.15: +2 -3 lines
Diff to previous 1.196.6.15 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Revert accidental change (mp->mnt_iflag |= IMNT_MPSAFE).

Revision 1.196.6.15 / (download) - annotate - [select for diffs], Fri Aug 24 23:28:45 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.14: +7 -6 lines
Diff to previous 1.196.6.14 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with buffer cache locking changes. See buf.h/vfs_bio.c for details.
Some minor portions are incomplete and needs to be verified as a whole.

Revision 1.196.6.14 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:25 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.13: +11 -9 lines
Diff to previous 1.196.6.13 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.196.6.13 / (download) - annotate - [select for diffs], Mon Aug 20 03:22:44 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.12: +3 -2 lines
Diff to previous 1.196.6.12 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

softdep locking improvements. It hangs looping in flush_inodedep_deps(),
more work required.

Revision 1.207.2.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:04:00 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.207: +4 -3 lines
Diff to previous 1.207 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.205.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:51:10 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.205: +10 -8 lines
Diff to previous 1.205 (colored) next main 1.206 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.208 / (download) - annotate - [select for diffs], Thu Aug 9 07:34:28 2007 UTC (16 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.207: +4 -3 lines
Diff to previous 1.207 (colored) to selected 1.239.2.4 (colored)

Move snapshot per-mount data from struct ufsmount to mount specific data.
No functional changes.

Welcome to 4.99.28  (struct ufsmount changed size)

Revision 1.207.4.2 / (download) - annotate - [select for diffs], Tue Jul 31 21:14:21 2007 UTC (16 years, 8 months ago) by pooka
Branch: matt-mips64
Changes since 1.207.4.1: +1787 -0 lines
Diff to previous 1.207.4.1 (colored) to branchpoint 1.207 (colored) next main 1.208 (colored) to selected 1.239.2.4 (colored)

* nuke the nameidata parameter from VFS_MOUNT().  Nobody on tech-kern
  knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods

Revision 1.207.4.1, Tue Jul 31 21:14:20 2007 UTC (16 years, 8 months ago) by pooka
Branch: matt-mips64
Changes since 1.207: +0 -1787 lines
FILE REMOVED

file ffs_vfsops.c was added on branch matt-mips64 on 2007-07-31 21:14:21 +0000

Revision 1.207 / (download) - annotate - [select for diffs], Tue Jul 31 21:14:20 2007 UTC (16 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.206: +7 -6 lines
Diff to previous 1.206 (colored) to selected 1.239.2.4 (colored)

* nuke the nameidata parameter from VFS_MOUNT().  Nobody on tech-kern
  knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods

Revision 1.196.6.12 / (download) - annotate - [select for diffs], Sun Jul 29 11:37:12 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.11: +3 -3 lines
Diff to previous 1.196.6.11 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Add vfs_destroy() to free mount structures. The specificdata_ref was being
leaked.

Revision 1.206 / (download) - annotate - [select for diffs], Fri Jul 20 16:46:45 2007 UTC (16 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: hpcarm-cleanup
Changes since 1.205: +3 -3 lines
Diff to previous 1.205 (colored) to selected 1.239.2.4 (colored)

In sync, skip over vnodes based on if they are clean rather than
if they have pages.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Jul 17 11:19:39 2007 UTC (16 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: nick-csl-alignment-base
Branch point for: nick-csl-alignment
Changes since 1.204: +3 -3 lines
Diff to previous 1.204 (colored) to selected 1.239.2.4 (colored)

Make set_statvfs_info() take a parameter for the vfs name instead
of always retrieving it from mp->mnt_op->vfs_name

christos ok

Revision 1.196.6.11 / (download) - annotate - [select for diffs], Sun Jul 15 13:28:16 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.10: +20 -30 lines
Diff to previous 1.196.6.10 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.204 / (download) - annotate - [select for diffs], Thu Jul 12 19:35:36 2007 UTC (16 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.203: +16 -14 lines
Diff to previous 1.203 (colored) to selected 1.239.2.4 (colored)

Change the VFS_MOUNT() interface so that the 'data' buffer passed to the
fs code is a kernel buffer, pass though the length of the buffer as well.
Since the length of the userspace buffer isn'it (yet) passed through the mount
system call, add a field to the vfsops structure containing the default length.
Split sys_mount() for calls from compat code.
Ride one of the recent kernel version changes - old fs LKMs will load, but
sys_mount() will reject any attempt to use them.

Revision 1.197.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:43 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.197: +15 -33 lines
Diff to previous 1.197 (colored) next main 1.198 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.203 / (download) - annotate - [select for diffs], Tue Jul 10 09:50:08 2007 UTC (16 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: mjf-ufs-trans-base
Changes since 1.202: +3 -8 lines
Diff to previous 1.202 (colored) to selected 1.239.2.4 (colored)

Move `struct dquot' and its supporting functions from quota.h to ufs_quota.c.

- Make quota-internal functions static.
- Clean up declarations in quota.h and ufs_extern.h.  quota.h now has the
  description of quota criterions, on-disk structure, user-kernel interface and
  declaration of init/done functions.  All ufs quota related function
  prototypes go to ufs_extern.h.
- New functions ufsquota_init() and ufsquota_free() create or destroy the
  quota fields of `struct inode'.
- chkdq() and chkiq() always update the quota fields of `struct inode' first.
- Only ufs_access() explicitely calls getinoquota().

No objections on tech-kern@

Revision 1.202 / (download) - annotate - [select for diffs], Sat Jun 30 09:37:53 2007 UTC (16 years, 9 months ago) by pooka
Branch: MAIN
Changes since 1.201: +5 -12 lines
Diff to previous 1.201 (colored) to selected 1.239.2.4 (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.196.6.10 / (download) - annotate - [select for diffs], Sun Jun 17 21:32:09 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.9: +4 -4 lines
Diff to previous 1.196.6.9 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

- 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.

Revision 1.196.6.9 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:19 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.8: +10 -9 lines
Diff to previous 1.196.6.8 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.196.6.8 / (download) - annotate - [select for diffs], Fri Jun 8 14:18:16 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.7: +3 -4 lines
Diff to previous 1.196.6.7 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.190.2.1 / (download) - annotate - [select for diffs], Mon Jun 4 19:51:54 2007 UTC (16 years, 10 months ago) by riz
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-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, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.190: +5 -5 lines
Diff to previous 1.190 (colored) next main 1.191 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #686):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.201
Fix inconsistent changes in rev 1.153 and 1.154:
Adjust fs->fs_maxfilesize instead of ump->um_maxfilesize
in ffs_oldfscompat_read() because the latter is overrided
by the former after ffs_oldfscompat_read() returned.
Fixes EFBIG errors on read(2) and "exec /sbin/init: error 8"
problem on mac68k after mountroot() on old 4.3BSD UFS created
by the Mkfs tool for MacOS (reported and confirmed on port-mac68k).

Revision 1.162.2.3 / (download) - annotate - [select for diffs], Wed May 30 20:37:05 2007 UTC (16 years, 10 months ago) by bouyer
Branch: netbsd-3
Changes since 1.162.2.2: +3 -3 lines
Diff to previous 1.162.2.2 (colored) to branchpoint 1.162 (colored) next main 1.163 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #1798):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.201
Fix inconsistent changes in rev 1.153 and 1.154:
Adjust fs->fs_maxfilesize instead of ump->um_maxfilesize
in ffs_oldfscompat_read() because the latter is overrided
by the former after ffs_oldfscompat_read() returned.
Fixes EFBIG errors on read(2) and "exec /sbin/init: error 8"
problem on mac68k after mountroot() on old 4.3BSD UFS created
by the Mkfs tool for MacOS (reported and confirmed on port-mac68k).

Revision 1.201 / (download) - annotate - [select for diffs], Tue May 29 11:30:17 2007 UTC (16 years, 10 months ago) by tsutsui
Branch: MAIN
Changes since 1.200: +5 -5 lines
Diff to previous 1.200 (colored) to selected 1.239.2.4 (colored)

Fix inconsistent changes in rev 1.153 and 1.154:
Adjust fs->fs_maxfilesize instead of ump->um_maxfilesize
in ffs_oldfscompat_read() because the latter is overrided
by the former after ffs_oldfscompat_read() returned.

Fixes EFBIG errors on read(2) and "exec /sbin/init: error 8"
problem on mac68k after mountroot() on old 4.3BSD UFS created
by the Mkfs tool for MacOS (reported and confirmed on port-mac68k).

Revision 1.200 / (download) - annotate - [select for diffs], Mon May 28 23:42:56 2007 UTC (16 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.199: +7 -6 lines
Diff to previous 1.199 (colored) to selected 1.239.2.4 (colored)

Fix lock order inversion between vnode locks and ufs_hashlock. Addresses
kern/36331 (MP deadlock between ufs_ihashget() and VOP_LOOKUP()) for ffs,
other file systems to follow. Reported by perseant@, debugged by Sverre
Froyen, patch posted/tested by Blair Sadewitz.

Revision 1.196.6.7 / (download) - annotate - [select for diffs], Sun May 27 00:14:03 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.6: +7 -7 lines
Diff to previous 1.196.6.6 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

ffs_sync: vp->v_data can be NULL if the vnode is being recycled.

Revision 1.196.2.3 / (download) - annotate - [select for diffs], Thu May 17 13:41:57 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.196.2.2: +3 -4 lines
Diff to previous 1.196.2.2 (colored) to branchpoint 1.196 (colored) next main 1.197 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.199 / (download) - annotate - [select for diffs], Thu May 17 07:26:23 2007 UTC (16 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.198: +3 -4 lines
Diff to previous 1.198 (colored) to selected 1.239.2.4 (colored)

Fstrans_start() always returns zero, so change its type to void.

Revision 1.196.6.6 / (download) - annotate - [select for diffs], Sun May 13 17:36:42 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.196.6.5: +25 -24 lines
Diff to previous 1.196.6.5 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

- Pass the error number and residual count to biodone(), and let it handle
  setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
  of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
  create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.

Revision 1.196.2.2 / (download) - annotate - [select for diffs], Sun Apr 15 16:04:08 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.196.2.1: +2 -8 lines
Diff to previous 1.196.2.1 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.196.6.5 / (download) - annotate - [select for diffs], Sat Apr 14 11:38:33 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.196.6.4: +3 -3 lines
Diff to previous 1.196.6.4 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

ffs_sync: don't try to examine the inode without locking if the vnode is
being freed.

Revision 1.196.6.4 / (download) - annotate - [select for diffs], Fri Apr 13 15:47:04 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.196.6.3: +7 -2 lines
Diff to previous 1.196.6.3 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Put a per-mount lock around ffs shared data structures, excluding softdep
and quotas. Strategy lifted from FreeBSD.

Revision 1.196.6.3 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:54 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.196.6.2: +2 -8 lines
Diff to previous 1.196.6.2 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.198 / (download) - annotate - [select for diffs], Sat Apr 7 14:21:52 2007 UTC (17 years ago) by hannken
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.197: +2 -8 lines
Diff to previous 1.197 (colored) to selected 1.239.2.4 (colored)

Remove calls to now obsolete vn_start_write() and vn_finished_write().

Revision 1.196.2.1 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:16 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.196: +8 -8 lines
Diff to previous 1.196 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.196.6.2 / (download) - annotate - [select for diffs], Tue Mar 13 17:51:21 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.196.6.1: +21 -21 lines
Diff to previous 1.196.6.1 (colored) to branchpoint 1.196 (colored) to selected 1.239.2.4 (colored)

Pull in the initial set of changes for the vmlocking branch.

Revision 1.196.6.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:52:07 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.196: +8 -8 lines
Diff to previous 1.196 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.197 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:37 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.196: +8 -8 lines
Diff to previous 1.196 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.165.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:19 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165.2.2: +54 -14 lines
Diff to previous 1.165.2.2 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.196 / (download) - annotate - [select for diffs], Fri Feb 16 17:24:00 2007 UTC (17 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, vmlocking
Changes since 1.195: +2 -4 lines
Diff to previous 1.195 (colored) to selected 1.239.2.4 (colored)

Make fstrans(9) the default helper for file system suspension.
Replaces the now obsolete vn_start_write()/vn_finished_write().

Revision 1.195 / (download) - annotate - [select for diffs], Thu Feb 15 15:40:54 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.194: +12 -12 lines
Diff to previous 1.194 (colored) to selected 1.239.2.4 (colored)

Replace some uses of lockmgr() / simplelocks.

Revision 1.185.2.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:48 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.185.2.2: +42 -2 lines
Diff to previous 1.185.2.2 (colored) to branchpoint 1.185 (colored) next main 1.186 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.194 / (download) - annotate - [select for diffs], Mon Jan 29 15:42:50 2007 UTC (17 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Changes since 1.193: +8 -8 lines
Diff to previous 1.193 (colored) to selected 1.239.2.4 (colored)

Change fstrans enum types to upper case.
No functional change.

From Antti Kantee <pooka@netbsd.org>

Revision 1.193 / (download) - annotate - [select for diffs], Fri Jan 19 14:49:12 2007 UTC (17 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.192: +42 -2 lines
Diff to previous 1.192 (colored) to selected 1.239.2.4 (colored)

New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE.  This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).

Revision 1.185.2.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:25 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.185.2.1: +6 -4 lines
Diff to previous 1.185.2.1 (colored) to branchpoint 1.185 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.192 / (download) - annotate - [select for diffs], Sun Jan 7 09:33:18 2007 UTC (17 years, 3 months ago) by isaki
Branch: MAIN
Changes since 1.191: +4 -3 lines
Diff to previous 1.191 (colored) to selected 1.239.2.4 (colored)

Correct indent.

Revision 1.191 / (download) - annotate - [select for diffs], Thu Jan 4 16:55:29 2007 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.190: +4 -3 lines
Diff to previous 1.190 (colored) to selected 1.239.2.4 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.165.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:51:00 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165.2.1: +51 -29 lines
Diff to previous 1.165.2.1 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.185.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:32 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.185.4.1: +17 -7 lines
Diff to previous 1.185.4.1 (colored) to branchpoint 1.185 (colored) next main 1.186 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.185.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:49 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.185: +23 -8 lines
Diff to previous 1.185 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.190 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:53 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.189: +3 -3 lines
Diff to previous 1.189 (colored) to selected 1.239.2.4 (colored)

__unused removal on arguments; approved by core.

Revision 1.189 / (download) - annotate - [select for diffs], Wed Oct 25 22:01:55 2006 UTC (17 years, 5 months ago) by reinoud
Branch: MAIN
Changes since 1.188: +16 -6 lines
Diff to previous 1.188 (colored) to selected 1.239.2.4 (colored)

Revisit mnt_vnodelist TAILQ patch. Remove all suspicious TAILQ_FOREACH()
loops where vnodes can get removed or added during the loops. This could
lead to panic's on unmount since nodes are skipped or otherwise
TAILQ_NEXT(0xdeadbeef, ...) was dereferenced.

Revision 1.185.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:50 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.185: +16 -11 lines
Diff to previous 1.185 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.188 / (download) - annotate - [select for diffs], Fri Oct 20 18:58:12 2006 UTC (17 years, 6 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.187: +6 -8 lines
Diff to previous 1.187 (colored) to selected 1.239.2.4 (colored)

Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:51 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.186: +3 -3 lines
Diff to previous 1.186 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.186 / (download) - annotate - [select for diffs], Thu Sep 21 00:11:30 2006 UTC (17 years, 7 months ago) by jld
Branch: MAIN
Changes since 1.185: +11 -4 lines
Diff to previous 1.185 (colored) to selected 1.239.2.4 (colored)

Change ffs_mount, in MNT_UPDATE case, to check dev_t's for equality
instead of just vnode pointers.  Fixes erroneous "does not match mounted
device" errors from mount(8) in the presence of MFS /dev, init.root, &c.

No objections on tech-kern.

Revision 1.179.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 03:00:00 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.179: +37 -29 lines
Diff to previous 1.179 (colored) next main 1.180 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.180.2.4 / (download) - annotate - [select for diffs], Sun Sep 3 15:26:07 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.180.2.3: +4 -2 lines
Diff to previous 1.180.2.3 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.185 / (download) - annotate - [select for diffs], Wed Aug 30 01:30:07 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.184: +4 -2 lines
Diff to previous 1.184 (colored) to selected 1.239.2.4 (colored)

fix missing initializers

Revision 1.180.2.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:47:36 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.180.2.2: +28 -23 lines
Diff to previous 1.180.2.2 (colored) to branchpoint 1.180 (colored) to selected 1.239.2.4 (colored)

sync with head

Revision 1.184 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:15 2006 UTC (17 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.183: +8 -12 lines
Diff to previous 1.183 (colored) to selected 1.239.2.4 (colored)

Use the LWP cached credentials where sane.

Revision 1.182.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:50:13 2006 UTC (17 years, 9 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.182: +22 -13 lines
Diff to previous 1.182 (colored) next main 1.183 (colored) to selected 1.239.2.4 (colored)

Merge from HEAD.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Jul 13 12:00:26 2006 UTC (17 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.182: +22 -13 lines
Diff to previous 1.182 (colored) to selected 1.239.2.4 (colored)

Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).

Revision 1.180.2.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:54:49 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.180.2.1: +4 -4 lines
Diff to previous 1.180.2.1 (colored) to branchpoint 1.180 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.165.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:31 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.165: +132 -116 lines
Diff to previous 1.165 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.181.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:11:13 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.181: +4 -4 lines
Diff to previous 1.181 (colored) next main 1.182 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.182 / (download) - annotate - [select for diffs], Wed Jun 7 22:34:19 2006 UTC (17 years, 10 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.181: +4 -4 lines
Diff to previous 1.181 (colored) to selected 1.239.2.4 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.179.4.3 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:29 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.179.4.2: +12 -11 lines
Diff to previous 1.179.4.2 (colored) next main 1.180 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.180.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:48 2006 UTC (17 years, 11 months ago) by tron
Branch: peter-altq
Changes since 1.180: +12 -11 lines
Diff to previous 1.180 (colored) next main 1.181 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.180.2.1 / (download) - annotate - [select for diffs], Wed May 24 10:59:25 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.180: +12 -11 lines
Diff to previous 1.180 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.181 / (download) - annotate - [select for diffs], Sun May 14 21:32:45 2006 UTC (17 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.180: +12 -11 lines
Diff to previous 1.180 (colored) to selected 1.239.2.4 (colored)

integrate kauth.

Revision 1.180.4.2 / (download) - annotate - [select for diffs], Sat May 6 23:32:33 2006 UTC (17 years, 11 months ago) by christos
Branch: elad-kernelauth
Changes since 1.180.4.1: +3 -2 lines
Diff to previous 1.180.4.1 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored) to selected 1.239.2.4 (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.179.4.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:24 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.179.4.1: +3 -3 lines
Diff to previous 1.179.4.1 (colored) to selected 1.239.2.4 (colored)

Sync with head.

Revision 1.162.2.2 / (download) - annotate - [select for diffs], Fri Mar 10 13:02:08 2006 UTC (18 years, 1 month ago) by tron
Branch: netbsd-3
CVS Tags: 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
Changes since 1.162.2.1: +5 -3 lines
Diff to previous 1.162.2.1 (colored) to branchpoint 1.162 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by drochner in ticket #1189):
	sys/ufs/ffs/ffs_vfsops.c: revision 1.168
fix crash in mount error handling: don't free storage which was not
malloc'd

Revision 1.180.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 01:39:12 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.180: +11 -11 lines
Diff to previous 1.180 (colored) to selected 1.239.2.4 (colored)

Adapt to kernel authorization KPI.

Revision 1.178.2.2 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:51 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.178.2.1: +3 -3 lines
Diff to previous 1.178.2.1 (colored) next main 1.179 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.180 / (download) - annotate - [select for diffs], Tue Feb 21 04:32:39 2006 UTC (18 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored) to selected 1.239.2.4 (colored)

Use device_class() instead of accessing dv_class directly.

Revision 1.179.4.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:12:50 2006 UTC (18 years, 2 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.179: +4 -4 lines
Diff to previous 1.179 (colored) to selected 1.239.2.4 (colored)

Adapt for timecounters: mostly use get*time() and use "time_second"
instead of "time.tv_sec".

Revision 1.178.2.1 / (download) - annotate - [select for diffs], Sun Jan 15 10:03:05 2006 UTC (18 years, 3 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.178: +2 -3 lines
Diff to previous 1.178 (colored) to selected 1.239.2.4 (colored)

sync with head.

Revision 1.179 / (download) - annotate - [select for diffs], Sat Jan 14 17:41:16 2006 UTC (18 years, 3 months ago) by yamt
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.178: +2 -3 lines
Diff to previous 1.178 (colored) to selected 1.239.2.4 (colored)

- unify ffs_blkatoff and lfs_blkatoff.
- remove ufs_ops::uo_blkatoff.
- add directory read-ahead code.  (disabled for now.)

Revision 1.178 / (download) - annotate - [select for diffs], Fri Dec 23 23:20:00 2005 UTC (18 years, 3 months ago) by rpaulo
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.177: +4 -4 lines
Diff to previous 1.177 (colored) to selected 1.239.2.4 (colored)

Convert UFS_EXTATTR to struct lwp.

Revision 1.177 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:25 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.176: +47 -43 lines
Diff to previous 1.176 (colored) to selected 1.239.2.4 (colored)

merge ktrace-lwp.

Revision 1.118.2.14 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:32 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.13: +99 -87 lines
Diff to previous 1.118.2.13 (colored) next main 1.119 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD. Here we go again...

Revision 1.176 / (download) - annotate - [select for diffs], Wed Nov 2 12:39:00 2005 UTC (18 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.175: +13 -3 lines
Diff to previous 1.175 (colored) to selected 1.239.2.4 (colored)

merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.175.2.2 / (download) - annotate - [select for diffs], Sat Oct 29 17:21:12 2005 UTC (18 years, 5 months ago) by yamt
Branch: yamt-vop
Changes since 1.175.2.1: +3 -3 lines
Diff to previous 1.175.2.1 (colored) to branchpoint 1.175 (colored) next main 1.176 (colored) to selected 1.239.2.4 (colored)

use ffs_* directly rather than via ufs_ops.
suggested by Chuck Silvers.

Revision 1.175.2.1 / (download) - annotate - [select for diffs], Thu Oct 20 03:00:30 2005 UTC (18 years, 6 months ago) by yamt
Branch: yamt-vop
Changes since 1.175: +13 -3 lines
Diff to previous 1.175 (colored) to selected 1.239.2.4 (colored)

adapt ufs.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Sep 27 06:48:55 2005 UTC (18 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.174: +7 -4 lines
Diff to previous 1.174 (colored) to selected 1.239.2.4 (colored)

introduce "ufs_ops" and use it for ITIMES.

Revision 1.174 / (download) - annotate - [select for diffs], Fri Sep 23 12:10:33 2005 UTC (18 years, 7 months ago) by jmmv
Branch: MAIN
Changes since 1.173: +4 -11 lines
Diff to previous 1.173 (colored) to selected 1.239.2.4 (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.173 / (download) - annotate - [select for diffs], Thu Sep 22 14:04:29 2005 UTC (18 years, 7 months ago) by rpaulo
Branch: MAIN
Changes since 1.172: +7 -6 lines
Diff to previous 1.172 (colored) to selected 1.239.2.4 (colored)

Fix bogus if-clause introduced in previous revision.

Revision 1.172 / (download) - annotate - [select for diffs], Thu Sep 22 13:50:55 2005 UTC (18 years, 7 months ago) by rpaulo
Branch: MAIN
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored) to selected 1.239.2.4 (colored)

In ffs_unmount(), detect EOPNOTSUPP errno returned from
ufs_extattr_stop().

From FreeBSD.

Revision 1.171 / (download) - annotate - [select for diffs], Mon Sep 12 20:23:03 2005 UTC (18 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.170: +4 -2 lines
Diff to previous 1.170 (colored) to selected 1.239.2.4 (colored)

- access the ffs and ext2fs itimes functions through a pointer, so that
  if the filesystem is not compiled in the kernel still links. Probably
  a better solution is to use weak symbols.
- move the filesystem-specific itime macros to the filesystem header files.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Aug 28 19:37:59 2005 UTC (18 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.169: +47 -7 lines
Diff to previous 1.169 (colored) to selected 1.239.2.4 (colored)

Experimental support for extended attributes on UFS1 file systems, using a
backing file per attribute type indexed by inode number to hold the extended
attributes.

This is working pretty well on my test systems, except for the "autostart"
feature.  I need someone with a better handle on the VFS locking protocol
to go over that.

This is a work-in-progress.  There are parts of this that could be re-factored
allowing this approach to be used on other types of file systems.

Adapted from FreeBSD.

Revision 1.162.2.1 / (download) - annotate - [select for diffs], Wed Aug 24 18:43:37 2005 UTC (18 years, 7 months ago) by riz
Branch: netbsd-3
CVS Tags: 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
Changes since 1.162: +7 -6 lines
Diff to previous 1.162 (colored) to selected 1.239.2.4 (colored)

Pull up following revision(s) (requested by yamt in ticket #688):
	sys/miscfs/genfs/genfs_vnops.c: revision 1.98 via patch
	sys/ufs/ffs/ffs_vfsops.c: revision 1.165
	sys/ufs/lfs/lfs_extern.h: revision 1.69
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.20
	sys/nfs/nfs_node.c: revision 1.80
	sys/fs/smbfs/smbfs_node.c: revision 1.24
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.24
	sys/fs/msdosfs/msdosfs_denode.c: revision 1.8
	sys/miscfs/genfs/genfs_node.h: revision 1.6
	sys/ufs/lfs/lfs_vfsops.c: revision 1.183
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.86
	sys/fs/adosfs/advfsops.c: revision 1.23
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.31
- constify genfs_ops.
- use member designators.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.99 via patch
genfs_getpages: don't forget to put the vnode onto the syncer's work que
ue
even in the case of PGO_LOCKED.

        sys/uvm/uvm_bio.c: revision 1.40
        sys/uvm/uvm_pager.h: revision 1.29
        sys/miscfs/genfs/genfs_vnops.c: revision 1.100 via patch
        sys/ufs/ufs/ufs_inode.c: revision 1.50
- introduce PGO_NOBLOCKALLOC and use it for ubc mapping
  to prevent unnecessary block allocations in the case that
  page size > block size.
- ufs_balloc_range: use VM_PROT_WRITE+PGO_NOBLOCKALLOC rather than
  VM_PROT_READ.

        sys/uvm/uvm_fault.c: revision 1.96
        sys/miscfs/genfs/genfs_vnops.c: revision 1.101 via patch
        sys/uvm/uvm_object.h: revision 1.19
        sys/miscfs/genfs/genfs_node.h: revision 1.7
ensure that vnodes with dirty pages are always on syncer's queue.
- genfs_putpages: wait for i/o completion of PG_RELEASED/PG_PAGEOUT pages by
  setting "wasclean" false when encountering them.
  suggested by Stephan Uphoff in PR/24596 (1).
- genfs_putpages: write protect pages when cleaning out, if
  we're going to take the vnode off the syncer's queue.
  uvm_fault: don't write-map pages unless its vnode is already on
  the syncer's queue.
  fix PR/24596 (3) but in the different way from the suggested fix.
  (to keep our current behaviour, ie. not to require explicit msync.
  discussed on tech-kern@.)
- genfs_putpages: don't mistakenly take a vnode off the queue
  by introducing a generation number in genfs_node.
  genfs_getpages: increment the generation number.
  suggested by Stephan Uphoff in PR/24596 (2).
- add some assertions.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.102 via patch
genfs_putpages: don't bother to clean the vnode unless VONWORKLST.

        sys/ufs/ffs/ffs_vnops.c: revision 1.71
ffs_full_fsync: because VBLK/VCHR can be mmap'ed,
do VOP_PUTPAGES for them as well.

        sys/uvm/uvm_fault.c: revision 1.97
uvm_fault: check a correct object in the case of layered filesystems.
fix PR/30811 from Jukka Salmi.

        sys/uvm/uvm_object.h: revision 1.20
        sys/ufs/ffs/ffs_vfsops.c: revision 1.167
        sys/uvm/uvm_bio.c: revision 1.41
        sys/ufs/ufs/ufs_vnops.c: revision 1.129
        sys/uvm/uvm_mmap.c: revision 1.92
        sys/uvm/uvm_fault.c: revision 1.98
        sys/kern/vfs_subr.c: revision 1.252
        sys/fs/msdosfs/denode.h: revision 1.5
        sys/miscfs/genfs/genfs_vnops.c: revision 1.103 via patch
        sys/fs/msdosfs/msdosfs_denode.c: revision 1.9
        sys/sys/vnode.h: revision 1.141
        sys/ufs/ufs/ufs_inode.c: revision 1.51
        sys/ufs/ufs/ufs_extern.h: revision 1.45 via patch
        sys/miscfs/genfs/genfs_node.h: revision 1.8
        sys/ufs/lfs/lfs_vfsops.c: revision 1.184
        sys/uvm/uvm_pager.h: revision 1.30
        sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.87
update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.104 via patch
don't write-protect wired pages.  pointed by Chuck Silvers.
for now, leave a vnode on the syncer's queue, as suggested by him.

        sys/ufs/ffs/ffs_vnops.c: revision 1.72
revert VCHR part of ffs_vnops.c 1.71.
as VCHR uses the device pager, no point to call VOP_PUTPAGES here.
pointed by Chuck Silvers.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Aug 23 08:05:13 2005 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored) to selected 1.239.2.4 (colored)

Don't overload MAXNAMLEN, use a separate constant for each filesystem type.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Jul 25 11:42:38 2005 UTC (18 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.167: +5 -3 lines
Diff to previous 1.167 (colored) to selected 1.239.2.4 (colored)

fix crash in mount error handling: don't free storage which was not
malloc'd

Revision 1.167 / (download) - annotate - [select for diffs], Sat Jul 23 12:18:41 2005 UTC (18 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.166: +3 -2 lines
Diff to previous 1.166 (colored) to selected 1.239.2.4 (colored)

update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Jul 15 05:01:16 2005 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.165: +21 -61 lines
Diff to previous 1.165 (colored) to selected 1.239.2.4 (colored)

Use ANSI function decls.

Revision 1.165 / (download) - annotate - [select for diffs], Tue Jun 28 09:30:38 2005 UTC (18 years, 9 months ago) by yamt
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.164: +6 -6 lines
Diff to previous 1.164 (colored) to selected 1.239.2.4 (colored)

- constify genfs_ops.
- use member designators.

Revision 1.164 / (download) - annotate - [select for diffs], Sun May 29 21:25:24 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.163: +7 -7 lines
Diff to previous 1.163 (colored) to selected 1.239.2.4 (colored)

- sprinkle const
- avoid shadow variables.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:39 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.160: +9 -8 lines
Diff to previous 1.160 (colored) next main 1.161 (colored) to selected 1.239.2.4 (colored)

sync with -current

Revision 1.118.2.13 / (download) - annotate - [select for diffs], Fri Apr 1 14:32:11 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.12: +3 -2 lines
Diff to previous 1.118.2.12 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.163 / (download) - annotate - [select for diffs], Tue Mar 29 02:41:06 2005 UTC (19 years ago) by thorpej
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.162: +3 -2 lines
Diff to previous 1.162 (colored) to selected 1.239.2.4 (colored)

- Define a VFS_ATTACH() macro that places a reference to a vfsops structure
  into the "vfsops" link set.
- Use VFS_ATTACH() where vfsops are declared for individual file systems.
- In vfsinit(), traverse the "vfsops" link set, rather than vfs_list_initial[].

Revision 1.160.4.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:37:03 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.160: +8 -8 lines
Diff to previous 1.160 (colored) next main 1.161 (colored) to selected 1.239.2.4 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.118.2.12 / (download) - annotate - [select for diffs], Tue Mar 8 13:53:12 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.11: +3 -3 lines
Diff to previous 1.118.2.11 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.162 / (download) - annotate - [select for diffs], Fri Mar 4 21:45:29 2005 UTC (19 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored) to selected 1.239.2.4 (colored)

PR/26823: Michael L. Hitch: Endianness flag were not preserved in the compat
superblock read routine.

Revision 1.118.2.11 / (download) - annotate - [select for diffs], Fri Mar 4 16:54:46 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.10: +7 -7 lines
Diff to previous 1.118.2.10 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.161 / (download) - annotate - [select for diffs], Sat Feb 26 22:32:20 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
Changes since 1.160: +7 -7 lines
Diff to previous 1.160 (colored) to selected 1.239.2.4 (colored)

nuke trailing whitespace

Revision 1.118.2.10 / (download) - annotate - [select for diffs], Mon Jan 17 19:33:11 2005 UTC (19 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.9: +48 -41 lines
Diff to previous 1.118.2.9 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.160 / (download) - annotate - [select for diffs], Tue Jan 11 00:19:36 2005 UTC (19 years, 3 months ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km, kent-audio2
Changes since 1.159: +14 -14 lines
Diff to previous 1.159 (colored) to selected 1.239.2.4 (colored)

Rearrange some code slightly to avoid uninitialized variable warnings.

Revision 1.159 / (download) - annotate - [select for diffs], Sun Jan 9 03:11:48 2005 UTC (19 years, 3 months ago) by mycroft
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Changes since 1.158: +35 -28 lines
Diff to previous 1.158 (colored) to selected 1.239.2.4 (colored)

Rework the mountroot interface so that vfs_mountroot() opens the root device
and just passes it on to the file system functions.  This avoids opening and
closing the device several times.

Mentioned on tech-kern some time ago, IIRC.  I've been running this for a
long time.

Revision 1.158 / (download) - annotate - [select for diffs], Sun Jan 2 16:08:31 2005 UTC (19 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.157: +3 -2 lines
Diff to previous 1.157 (colored) to selected 1.239.2.4 (colored)

Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.

Revision 1.157 / (download) - annotate - [select for diffs], Sun Dec 26 17:34:39 2004 UTC (19 years, 3 months ago) by dbj
Branch: MAIN
Changes since 1.156: +2 -3 lines
Diff to previous 1.156 (colored) to selected 1.239.2.4 (colored)

remove opt_compat_netbsd.h, afaict it is no longer needed.
i think it was previously used to pull in COMPAT_09 for ffs_statfs

Revision 1.118.2.9 / (download) - annotate - [select for diffs], Mon Nov 29 07:25:05 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.8: +7 -7 lines
Diff to previous 1.118.2.8 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.156 / (download) - annotate - [select for diffs], Sun Nov 21 19:21:51 2004 UTC (19 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.155: +7 -7 lines
Diff to previous 1.155 (colored) to selected 1.239.2.4 (colored)

allow changes of the sysctl values

Revision 1.118.2.8 / (download) - annotate - [select for diffs], Wed Oct 27 06:24:01 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.7: +3 -3 lines
Diff to previous 1.118.2.7 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.118.2.7 / (download) - annotate - [select for diffs], Fri Sep 24 10:53:58 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.6: +6 -4 lines
Diff to previous 1.118.2.6 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.118.2.6 / (download) - annotate - [select for diffs], Tue Sep 21 13:39:09 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.5: +52 -48 lines
Diff to previous 1.118.2.5 (colored) to selected 1.239.2.4 (colored)

Fix the sync with head I botched.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Sep 21 03:10:36 2004 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.154: +4 -2 lines
Diff to previous 1.154 (colored) to selected 1.239.2.4 (colored)

Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made.  Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP.  Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
  set.  Some file systems (e.g. specfs) don't even bother with vnode
  locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
  vnode locking problems, not the least of which is the "use SHARED for
  VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Sep 19 11:58:29 2004 UTC (19 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.153: +4 -4 lines
Diff to previous 1.153 (colored) to selected 1.239.2.4 (colored)

um_maxfilesize should be set after
ffs_oldfscompat_read adjusted fs_maxfilesize.

Revision 1.118.2.5 / (download) - annotate - [select for diffs], Sat Sep 18 14:56:52 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.4: +48 -52 lines
Diff to previous 1.118.2.4 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.118.2.4 / (download) - annotate - [select for diffs], Wed Aug 25 06:59:14 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.3: +51 -30 lines
Diff to previous 1.118.2.3 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.118.2.3 / (download) - annotate - [select for diffs], Tue Aug 24 17:57:43 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.2: +9 -11 lines
Diff to previous 1.118.2.2 (colored) to selected 1.239.2.4 (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.153 / (download) - annotate - [select for diffs], Sun Aug 15 07:19:56 2004 UTC (19 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.152: +44 -27 lines
Diff to previous 1.152 (colored) to selected 1.239.2.4 (colored)

Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.

Revision 1.152 / (download) - annotate - [select for diffs], Sat Aug 14 01:08:03 2004 UTC (19 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.151: +9 -5 lines
Diff to previous 1.151 (colored) to selected 1.239.2.4 (colored)

Add a new flag, IN_MODIFY.  This is like IN_UPDATE|IN_CHANGE, but unlike
setting those flags, it does not cause the inode to be written in the periodic
sync.  This is used for writes to special files (devices and named pipes) and
FIFOs.

Do not preemptively sync updates to access times and modification times.  They
are now updated in the inode only opportunistically, or when the file or device
is closed.  (Really, it should be delayed beyond close, but this is enough to
help substantially with device nodes.)

And the most amusing part:
Trickle sync was broken on both FFS and ext2fs, in different ways.  In FFS, the
periodic call to VFS_SYNC(MNT_LAZY) was still causing all file data to be
synced.  In ext2fs, it was causing the metadata to *not* be synced.  We now
only call VOP_UPDATE() on the node if we're doing MNT_LAZY.  I've confirmed
that we do in fact trickle correctly now.

Revision 1.118.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:56:50 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.118.2.1: +236 -182 lines
Diff to previous 1.118.2.1 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD

Revision 1.151 / (download) - annotate - [select for diffs], Mon Jul 5 07:28:46 2004 UTC (19 years, 9 months ago) by pk
Branch: MAIN
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored) to selected 1.239.2.4 (colored)

Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().

Revision 1.140.2.3 / (download) - annotate - [select for diffs], Sat May 29 09:03:56 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
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-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
Changes since 1.140.2.2: +8 -5 lines
Diff to previous 1.140.2.2 (colored) to branchpoint 1.140 (colored) next main 1.141 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.148 (requested by atatat in ticket #393):
Sysctl descriptions under vfs subtree

Revision 1.150 / (download) - annotate - [select for diffs], Thu May 27 17:04:52 2004 UTC (19 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.149: +3 -2 lines
Diff to previous 1.149 (colored) to selected 1.239.2.4 (colored)

Fixup last commit. fs->fs_active must be initialized.

Revision 1.149 / (download) - annotate - [select for diffs], Tue May 25 14:54:59 2004 UTC (19 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.148: +13 -2 lines
Diff to previous 1.148 (colored) to selected 1.239.2.4 (colored)

Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

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

Revision 1.148 / (download) - annotate - [select for diffs], Tue May 25 04:44:44 2004 UTC (19 years, 10 months ago) by atatat
Branch: MAIN
Changes since 1.147: +8 -5 lines
Diff to previous 1.147 (colored) to selected 1.239.2.4 (colored)

Sysctl descriptions under vfs subtree

Revision 1.147 / (download) - annotate - [select for diffs], Thu May 20 05:39:34 2004 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
Changes since 1.146: +14 -2 lines
Diff to previous 1.146 (colored) to selected 1.239.2.4 (colored)

Explicitly call pool_init() (and pool_destroy()) when being built as
an _LKM.

This adds pools to the list of things that lkms must do manually
because they're set up with link sets.  Not that there's anything
wrong with link sets, but that we need to try harder to remember that
lkms are second class citizens.  Of a sort.

Revision 1.140.2.2 / (download) - annotate - [select for diffs], Wed Apr 28 05:49:56 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.140.2.1: +2 -27 lines
Diff to previous 1.140.2.1 (colored) to branchpoint 1.140 (colored) to selected 1.239.2.4 (colored)

Pullup rev 1.145 (requested by dbj in ticket #197)

Remove botched superblock upgrade warnings.
There are now alternate non-kernel checks and fixes for this problem.
PR#17910 PR#21283 PR#21404 PR#23925  PR#23926
PR#25138

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Tue Apr 27 17:56:01 2004 UTC (19 years, 11 months ago) by jdc
Branch: netbsd-2-0
Changes since 1.140: +7 -15 lines
Diff to previous 1.140 (colored) to selected 1.239.2.4 (colored)

Pull up revisions 1.141-1.142 (requested by dbj in ticket #185)

Fix problems related to superblock upgrade issues which may be
experienced by -current users from 2003.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Apr 26 01:40:40 2004 UTC (19 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.145: +3 -4 lines
Diff to previous 1.145 (colored) to selected 1.239.2.4 (colored)

Unwrap a not-too-long line.

Revision 1.145 / (download) - annotate - [select for diffs], Sun Apr 25 21:02:26 2004 UTC (19 years, 11 months ago) by dbj
Branch: MAIN
Changes since 1.144: +2 -27 lines
Diff to previous 1.144 (colored) to selected 1.239.2.4 (colored)

remove botched superblock upgrade warnings.
there are now alternate non-kernel checks and fixes for this problem.
relevent prs include:
bin/17910 kern/21283 kern/21404 port-macppc/23925 port-macppc/23926
install/25138

Revision 1.144 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:44 2004 UTC (19 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.143: +8 -12 lines
Diff to previous 1.143 (colored) to selected 1.239.2.4 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.143 / (download) - annotate - [select for diffs], Wed Apr 21 01:05:44 2004 UTC (20 years ago) by christos
Branch: MAIN
Changes since 1.142: +23 -20 lines
Diff to previous 1.142 (colored) to selected 1.239.2.4 (colored)

Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.

Revision 1.142 / (download) - annotate - [select for diffs], Sun Apr 18 03:35:16 2004 UTC (20 years ago) by dbj
Branch: MAIN
Changes since 1.141: +2 -14 lines
Diff to previous 1.141 (colored) to selected 1.239.2.4 (colored)

remove code that attempts to correct superblock location.  this
enforces an unnecessary restriction that the superblock be in the
particular expected locations.  Also, the compatibility case is
handled in ffs_oldfscompat_read.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Apr 18 03:30:23 2004 UTC (20 years ago) by dbj
Branch: MAIN
Changes since 1.140: +7 -3 lines
Diff to previous 1.140 (colored) to selected 1.239.2.4 (colored)

when enabling ffs compatibility in ffs_reload, use
sblockloc that superblock was read from
also note XXX that ffs_reload doesn't handle superblock moving

Revision 1.140 / (download) - annotate - [select for diffs], Sat Mar 27 12:40:46 2004 UTC (20 years ago) by dsl
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.139: +4 -4 lines
Diff to previous 1.139 (colored) to selected 1.239.2.4 (colored)

Rework previous so that FS_FLAGS_UPDATED is only looked at for ffsv1

Revision 1.139 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:55 2004 UTC (20 years, 1 month ago) by atatat
Branch: MAIN
Changes since 1.138: +16 -9 lines
Diff to previous 1.138 (colored) to selected 1.239.2.4 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Mar 21 18:48:24 2004 UTC (20 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.137: +42 -20 lines
Diff to previous 1.137 (colored) to selected 1.239.2.4 (colored)

Rework superblock validation logic to make adding validity tests easier.
Ensure that we don't use the first alternate superblock of a ffsv1
filesystem with 64k blocks (it is in the same place as an ffsv2 sb).
Fixes part of PR kern/24809

Revision 1.137 / (download) - annotate - [select for diffs], Thu Mar 11 07:14:12 2004 UTC (20 years, 1 month ago) by dbj
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored) to selected 1.239.2.4 (colored)

quiet tls.  change botched superblock warning to use -b 16

Revision 1.136 / (download) - annotate - [select for diffs], Wed Mar 10 09:56:59 2004 UTC (20 years, 1 month ago) by keihan
Branch: MAIN
Changes since 1.135: +4 -4 lines
Diff to previous 1.135 (colored) to selected 1.239.2.4 (colored)

s/netbsd.org/NetBSD.org/g

Revision 1.135 / (download) - annotate - [select for diffs], Sun Feb 22 08:58:03 2004 UTC (20 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored) to selected 1.239.2.4 (colored)

make sblock_try[] const

Revision 1.134 / (download) - annotate - [select for diffs], Mon Jan 12 16:19:36 2004 UTC (20 years, 3 months ago) by dbj
Branch: MAIN
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored) to selected 1.239.2.4 (colored)

change the updating note to say you may need fsck_ffs -b 32 -c 4'

Revision 1.133 / (download) - annotate - [select for diffs], Mon Jan 12 05:49:03 2004 UTC (20 years, 3 months ago) by dbj
Branch: MAIN
Changes since 1.132: +27 -2 lines
Diff to previous 1.132 (colored) to selected 1.239.2.4 (colored)

add checks for a couple of botched superblock upgrade cases
and report a warning with repair references.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Jan 10 16:23:36 2004 UTC (20 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.131: +18 -6 lines
Diff to previous 1.131 (colored) to selected 1.239.2.4 (colored)

Split out softdep_flushworklist() from softdep_flushfiles() so that
it can be used to clear the work queue.

Cleanup ffs_sync() which did not synchronously wait when MNT_WAIT
was specified. Clear the work queue when MNT_WAIT is specified.

Result is a clean on-disk file system after ffs_sync(.., MNT_WAIT, ..)

From FreeBSD.

Revision 1.131 / (download) - annotate - [select for diffs], Fri Jan 9 19:10:22 2004 UTC (20 years, 3 months ago) by dbj
Branch: MAIN
Changes since 1.130: +58 -81 lines
Diff to previous 1.130 (colored) to selected 1.239.2.4 (colored)

never upgrade the superblock or set FS_FLAGS_UPDATED in fs_old_flags
add compatibility for filesystems created before FFSv2 integration
these patches are from pr port-macppc/23926 and should also fix
problems discussed in pr kern/21404 and pr kern/21283

Revision 1.130 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:25 2003 UTC (20 years, 4 months ago) by atatat
Branch: MAIN
Changes since 1.129: +36 -26 lines
Diff to previous 1.129 (colored) to selected 1.239.2.4 (colored)

Dynamic sysctl.

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.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Dec 1 18:57:07 2003 UTC (20 years, 4 months ago) by dbj
Branch: MAIN
Changes since 1.128: +4 -4 lines
Diff to previous 1.128 (colored) to selected 1.239.2.4 (colored)

in ffs_unmount, ignore error returned by VOP_CLOSE(devvp)
this fixes a problem where device close error would cause
unmount to fail but structures to be left partially deallocated

Revision 1.128 / (download) - annotate - [select for diffs], Sat Nov 8 05:35:11 2003 UTC (20 years, 5 months ago) by dbj
Branch: MAIN
Changes since 1.127: +11 -6 lines
Diff to previous 1.127 (colored) to selected 1.239.2.4 (colored)

fix minor memory leaks in error paths of ffs_mountfs

Revision 1.127 / (download) - annotate - [select for diffs], Wed Nov 5 10:18:38 2003 UTC (20 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.126: +5 -8 lines
Diff to previous 1.126 (colored) to selected 1.239.2.4 (colored)

Clean up the usage of vn_start_write(). At least one occurence clobbered
previous error conditions.
If "(flags & (V_WAIT|V_PCATCH)) == V_WAIT" the return value is always zero.
Ignore the return value in these cases.

From Darrin B. Jewell.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Oct 30 01:43:10 2003 UTC (20 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.125: +2 -4 lines
Diff to previous 1.125 (colored) to selected 1.239.2.4 (colored)

Remove some assigned-to but otherwise unused variables.

Revision 1.125 / (download) - annotate - [select for diffs], Wed Oct 15 11:29:01 2003 UTC (20 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.124: +11 -2 lines
Diff to previous 1.124 (colored) to selected 1.239.2.4 (colored)

Add the gating of system calls that cause modifications to the underlying
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>

Revision 1.124 / (download) - annotate - [select for diffs], Tue Oct 14 14:02:56 2003 UTC (20 years, 6 months ago) by dbj
Branch: MAIN
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored) to selected 1.239.2.4 (colored)

add mnt_iflag field to struct mount for internal flags
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

Revision 1.67.2.8 / (download) - annotate - [select for diffs], Mon Oct 6 09:25:23 2003 UTC (20 years, 6 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.67.2.7: +5 -3 lines
Diff to previous 1.67.2.7 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored) to selected 1.239.2.4 (colored)

make sure to not get flags which are for internal use only from the on-disk
superblock.
Proposed in http://mail-index.netbsd.org/tech-kern/2003/09/06/0005.html
[ticket #80, bouyer]

Revision 1.123 / (download) - annotate - [select for diffs], Thu Sep 25 23:39:17 2003 UTC (20 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored) to selected 1.239.2.4 (colored)

In ffs_sbupdate(), swap the sblock after ffs_oldfscompat_write() is
applied rather than the original.

Revision 1.98.4.2 / (download) - annotate - [select for diffs], Wed Sep 24 11:02:14 2003 UTC (20 years, 7 months ago) by tron
Branch: netbsd-1-6
CVS Tags: 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
Changes since 1.98.4.1: +4 -2 lines
Diff to previous 1.98.4.1 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.121 via patch (requested by bouyer in ticket #1464):
make sure to not get flags which are for internal use only from the on-disk
superblock.
Proposed in http://mail-index.netbsd.org/tech-kern/2003/09/06/0005.html

Revision 1.122 / (download) - annotate - [select for diffs], Wed Sep 17 02:24:33 2003 UTC (20 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.121: +7 -5 lines
Diff to previous 1.121 (colored) to selected 1.239.2.4 (colored)

Fix a recently introduced bug which prevents csum totals being copied
when an old ffs filesytem is first mounted (as a result, df reports disk
full on old ffs filesystem or mfs created by old binary).  Problem first
noticed by onoe san.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Sep 13 14:09:15 2003 UTC (20 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.120: +6 -4 lines
Diff to previous 1.120 (colored) to selected 1.239.2.4 (colored)

make sure to not get flags which are for internal use only from the on-disk
superblock.
Proposed in http://mail-index.netbsd.org/tech-kern/2003/09/06/0005.html

Revision 1.120 / (download) - annotate - [select for diffs], Sat Sep 13 13:47:04 2003 UTC (20 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.119: +22 -22 lines
Diff to previous 1.119 (colored) to selected 1.239.2.4 (colored)

Commit changes proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/06/0001.html
http://mail-index.netbsd.org/tech-kern/2003/09/06/0006.html
to avoid compat problems with old ffsv1 by reuse of the old FS_SWAPPED
value for FS_FLAGS_UPDATED, and use of new, larger fields:
- Don't use FS_FLAGS_UPDATED to see if we need to update new fields from
  old fields in ffsv1 case.
- when writing back the superblock, copy back the flags to the old location
  if only old flags are set (FS_FLAGS_UPDATED won't be set in this case)
  in ffsv1 case.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:31 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.118: +3 -7 lines
Diff to previous 1.118 (colored) to selected 1.239.2.4 (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.118.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:22 2003 UTC (20 years, 9 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.118: +62 -56 lines
Diff to previous 1.118 (colored) to selected 1.239.2.4 (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.118 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:36 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.117: +49 -53 lines
Diff to previous 1.117 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.117 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:42 2003 UTC (20 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.116: +9 -11 lines
Diff to previous 1.116 (colored) to selected 1.239.2.4 (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.116 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:25 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.115: +62 -56 lines
Diff to previous 1.115 (colored) to selected 1.239.2.4 (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.115 / (download) - annotate - [select for diffs], Thu Jun 12 18:50:43 2003 UTC (20 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.114: +9 -2 lines
Diff to previous 1.114 (colored) to selected 1.239.2.4 (colored)

OS X still seems to use the old nrpos field in the superblock, and gets
unhappy after NetBSD wrote an Apple UFS filesystem. Just set it to 0
in this case.

Revision 1.114 / (download) - annotate - [select for diffs], Sat May 3 16:24:35 2003 UTC (20 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.113: +5 -2 lines
Diff to previous 1.113 (colored) to selected 1.239.2.4 (colored)

make sure we update fs_fsmnt.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Apr 16 21:44:27 2003 UTC (21 years ago) by christos
Branch: MAIN
Changes since 1.112: +6 -15 lines
Diff to previous 1.112 (colored) to selected 1.239.2.4 (colored)

PR/1796: John Kohl: statfs misbehaves under chrooted environments.

- 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.

Revision 1.112 / (download) - annotate - [select for diffs], Sat Apr 12 10:35:58 2003 UTC (21 years ago) by fvdl
Branch: MAIN
Changes since 1.111: +7 -7 lines
Diff to previous 1.111 (colored) to selected 1.239.2.4 (colored)

Don't cache buffers used when finding the superblock, it can lead to
seeing bogus data for the first cg with certain block/frag sizes.
From enami tsugutomo.

Revision 1.111 / (download) - annotate - [select for diffs], Sat Apr 5 13:37:36 2003 UTC (21 years ago) by fvdl
Branch: MAIN
Changes since 1.110: +74 -32 lines
Diff to previous 1.110 (colored) to selected 1.239.2.4 (colored)

* Use the old and new time fields in the superblock as well as a few others
  to determine if this filesystem was mounted by an older kernel after
  having been mounted by a newer one, to avoid some summary mismatches.
* Reinstate support for 4.2 cylinder groups (read-only, as it was before).

Revision 1.110 / (download) - annotate - [select for diffs], Wed Apr 2 10:39:38 2003 UTC (21 years ago) by fvdl
Branch: MAIN
Changes since 1.109: +208 -131 lines
Diff to previous 1.109 (colored) to selected 1.239.2.4 (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.109 / (download) - annotate - [select for diffs], Mon Mar 31 21:02:12 2003 UTC (21 years ago) by fvdl
Branch: MAIN
Changes since 1.108: +3 -2 lines
Diff to previous 1.108 (colored) to selected 1.239.2.4 (colored)

The modified flag must be cleared before the last sbupdate call in
unmount, because ffs_flushfiles or softdep_flushfiles may have
modified the filesystem (despite VFS_SYNC having been called first).

Revision 1.108 / (download) - annotate - [select for diffs], Fri Mar 21 23:11:29 2003 UTC (21 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.107: +8 -8 lines
Diff to previous 1.107 (colored) to selected 1.239.2.4 (colored)

Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).

Revision 1.107 / (download) - annotate - [select for diffs], Mon Feb 17 23:48:14 2003 UTC (21 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored) to selected 1.239.2.4 (colored)

Add code to UBCify LFS.  This is still behind "#ifdef LFS_UBC" for now
(there are still some details to work out) but expect that to go
away soon.  To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:

* Create a writer daemon kernel thread whose purpose is to handle page
  writes for the pagedaemon, but which also takes over some of the
  functions of lfs_check().  This thread is started the first time an
  LFS is mounted.

* Add a "flags" parameter to GOP_SIZE.  Current values are
  GOP_SIZE_READ, meaning that the call should return the size of the
  in-core version of the file, and GOP_SIZE_WRITE, meaning that it
  should return the on-disk size.  One of GOP_SIZE_READ or
  GOP_SIZE_WRITE must be specified.

* Instead of using malloc(...M_WAITOK) for everything, reserve enough
  resources to get by and use malloc(...M_NOWAIT), using the reserves if
  necessary.  Use the pool subsystem for structures small enough that
  this is feasible.  This also obsoletes LFS_THROTTLE.

And a few that are not strictly necessary:

* Moves the LFS inode extensions off onto a separately allocated
  structure; getting closer to LFS as an LKM.  "Welcome to 1.6O."

* Unified GOP_ALLOC between FFS and LFS.

* Update LFS copyright headers to correct values.

* Actually cast to unsigned in lfs_shellsort, like the comment says.

* Keep track of which segments were empty before the previous
  checkpoint; any segments that pass two checkpoints both dirty and
  empty can be summarily cleaned.  Do this.  Right now lfs_segclean
  still works, but this should be turned into an effectless
  compatibility syscall.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Jan 24 21:55:23 2003 UTC (21 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.105: +6 -6 lines
Diff to previous 1.105 (colored) to selected 1.239.2.4 (colored)

Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.

Revision 1.80.2.15 / (download) - annotate - [select for diffs], Wed Dec 11 06:51:42 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.80.2.14: +4 -4 lines
Diff to previous 1.80.2.14 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.105 / (download) - annotate - [select for diffs], Sun Dec 1 00:12:09 2002 UTC (21 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.104: +5 -5 lines
Diff to previous 1.104 (colored) to selected 1.239.2.4 (colored)

Add multiple inclusion protection for headers.  Fix mismatched
variable declarations (missing const's) as needed.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Nov 24 11:09:13 2002 UTC (21 years, 4 months ago) by scw
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored) to selected 1.239.2.4 (colored)

Quell an uninitialised variable warning.

Revision 1.80.2.14 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:50 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.13: +85 -0 lines
Diff to previous 1.80.2.13 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.81.4.8 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:54 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.81.4.7: +89 -3 lines
Diff to previous 1.81.4.7 (colored) to branchpoint 1.81 (colored) next main 1.82 (colored) to selected 1.239.2.4 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.103 / (download) - annotate - [select for diffs], Sat Sep 28 20:11:08 2002 UTC (21 years, 6 months ago) by dbj
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.102: +79 -2 lines
Diff to previous 1.102 (colored) to selected 1.239.2.4 (colored)

Add support for the Apple UFS variation on ffs
This is the bulk of PR #17345

The general approach is to use a run time deteriminable value
for DIRBLKSIZ.  Additional allowances are included for using
MAXSYMLINKLEN with FS_42INODEFMT and a shift in the cylinder group
cluster summary count array.  Support is added for managing
the Apple UFS volume label.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Sep 21 18:14:50 2002 UTC (21 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.101: +10 -2 lines
Diff to previous 1.101 (colored) to selected 1.239.2.4 (colored)

MNT_GETARGS support

Revision 1.80.2.13 / (download) - annotate - [select for diffs], Tue Sep 17 21:23:59 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.12: +2 -1 lines
Diff to previous 1.80.2.12 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (21 years, 7 months ago) by gehenna
Branch: MAIN
Changes since 1.100: +4 -3 lines
Diff to previous 1.100 (colored) to selected 1.239.2.4 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.81.4.7 / (download) - annotate - [select for diffs], Fri Sep 6 08:50:12 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.81.4.6: +5 -5 lines
Diff to previous 1.81.4.6 (colored) to branchpoint 1.81 (colored) to selected 1.239.2.4 (colored)

sync kqueue branch with HEAD

Revision 1.98.2.3 / (download) - annotate - [select for diffs], Thu Aug 29 00:57:03 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.98.2.2: +5 -5 lines
Diff to previous 1.98.2.2 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored) to selected 1.239.2.4 (colored)

catch up with -current.

Revision 1.80.2.12 / (download) - annotate - [select for diffs], Thu Aug 1 02:47:03 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.11: +5 -5 lines
Diff to previous 1.80.2.11 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.100 / (download) - annotate - [select for diffs], Tue Jul 30 07:40:15 2002 UTC (21 years, 8 months ago) by soren
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.99: +5 -5 lines
Diff to previous 1.99 (colored) to selected 1.239.2.4 (colored)

Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.

Revision 1.80.2.11 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:40 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.10: +2 -3 lines
Diff to previous 1.80.2.10 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.80.2.10 / (download) - annotate - [select for diffs], Mon Jun 24 22:12:29 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.9: +3 -3 lines
Diff to previous 1.80.2.9 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.81.4.6 / (download) - annotate - [select for diffs], Sun Jun 23 17:52:08 2002 UTC (21 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.81.4.5: +115 -75 lines
Diff to previous 1.81.4.5 (colored) to branchpoint 1.81 (colored) to selected 1.239.2.4 (colored)

catch up with -current on kqueue branch

Revision 1.98.2.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:53:07 2002 UTC (21 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.98.2.1: +15 -12 lines
Diff to previous 1.98.2.1 (colored) to branchpoint 1.98 (colored) to selected 1.239.2.4 (colored)

catch up with -current.

Revision 1.80.2.9 / (download) - annotate - [select for diffs], Thu Jun 20 03:50:24 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.8: +15 -12 lines
Diff to previous 1.80.2.8 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.98.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 16:46:17 2002 UTC (21 years, 10 months ago) by tv
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.98: +15 -12 lines
Diff to previous 1.98 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.99 (requested by chs in ticket #227):
allow read-only mounts even if we can't read the last fragment of the fs.
this enables one to recover data from a failing disk (where the read failure
is a hardware problem) while avoiding corrupting the fs further (in the case
where the read failure is due to a misconfiguration).

Revision 1.99 / (download) - annotate - [select for diffs], Sun Jun 9 16:46:49 2002 UTC (21 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.98: +15 -12 lines
Diff to previous 1.98 (colored) to selected 1.239.2.4 (colored)

allow read-only mounts even if we can't read the last fragment of the fs.
this enables one to recover data from a failing disk (where the read failure
is a hardware problem) while avoiding corrupting the fs further (in the case
where the read failure is due to a misconfiguration).

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Thu May 16 03:48:07 2002 UTC (21 years, 11 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.98: +4 -3 lines
Diff to previous 1.98 (colored) to selected 1.239.2.4 (colored)

Use devsw APIs for checking validity of major numbers.

Revision 1.80.2.8 / (download) - annotate - [select for diffs], Wed Apr 17 00:06:31 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.7: +95 -73 lines
Diff to previous 1.80.2.7 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Apr 10 08:05:13 2002 UTC (22 years ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.97: +3 -3 lines
Diff to previous 1.97 (colored) to selected 1.239.2.4 (colored)

Use blkstofrags() and fragstoblks().  Use &(NBBY-1) rather than %NBBY.
Switch off of fs_fragshift rather than fs_frag (generates better jump tables).

Revision 1.97 / (download) - annotate - [select for diffs], Mon Apr 1 07:51:58 2002 UTC (22 years ago) by enami
Branch: MAIN
Changes since 1.96: +5 -3 lines
Diff to previous 1.96 (colored) to selected 1.239.2.4 (colored)

Hold an extra reference if updating and args.fspec == NULL.

Revision 1.80.2.7 / (download) - annotate - [select for diffs], Mon Apr 1 07:49:17 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.6: +19 -5 lines
Diff to previous 1.80.2.6 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.96 / (download) - annotate - [select for diffs], Mon Apr 1 01:52:44 2002 UTC (22 years ago) by christos
Branch: MAIN
Changes since 1.95: +18 -34 lines
Diff to previous 1.95 (colored) to selected 1.239.2.4 (colored)

Fixes from enami:

- If VOP_ACCESS fails when updating mount, we will vrele() twice.

- The check for update-only flags in mp->mnt_flag when not updating
  case is bogus.  If we really want to check, we need to see flags in
  ufs_args, but I'm not sure if it is really necessary.

- The credential passed to ffs_reload was credential of when looking
  up mount point, but now it is credential of when looking up device
  node.  Anyway, it may be current process's credential.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Mar 31 20:53:25 2002 UTC (22 years ago) by christos
Branch: MAIN
Changes since 1.94: +109 -73 lines
Diff to previous 1.94 (colored) to selected 1.239.2.4 (colored)

PR/16136: Chris Jepeway: Bogus entry in /etc/fstab can panic kernel.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Mar 17 00:02:34 2002 UTC (22 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: eeh-devprop-base, eeh-devprop
Changes since 1.93: +17 -2 lines
Diff to previous 1.93 (colored) to selected 1.239.2.4 (colored)

when mounting a filesystem, read the last block in the filesystem
to verify that the device is at least as big as the superblock claims
the filesystem is supposed to be, and if it's not then fail the mount.
this should help reduce the type of confusion reported in PR 13228.

Revision 1.81.4.5 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:24 2002 UTC (22 years, 1 month ago) by jdolecek
Branch: kqueue
Changes since 1.81.4.4: +4 -5 lines
Diff to previous 1.81.4.4 (colored) to branchpoint 1.81 (colored) to selected 1.239.2.4 (colored)

Catch up with -current.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:46 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored) to selected 1.239.2.4 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Feb 28 21:59:23 2002 UTC (22 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.91: +3 -4 lines
Diff to previous 1.91 (colored) to selected 1.239.2.4 (colored)

Don't add fs->fs_pendingblocks to f_bavail twice. It's already included
in f_bfree, which is added to f_bavail.

Fixes problem with statfs reporting too much free space for filesystems
which have files pending to be freed by softdeps.

Revision 1.81.4.4 / (download) - annotate - [select for diffs], Thu Jan 10 20:05:06 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.81.4.3: +77 -28 lines
Diff to previous 1.81.4.3 (colored) to branchpoint 1.81 (colored) to selected 1.239.2.4 (colored)

Sync kqueue branch with -current.

Revision 1.80.2.6 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:48 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.5: +45 -10 lines
Diff to previous 1.80.2.5 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Dec 30 15:46:53 2001 UTC (22 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.90: +14 -6 lines
Diff to previous 1.90 (colored) to selected 1.239.2.4 (colored)

XXXX temporary measure: in the case of a softdep 'unmount pending error',
     do not mark the filesystem clean, as this will mean that one or more
     files were likely not completely removed (will show up as unconnected
     in fsck). Prevents filesystems from being marked clean while they're
     not until this problem has been figured out.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Dec 19 15:20:19 2001 UTC (22 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.89: +2 -4 lines
Diff to previous 1.89 (colored) to selected 1.239.2.4 (colored)

ffs_reload may be called after an old fsck has run, and the pending*
fields may not be zero. Just reset them silently, it's not an error.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Dec 18 10:57:22 2001 UTC (22 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.88: +35 -6 lines
Diff to previous 1.88 (colored) to selected 1.239.2.4 (colored)

Bring over fixes from FreeBSD that weren't incorporated yet, mainly
from Kirk McKusick. They implement taking pending block/inode frees
into account for the sake of correct statfs() numbers, and adding
a new softdep type (newdirblk) to correctly handle newly allocated
directory blocks.

Minor additional changes: 1) swap the newly introduced fs_pendinginodes
and fs_pendingblock fields in ffs_sb_swap, and 2) declare lkt_held
in the debug version of the softdep lock structure volatile, as it
can be modified from interrupt context #ifdef DEBUG.

Revision 1.67.2.7 / (download) - annotate - [select for diffs], Sun Nov 25 20:00:26 2001 UTC (22 years, 4 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.67.2.6: +20 -2 lines
Diff to previous 1.67.2.6 (colored) to branchpoint 1.67 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.85 (requested by lukem):
  Pull in enhanced ffs_dirpref() algorithm, which provides a
  substantial performance improvement through better locality
  between parent/child directories and their files, and by easing
  the pressure on the buffer cache for metadata operations.

Revision 1.67.2.6 / (download) - annotate - [select for diffs], Sun Nov 25 19:35:03 2001 UTC (22 years, 4 months ago) by he
Branch: netbsd-1-5
Changes since 1.67.2.5: +20 -18 lines
Diff to previous 1.67.2.5 (colored) to branchpoint 1.67 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.84 (requested by lukem):
  Change fs_csp[] from being a fixed size to being an array sized
  as required.  This allows file systems with more than about 15500
  cylinder groups (on 32-bit systems) to be used.

Revision 1.67.2.5 / (download) - annotate - [select for diffs], Sun Nov 25 19:30:44 2001 UTC (22 years, 4 months ago) by he
Branch: netbsd-1-5
Changes since 1.67.2.4: +4 -4 lines
Diff to previous 1.67.2.4 (colored) to branchpoint 1.67 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.83 (requested by lukem):
  Call ffs_sb_swap() with the correct arguments.  Fixes problems
  with using other-endian file systems.

Revision 1.67.2.4 / (download) - annotate - [select for diffs], Sun Nov 25 19:21:19 2001 UTC (22 years, 4 months ago) by he
Branch: netbsd-1-5
Changes since 1.67.2.3: +2 -2 lines
Diff to previous 1.67.2.3 (colored) to branchpoint 1.67 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.82 (requested by lukem):
  Correctly refer to fs_clean in error message.

Revision 1.67.2.3 / (download) - annotate - [select for diffs], Sun Nov 25 19:17:43 2001 UTC (22 years, 4 months ago) by he
Branch: netbsd-1-5
Changes since 1.67.2.2: +3 -1 lines
Diff to previous 1.67.2.2 (colored) to branchpoint 1.67 (colored) to selected 1.239.2.4 (colored)

Pull up revisions 1.76,1.78 (requested by lukem):
  In ffs_reload(), copy fs_ronly to the new superblock too.
  Clear fs_fmod on rw->ro transition.

Revision 1.80.2.5 / (download) - annotate - [select for diffs], Wed Nov 14 19:18:56 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.4: +4 -1 lines
Diff to previous 1.80.2.4 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:46 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.87: +4 -1 lines
Diff to previous 1.87 (colored) next main 1.88 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.88 / (download) - annotate - [select for diffs], Tue Oct 30 01:11:54 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.87: +4 -1 lines
Diff to previous 1.87 (colored) to selected 1.239.2.4 (colored)

add __KERNEL_RCSID()

Revision 1.85.2.3 / (download) - annotate - [select for diffs], Mon Oct 1 12:48:24 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.85.2.2: +31 -20 lines
Diff to previous 1.85.2.2 (colored) to branchpoint 1.85 (colored) next main 1.86 (colored) to selected 1.239.2.4 (colored)

Catch up with -current.

Revision 1.85.2.2 / (download) - annotate - [select for diffs], Wed Sep 26 15:28:27 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.85.2.1: +19 -12 lines
Diff to previous 1.85.2.1 (colored) to branchpoint 1.85 (colored) to selected 1.239.2.4 (colored)

* add a VCLONED vnode flag that indicates a vnode representing a cloned
  device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
  to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
  clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
  to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
  clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
  to the specinfo of a cloned vnode. could possibly redirect getattr to
  the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
  original device, and reassociates it with the specified dev_t. to be
  used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
  to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
  when debugging race conditions that still exist wrt. locking and
  revoking vnodes.
* make the locking state of a vnode consistent when passed to
  d_open and d_close (unlocked). locked would be better, but has
  some deadlock issues

Revision 1.80.2.4 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:05 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.3: +69 -38 lines
Diff to previous 1.80.2.3 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.85.2.1 / (download) - annotate - [select for diffs], Tue Sep 18 19:14:02 2001 UTC (22 years, 7 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored) to selected 1.239.2.4 (colored)

Various changes to make cloning devices possible:

	* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
	  not NULL, specfs will create a cloned (aliased) vnode during
	  the call, and return it there. The caller should release and
	  unlock the original vnode if a new vnode was returned. The
	  new vnode is returned locked.

	* Add a flag field to the cdevsw and bdevsw structures.
	  DF_CLONING indicates that it wants a new vnode for each
	  open (XXX is there a better way? devprop?)

	* If a device is cloning, always call the close entry
	  point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).

Revision 1.87 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:42 2001 UTC (22 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.86: +22 -20 lines
Diff to previous 1.86 (colored) to selected 1.239.2.4 (colored)

a whole bunch of changes to improve performance and robustness under load:

 - remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.

Revision 1.86 / (download) - annotate - [select for diffs], Sat Sep 15 16:13:05 2001 UTC (22 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: pre-chs-ubcperf
Changes since 1.85: +10 -1 lines
Diff to previous 1.85 (colored) to selected 1.239.2.4 (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.81.4.3 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:30 2001 UTC (22 years, 7 months ago) by thorpej
Branch: kqueue
Changes since 1.81.4.2: +39 -19 lines
Diff to previous 1.81.4.2 (colored) to branchpoint 1.81 (colored) to selected 1.239.2.4 (colored)

Update the kqueue branch to HEAD.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Sep 6 02:16:02 2001 UTC (22 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-devvp-base
Branch point for: thorpej-devvp
Changes since 1.84: +20 -2 lines
Diff to previous 1.84 (colored) to selected 1.239.2.4 (colored)

Incorporate the enhanced ffs_dirpref() by Grigoriy Orlov, as found in
FreeBSD (three commits; the initial work, man page updates, and a fix
to ffs_reload()), with the following differences:
- Be consistent between newfs(8) and tunefs(8) as to the options which
  set and control the tuning parameters for this work (avgfilesize & avgfpdir)
- Use u_int16_t instead of u_int8_t to keep track of the number of
  contiguous directories (suggested by Chuck Silvers)
- Work within our FFS_EI framework
- Ensure that fs->fs_maxclusters and fs->fs_contigdirs don't point to
  the same area of memory

The new algorithm has a marked performance increase, especially when
performing tasks such as untarring pkgsrc.tar.gz, etc.

The original FreeBSD commit messages are attached:

=====
mckusick    2001/04/10 01:39:00 PDT
  Directory layout preference improvements from Grigoriy Orlov <gluk@ptci.ru>.
  His description of the problem and solution follow. My own tests show
  speedups on typical filesystem intensive workloads of 5% to 12% which
  is very impressive considering the small amount of code change involved.

  ------

    One day I noticed that some file operations run much faster on
  small file systems then on big ones. I've looked at the ffs
  algorithms, thought about them, and redesigned the dirpref algorithm.

    First I want to describe the results of my tests. These results are old
  and I have improved the algorithm after these tests were done. Nevertheless
  they show how big the perfomance speedup may be. I have done two file/directory
  intensive tests on a two OpenBSD systems with old and new dirpref algorithm.
  The first test is "tar -xzf ports.tar.gz", the second is "rm -rf ports".
  The ports.tar.gz file is the ports collection from the OpenBSD 2.8 release.
  It contains 6596 directories and 13868 files. The test systems are:

  1. Celeron-450, 128Mb, two IDE drives, the system at wd0, file system for
     test is at wd1. Size of test file system is 8 Gb, number of cg=991,
     size of cg is 8m, block size = 8k, fragment size = 1k OpenBSD-current
     from Dec 2000 with BUFCACHEPERCENT=35

  2. PIII-600, 128Mb, two IBM DTLA-307045 IDE drives at i815e, the system
     at wd0, file system for test is at wd1. Size of test file system is 40 Gb,
     number of cg=5324, size of cg is 8m, block size = 8k, fragment size = 1k
     OpenBSD-current from Dec 2000 with BUFCACHEPERCENT=50

  You can get more info about the test systems and methods at:
  http://www.ptci.ru/gluk/dirpref/old/dirpref.html

                                Test Results

               tar -xzf ports.tar.gz               rm -rf ports
    mode  old dirpref new dirpref speedup old dirprefnew dirpref speedup
                               First system
   normal     667         472      1.41       477        331       1.44
   async      285         144      1.98       130         14       9.29
   sync       768         616      1.25       477        334       1.43
   softdep    413         252      1.64       241         38       6.34
                               Second system
   normal     329         81       4.06       263.5       93.5     2.81
   async      302         25.7    11.75       112          2.26   49.56
   sync       281         57.0     4.93       263         90.5     2.9
   softdep    341         40.6     8.4        284          4.76   59.66

  "old dirpref" and "new dirpref" columns give a test time in seconds.
  speedup - speed increasement in times, ie. old dirpref / new dirpref.

  ------

  Algorithm description

  The old dirpref algorithm is described in comments:

  /*
   * Find a cylinder to place a directory.
   *
   * The policy implemented by this algorithm is to select from
   * among those cylinder groups with above the average number of
   * free inodes, the one with the smallest number of directories.
   */

  A new directory is allocated in a different cylinder groups than its
  parent directory resulting in a directory tree that is spreaded across
  all the cylinder groups. This spreading out results in a non-optimal
  access to the directories and files. When we have a small filesystem
  it is not a problem but when the filesystem is big then perfomance
  degradation becomes very apparent.

  What I mean by a big file system ?

    1. A big filesystem is a filesystem which occupy 20-30 or more percent
       of total drive space, i.e. first and last cylinder are physically
       located relatively far from each other.
    2. It has a relatively large number of cylinder groups, for example
       more cylinder groups than 50% of the buffers in the buffer cache.

  The first results in long access times, while the second results in
  many buffers being used by metadata operations. Such operations use
  cylinder group blocks and on-disk inode blocks. The cylinder group
  block (fs->fs_cblkno) contains struct cg, inode and block bit maps.
  It is 2k in size for the default filesystem parameters. If new and
  parent directories are located in different cylinder groups then the
  system performs more input/output operations and uses more buffers.
  On filesystems with many cylinder groups, lots of cache buffers are
  used for metadata operations.

  My solution for this problem is very simple. I allocate many directories
  in one cylinder group. I also do some things, so that the new allocation
  method does not cause excessive fragmentation and all directory inodes
  will not be located at a location far from its file's inodes and data.
  The algorithm is:
  /*
   * Find a cylinder group to place a directory.
   *
   * The policy implemented by this algorithm is to allocate a
   * directory inode in the same cylinder group as its parent
   * directory, but also to reserve space for its files inodes
   * and data. Restrict the number of directories which may be
   * allocated one after another in the same cylinder group
   * without intervening allocation of files.
   *
   * If we allocate a first level directory then force allocation
   * in another cylinder group.
   */

    My early versions of dirpref give me a good results for a wide range of
  file operations and different filesystem capacities except one case:
  those applications that create their entire directory structure first
  and only later fill this structure with files.

    My solution for such and similar cases is to limit a number of
  directories which may be created one after another in the same cylinder
  group without intervening file creations. For this purpose, I allocate
  an array of counters at mount time. This array is linked to the superblock
  fs->fs_contigdirs[cg]. Each time a directory is created the counter
  increases and each time a file is created the counter decreases. A 60Gb
  filesystem with 8mb/cg requires 10kb of memory for the counters array.

    The maxcontigdirs is a maximum number of directories which may be created
  without an intervening file creation. I found in my tests that the best
  performance occurs when I restrict the number of directories in one cylinder
  group such that all its files may be located in the same cylinder group.
  There may be some deterioration in performance if all the file inodes
  are in the same cylinder group as its containing directory, but their
  data partially resides in a different cylinder group. The maxcontigdirs
  value is calculated to try to prevent this condition. Since there is
  no way to know how many files and directories will be allocated later
  I added two optimization parameters in superblock/tunefs. They are:

          int32_t  fs_avgfilesize;   /* expected average file size */
          int32_t  fs_avgfpdir;      /* expected # of files per directory */

  These parameters have reasonable defaults but may be tweeked for special
  uses of a filesystem. They are only necessary in rare cases like better
  tuning a filesystem being used to store a squid cache.

  I have been using this algorithm for about 3 months. I have done
  a lot of testing on filesystems with different capacities, average
  filesize, average number of files per directory, and so on. I think
  this algorithm has no negative impact on filesystem perfomance. It
  works better than the default one in all cases. The new dirpref
  will greatly improve untarring/removing/coping of big directories,
  decrease load on cvs servers and much more. The new dirpref doesn't
  speedup a compilation process, but also doesn't slow it down.

  Obtained from:	Grigoriy Orlov <gluk@ptci.ru>
=====

=====
iedowse     2001/04/23 17:37:17 PDT
  Pre-dirpref versions of fsck may zero out the new superblock fields
  fs_contigdirs, fs_avgfilesize and fs_avgfpdir. This could cause
  panics if these fields were zeroed while a filesystem was mounted
  read-only, and then remounted read-write.

  Add code to ffs_reload() which copies the fs_contigdirs pointer
  from the previous superblock, and reinitialises fs_avgf* if necessary.

  Reviewed by:	mckusick
=====

=====
nik         2001/04/10 03:36:44 PDT
  Add information about the new options to newfs and tunefs which set the
  expected average file size and number of files per directory.  Could do
  with some fleshing out.
=====

Revision 1.84 / (download) - annotate - [select for diffs], Sun Sep 2 01:58:30 2001 UTC (22 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.83: +20 -18 lines
Diff to previous 1.83 (colored) to selected 1.239.2.4 (colored)

Incorporate fix by iedowse @ FreeBSD to allow disks with large numbers of
cylinder groups to work correctly, with minor modifications by me to work
with our FFS_EI code.  From the FreeBSD commit message:

	The ffs superblock includes a 128-byte region for use by temporary
	in-core pointers to summary information. An array in this region
	(fs_csp) could overflow on filesystems with a very large number of
	cylinder groups (~16000 on i386 with 8k blocks). When this happens,
	other fields in the superblock get corrupted, and fsck refuses to
	check the filesystem.

	Solve this problem by replacing the fs_csp array in 'struct fs'
	with a single pointer, and add padding to keep the length of the
	128-byte region fixed. Update the kernel and userland utilities
	to use just this single pointer.

	With this change, the kernel no longer makes use of the superblock
	fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c
	to indicate that these fields must be calculated for compatibility
	with older kernels.

	Reviewed by:    mckusick

Revision 1.81.4.2 / (download) - annotate - [select for diffs], Sat Aug 25 06:17:17 2001 UTC (22 years, 7 months ago) by thorpej
Branch: kqueue
Changes since 1.81.4.1: +4 -4 lines
Diff to previous 1.81.4.1 (colored) to branchpoint 1.81 (colored) to selected 1.239.2.4 (colored)

Merge Aug 24 -current into the kqueue branch.

Revision 1.80.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:13:18 2001 UTC (22 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.2: +5 -5 lines
Diff to previous 1.80.2.2 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up with -current.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Aug 17 02:18:48 2001 UTC (22 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.82: +4 -4 lines
Diff to previous 1.82 (colored) to selected 1.239.2.4 (colored)

remove third argument (`int ns') from ffs_sb_swap(), and let ffs_sb_swap()
determine the endianness of the `struct fs *o' superblock from o->fs_magic
and set needswap as necessary, rather than trusting the caller to get
it right.  invariably, almost every caller of ffs_sb_swap() was calling it
with ns set to the wrong value for ns anyway!
ansi KNF ffs_bswap.c declarations whilst here.

this fixes all sorts of problems when trying to use other-endian file systems,
notably the kernel trying to access memory *way* off, possibly corrupting or
panicing, and userland programs SEGVing and/or corrupting things (e.g,
"fsck_ffs -B"  to swap a file system endianness).

whilst the previous rev of ffs_bswap.c (1.10, 2000/12/23) made this problem
worse, i suspect that the problem was always there and previous versions
just happened not to trash things at the wrong time.

FFS_EI should now be a lot more stable.

Revision 1.81.4.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:14:06 2001 UTC (22 years, 8 months ago) by lukem
Branch: kqueue
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) to selected 1.239.2.4 (colored)

update to -current

Revision 1.82 / (download) - annotate - [select for diffs], Thu Jul 26 07:58:55 2001 UTC (22 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) to selected 1.239.2.4 (colored)

if printing the value of fs_clean, say 'fs_clean' instead of 'fs_flags' ...

Revision 1.80.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:10:07 2001 UTC (22 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.80.2.1: +2 -2 lines
Diff to previous 1.80.2.1 (colored) to branchpoint 1.80 (colored) to selected 1.239.2.4 (colored)

Catch up to -current.

Revision 1.81 / (download) - annotate - [select for diffs], Wed May 30 11:57:18 2001 UTC (22 years, 10 months ago) by mrg
Branch: MAIN
CVS Tags: perseant-lfsv2-base, perseant-lfsv2
Branch point for: kqueue
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored) to selected 1.239.2.4 (colored)

use _KERNEL_OPT

Revision 1.80.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:50:06 2001 UTC (23 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.80: +3 -2 lines
Diff to previous 1.80 (colored) to selected 1.239.2.4 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.53.2.5 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:42 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.53.2.4: +2 -5 lines
Diff to previous 1.53.2.4 (colored) next main 1.54 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Feb 7 22:40:06 2001 UTC (23 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.79: +1 -4 lines
Diff to previous 1.79 (colored) to selected 1.239.2.4 (colored)

remove debug code that was left in by accident.

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jan 22 12:17:43 2001 UTC (23 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored) to selected 1.239.2.4 (colored)

make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const

Revision 1.53.2.4 / (download) - annotate - [select for diffs], Thu Jan 18 09:24:04 2001 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.53.2.3: +3 -0 lines
Diff to previous 1.53.2.3 (colored) to selected 1.239.2.4 (colored)

Sync with head (for UBC+NFS fixes, mostly).

Revision 1.78 / (download) - annotate - [select for diffs], Wed Jan 10 17:49:18 2001 UTC (23 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.77: +2 -1 lines
Diff to previous 1.77 (colored) to selected 1.239.2.4 (colored)

On a RW->RO transition, explicitly clear fs_fmod after the cgupdate/sbupdate,
to prevent spurious writebacks and whinging about the (correct!) clean flag.
(Why this isn't done in ffs_sbupdate(), I dunno...)

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jan 10 04:47:10 2001 UTC (23 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored) to selected 1.239.2.4 (colored)

attach the softdep pagecache pseudo-buffers to the inode
so we can find them quickly in the softdep truncate path.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Jan 9 10:44:19 2001 UTC (23 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.75: +2 -1 lines
Diff to previous 1.75 (colored) to selected 1.239.2.4 (colored)

ffs_reload(): Copy fs_ronly into the new superblock, too, as it may have been
modified on disk (e.g. by fsck(8)).  This flag should really be elsewhere.

Revision 1.67.2.2 / (download) - annotate - [select for diffs], Thu Dec 14 23:36:45 2000 UTC (23 years, 4 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.67.2.1: +4 -4 lines
Diff to previous 1.67.2.1 (colored) to branchpoint 1.67 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.71 (requested by fvdl):
  Improve NFS performance, possibly with as much as 100% in
  throughput.  Please note: this implies a kernel interface change,
  VOP_FSYNC gains two arguments.

Revision 1.53.2.3 / (download) - annotate - [select for diffs], Fri Dec 8 09:20:12 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.53.2.2: +12 -2 lines
Diff to previous 1.53.2.2 (colored) to selected 1.239.2.4 (colored)

Sync with HEAD.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Dec 4 09:37:06 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.74: +3 -2 lines
Diff to previous 1.74 (colored) to selected 1.239.2.4 (colored)

in ffs_sync(), don't skip vnodes which have (potentially dirty) pages.

Revision 1.74 / (download) - annotate - [select for diffs], Sun Dec 3 19:52:06 2000 UTC (23 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.73: +3 -1 lines
Diff to previous 1.73 (colored) to selected 1.239.2.4 (colored)

In addition to setting the softdep flag in the superblock when
mounting with softdeps, also explicitly clear it when we don't,
so that a leftover setting after a crash will be cleared.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Nov 27 08:39:55 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.72: +8 -1 lines
Diff to previous 1.72 (colored) to selected 1.239.2.4 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.53.2.2 / (download) - annotate - [select for diffs], Mon Nov 20 18:11:46 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.53.2.1: +217 -58 lines
Diff to previous 1.53.2.1 (colored) to selected 1.239.2.4 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.72 / (download) - annotate - [select for diffs], Fri Oct 13 16:40:26 2000 UTC (23 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.71: +1 -2 lines
Diff to previous 1.71 (colored) to selected 1.239.2.4 (colored)

There is no need to explicitly include <uvm/uvm_extern.h> for
<sys/sysctl.h> anymore.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Sep 19 22:04:09 2000 UTC (23 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored) to selected 1.239.2.4 (colored)

Adapt for VOP_FSYNC parameter change.

Implement range fsync for FFS. Note: not yet implemented for the
SOFTDEP case.

Revision 1.67.2.1 / (download) - annotate - [select for diffs], Mon Jul 3 17:44:03 2000 UTC (23 years, 9 months ago) by fvdl
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Changes since 1.67: +16 -6 lines
Diff to previous 1.67 (colored) to selected 1.239.2.4 (colored)

pullup from trunk:

Fix a "locking against myself" problem; holding ufs_hashlock
across getnewvnode() could cause a recursive lock if it resulted in
recycling a vnode that was using softdeps.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Jun 28 14:11:33 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored) to selected 1.239.2.4 (colored)

<vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.69 / (download) - annotate - [select for diffs], Tue Jun 27 23:51:22 2000 UTC (23 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored) to selected 1.239.2.4 (colored)

Due to popular demand, change vinsheadfree to ungetnewvnode to make
the name clearer. No functional change.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jun 27 23:39:17 2000 UTC (23 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.67: +16 -6 lines
Diff to previous 1.67 (colored) to selected 1.239.2.4 (colored)

In ffs_vget, do not hold ufs_haslock across the call to getnewvnode.
We may sleep in it, or even recurse, with softdeps. Instead, grab
the lock later, but check if noone else has beaten us to the VFS_VGET
operation, and if so, roll back getnewvnode using vinsheadfree, and
just return.

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:34 2000 UTC (23 years, 10 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.62: +57 -10 lines
Diff to previous 1.62 (colored) next main 1.63 (colored) to selected 1.239.2.4 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Jun 16 05:45:14 2000 UTC (23 years, 10 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) to selected 1.239.2.4 (colored)

make it compile (fix typo)

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jun 16 00:30:15 2000 UTC (23 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.65: +8 -2 lines
Diff to previous 1.65 (colored) to selected 1.239.2.4 (colored)

ignore the softdep flags when mounting and there's no softdep in the kernel.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jun 15 22:35:37 2000 UTC (23 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.64: +45 -5 lines
Diff to previous 1.64 (colored) to selected 1.239.2.4 (colored)

Allow MNT_SOFTDEP to be passed in via the mount(2) system call, do not
require it to be set via tunefs(8). Silently ignore it when doing
an update mount of a writeable filesystem, the FFS/softdep code isn't ready
for this yet.

Revision 1.64 / (download) - annotate - [select for diffs], Mon May 29 18:28:48 2000 UTC (23 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.63: +6 -5 lines
Diff to previous 1.63 (colored) to selected 1.239.2.4 (colored)

Use LIST_{FIRST,NEXT,EMPTY}().

Revision 1.63 / (download) - annotate - [select for diffs], Mon May 29 18:04:30 2000 UTC (23 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored) to selected 1.239.2.4 (colored)

Add a new inode flags called IN_ACCESSED.  This used in place of IN_MODIFIED
to record that the atime was updated.  In ffs_update(), we only do synchronous
writes if something *other* than the atime was changed.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Apr 4 09:23:20 2000 UTC (24 years ago) by jdolecek
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.61: +5 -1 lines
Diff to previous 1.61 (colored) to selected 1.239.2.4 (colored)

Add a new sysctl variable vfs.ffs.log_changeopt - if this is true,
an optimalization strategy change is logged into syslog. Default
is 0 (to not log). This replaces the recent not quite "right"
change to only log the change if kernel is compiled with DEBUG.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Mar 30 12:41:12 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.60: +21 -21 lines
Diff to previous 1.60 (colored) to selected 1.239.2.4 (colored)

Remove register declarations.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Mar 30 02:48:22 2000 UTC (24 years ago) by simonb
Branch: MAIN
Changes since 1.59: +1 -5 lines
Diff to previous 1.59 (colored) to selected 1.239.2.4 (colored)

Delete redundant decls of rootvp - it's in <sys/systm.h>.
Delete redundant decl of ffs_sbupdate() - it's in <ufs/ffs/ffs_extern.h>.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Mar 16 18:20:06 2000 UTC (24 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.58: +19 -1 lines
Diff to previous 1.58 (colored) to selected 1.239.2.4 (colored)

Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading.

For each leaf filesystem, add appropriate vfs_done routine.

Also remember how many times ffs_init() was called and do
the appropriate initialization on first call only. In ffs_done(),
destroy the resources when called by the last user of ffs code.
Change mfs to call ffs_init()/ffs_done() appropriately.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Mar 16 10:37:00 2000 UTC (24 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.57: +11 -8 lines
Diff to previous 1.57 (colored) to selected 1.239.2.4 (colored)

Inititalize the fs variable struct a little earlier to avoid referencing
a bad pointer in a printf. Problem reported by Krister Walfridsson.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Feb 14 22:00:23 2000 UTC (24 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.56: +6 -4 lines
Diff to previous 1.56 (colored) to selected 1.239.2.4 (colored)

Fixes to the softdep code from Ethan Solomita <ethan@geocast.com>.
* Fix buffer ordering when it has dependencies.
* Alleviate memory problems.
* Deal with some recursive vnode locks (sigh).
* Fix other bugs.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:37 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.52.2.1: +107 -39 lines
Diff to previous 1.52.2.1 (colored) next main 1.53 (colored) to selected 1.239.2.4 (colored)

Pull up to last week's -current.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Tue Dec 21 23:20:07 1999 UTC (24 years, 4 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.52: +41 -6 lines
Diff to previous 1.52 (colored) to selected 1.239.2.4 (colored)

Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".

Revision 1.49.2.2 / (download) - annotate - [select for diffs], Mon Dec 20 13:16:30 1999 UTC (24 years, 4 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002
Changes since 1.49.2.1: +3 -2 lines
Diff to previous 1.49.2.1 (colored) to branchpoint 1.49 (colored) next main 1.50 (colored) to selected 1.239.2.4 (colored)

Pull up revision 1.56 (via patch, requested by drochner):
  Fix the use of an uninitialized variable.  This could be triggered
  if the file system to be mounted is a pre-BSD4.4 one (which can
  result in the old file system being rejected).

Revision 1.56 / (download) - annotate - [select for diffs], Fri Dec 10 14:36:04 1999 UTC (24 years, 4 months ago) by drochner
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.55: +4 -2 lines
Diff to previous 1.55 (colored) to selected 1.239.2.4 (colored)

Call ffs_oldfscompat() before all the consistency checks, to avoid the
use of uninitialized data in the checks if the filesystem is an old one.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:13 1999 UTC (24 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.54: +100 -22 lines
Diff to previous 1.54 (colored) to selected 1.239.2.4 (colored)

Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O

Revision 1.53.4.3 / (download) - annotate - [select for diffs], Mon Nov 15 00:42:23 1999 UTC (24 years, 5 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.53.4.2: +3 -2 lines
Diff to previous 1.53.4.2 (colored) next main 1.54 (colored) to selected 1.239.2.4 (colored)

Sync with -current

Revision 1.53.4.2 / (download) - annotate - [select for diffs], Wed Nov 3 23:40:32 1999 UTC (24 years, 5 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.53.4.1: +2 -2 lines
Diff to previous 1.53.4.1 (colored) to selected 1.239.2.4 (colored)

Give ufs_ihashget an extra argument: the flags passed to vget() for
locking. This way we can avoid locking against ourselves when
ufs_ihashget is called during the flushing of metadata. XXX

Also, comment out a VOP_FSYNC call that I think is now unneeded, and
put a diagnostic printf there to check if this still happens.

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Wed Oct 20 22:57:12 1999 UTC (24 years, 6 months ago) by thorpej
Branch: thorpej_scsipi
Changes since 1.53: +3 -2 lines
Diff to previous 1.53 (colored) to selected 1.239.2.4 (colored)

Sync /w trunk.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Oct 20 14:32:11 1999 UTC (24 years, 6 months ago) by enami
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.53: +3 -2 lines
Diff to previous 1.53 (colored) to selected 1.239.2.4 (colored)

Check if the type of device node isn't VBAD before touching v_specinfo.  If
the device vnode is revoked, the field is NULL and touching it causes null
pointer derefercence.

Revision 1.53.4.1 / (download) - annotate - [select for diffs], Tue Oct 19 12:50:37 1999 UTC (24 years, 6 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.53: +99 -21 lines
Diff to previous 1.53 (colored) to selected 1.239.2.4 (colored)

Bring in Kirk McKusick's FFS softdep code on a branch.

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Mon Oct 18 05:05:34 1999 UTC (24 years, 6 months ago) by cgd
Branch: netbsd-1-4
Changes since 1.49: +5 -2 lines
Diff to previous 1.49 (colored) to selected 1.239.2.4 (colored)

pull up rev 1.53 from trunk (requested by wrstuden):
  In spec_close(), call the device's close routine with the vnode
  unlocked if the call might block. Force a non-blocking close if
  VXLOCK is set.  This eliminates a potential deadlock situation, and
  should eliminate the dirty buffers on reboot issue.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Oct 16 23:53:29 1999 UTC (24 years, 6 months ago) by wrstuden
Branch: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.52: +5 -2 lines
Diff to previous 1.52 (colored) to selected 1.239.2.4 (colored)

In spec_close(), if we're not doing a non-blocking close and VXLOCK is
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.

Make all unmount routines lock the device vnode before calling VOP_CLOSE().

Revision 1.52 / (download) - annotate - [select for diffs], Tue Aug 3 19:22:43 1999 UTC (24 years, 8 months ago) by drochner
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.51: +7 -4 lines
Diff to previous 1.51 (colored) to selected 1.239.2.4 (colored)

clean up inclusion of "opt_ffs.h" and use of "FFS_EI" a bit

Revision 1.49.4.3 / (download) - annotate - [select for diffs], Mon Aug 2 22:57:01 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.49.4.2: +5 -3 lines
Diff to previous 1.49.4.2 (colored) to branchpoint 1.49 (colored) next main 1.50 (colored) to selected 1.239.2.4 (colored)

Update from trunk.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jul 17 01:08:29 1999 UTC (24 years, 9 months ago) by wrstuden
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.50: +5 -2 lines
Diff to previous 1.50 (colored) to selected 1.239.2.4 (colored)

Adjust mountroot routines to vrele rootvp in case of mount error. Closes
PR 7977 by Neil Carson, <neil@brini.com>.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Jul 8 01:06:05 1999 UTC (24 years, 9 months ago) by wrstuden
Branch: MAIN
Changes since 1.49: +1 -2 lines
Diff to previous 1.49 (colored) to selected 1.239.2.4 (colored)

Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.

Revision 1.49.4.2 / (download) - annotate - [select for diffs], Sun Jul 4 01:52:13 1999 UTC (24 years, 9 months ago) by chs
Branch: chs-ubc2
Changes since 1.49.4.1: +3 -1 lines
Diff to previous 1.49.4.1 (colored) to branchpoint 1.49 (colored) to selected 1.239.2.4 (colored)

initialize new struct mount fields in ffs_mountfs().

Revision 1.49.4.1 / (download) - annotate - [select for diffs], Mon Jun 7 04:25:34 1999 UTC (24 years, 10 months ago) by chs
Branch: chs-ubc2
Changes since 1.49: +2 -1 lines
Diff to previous 1.49 (colored) to selected 1.239.2.4 (colored)

merge everything from chs-ubc branch.

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Sun May 30 15:06:57 1999 UTC (24 years, 10 months ago) by chs
Branch: chs-ubc
Changes since 1.44: +4 -1 lines
Diff to previous 1.44 (colored) next main 1.45 (colored) to selected 1.239.2.4 (colored)

there's a new rule that all vnodes must call uvm_vnp_setsize()
before anyone can possibly access them, so do this in ffs_vget().

Revision 1.49 / (download) - annotate - [select for diffs], Fri Mar 5 12:02:18 1999 UTC (25 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: netbsd-1-4, chs-ubc2
Changes since 1.48: +6 -3 lines
Diff to previous 1.48 (colored) to selected 1.239.2.4 (colored)

Don't check fs_bsize before the superblock has been swapped if needed.
Check value of sbsize before allocating memory with this value.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Feb 26 23:44:49 1999 UTC (25 years, 1 month ago) by wrstuden
Branch: MAIN
Changes since 1.47: +4 -6 lines
Diff to previous 1.47 (colored) to selected 1.239.2.4 (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.47 / (download) - annotate - [select for diffs], Wed Feb 10 13:14:09 1999 UTC (25 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.46: +8 -3 lines
Diff to previous 1.46 (colored) to selected 1.239.2.4 (colored)

Make sure a buffer optained from bread() is always bresle()'d in case of
error. Closes PR kern/1448 from Wolfgang Solfrank.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Dec 4 11:00:40 1998 UTC (25 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.45: +11 -5 lines
Diff to previous 1.45 (colored) to selected 1.239.2.4 (colored)

Sanity check a few values in the superblock, to avoid mallocing huge
memory area if we try to mount a corrupted filesystem. Fixes kern/3933.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Nov 12 19:54:42 1998 UTC (25 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored) to selected 1.239.2.4 (colored)

defopt FFS_EI

Revision 1.44 / (download) - annotate - [select for diffs], Fri Oct 23 00:31:29 1998 UTC (25 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc-base
Branch point for: chs-ubc
Changes since 1.43: +11 -9 lines
Diff to previous 1.43 (colored) to selected 1.239.2.4 (colored)

Use DINODE_SIZE rather than pointer arithmetic.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Sep 1 03:11:08 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.42: +13 -4 lines
Diff to previous 1.42 (colored) to selected 1.239.2.4 (colored)

Use the pool allocator and the "nointr" pool page allocator for FFS inodes.

XXX MFS also comes in here for inodes, and used a different malloc type,
but the structure is the same, so we just use the FFS inode pool.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Aug 9 20:15:39 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.41: +17 -17 lines
Diff to previous 1.41 (colored) to selected 1.239.2.4 (colored)

bzero->memset, bcopy->memcpy, bcmp->memcmp

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jul 5 08:49:48 1998 UTC (25 years, 9 months ago) by jonathan
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored) to selected 1.239.2.4 (colored)

* defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Jun 24 20:58:48 1998 UTC (25 years, 10 months ago) by sommerfe
Branch: MAIN
Changes since 1.39: +2 -7 lines
Diff to previous 1.39 (colored) to selected 1.239.2.4 (colored)

Always include fifos; "not an option any more".

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jun 22 22:01:09 1998 UTC (25 years, 10 months ago) by sommerfe
Branch: MAIN
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored) to selected 1.239.2.4 (colored)

defopt for options FIFO

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jun 13 16:26:22 1998 UTC (25 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.37: +17 -16 lines
Diff to previous 1.37 (colored) to selected 1.239.2.4 (colored)

KNF, mostly of FFS_EI changes.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jun 9 07:46:33 1998 UTC (25 years, 10 months ago) by scottr
Branch: MAIN
Changes since 1.36: +3 -1 lines
Diff to previous 1.36 (colored) to selected 1.239.2.4 (colored)

Protect various config(8)-generated files from inclusion while
building LKMs.  Fixes PR 5557.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jun 8 04:27:50 1998 UTC (25 years, 10 months ago) by scottr
Branch: MAIN
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored) to selected 1.239.2.4 (colored)

Use the newly-defined opt_quota.h.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Jun 5 19:53:02 1998 UTC (25 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.34: +5 -3 lines
Diff to previous 1.34 (colored) to selected 1.239.2.4 (colored)

Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Mar 18 15:57:28 1998 UTC (26 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.33: +110 -33 lines
Diff to previous 1.33 (colored) to selected 1.239.2.4 (colored)

Add support for reading/writing FFS in non-native byte order, conditioned
to "options FFS_EI". The superblock and inodes (without blk addr) are
byteswapped at disk read/write time, other metadatas are byteswapped
when used (as they are acceeded directly in the buffer cache).
This required the addition of a "um_flags" field to struct ufsmount.
ffs_bswap.c contains superblock and inode byteswap routines also used
by userland utilities.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Mar 1 02:23:15 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.32: +114 -75 lines
Diff to previous 1.32 (colored) to selected 1.239.2.4 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:14:04 1998 UTC (26 years, 1 month ago) by fvdl
Branch: netbsd, CSRG
CVS Tags: lite-2
Changes since 1.1.1.1: +277 -129 lines
Diff to previous 1.1.1.1 (colored) to selected 1.239.2.4 (colored)

Import 4.4BSD-Lite2

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

Import 4.4BSD-Lite for reference

Revision 1.32 / (download) - annotate - [select for diffs], Wed Feb 18 07:05:50 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +17 -1 lines
Diff to previous 1.31 (colored) to selected 1.239.2.4 (colored)

Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().

Revision 1.31 / (download) - annotate - [select for diffs], Thu Oct 16 18:29:11 1997 UTC (26 years, 6 months ago) by mjacob
Branch: MAIN
CVS Tags: 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
Changes since 1.30: +4 -3 lines
Diff to previous 1.30 (colored) to selected 1.239.2.4 (colored)

In calculating the f_bavail field, don't take 32 bit quantities and
multiply them by 90 (to be divided by 100) and expect them to be sane
for very large values (I was getting a negative 'avail' count).

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jul 22 14:36:31 1997 UTC (26 years, 9 months ago) by fvdl
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia
Changes since 1.29: +1 -1 lines
Diff to previous 1.29 (colored) to selected 1.239.2.4 (colored)

Fix messed up RCS Id.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jul 7 23:37:36 1997 UTC (26 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.28: +10 -3 lines
Diff to previous 1.28 (colored) to selected 1.239.2.4 (colored)

Get locking around inode hashing right.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Jul 7 11:47:06 1997 UTC (26 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.27: +2 -10 lines
Diff to previous 1.27 (colored) to selected 1.239.2.4 (colored)

Oops, I messed up the lock. Reverting it until I have time to fix it,
to avoid people getting trouble after the supscan hits.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jul 6 12:43:43 1997 UTC (26 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.26: +10 -2 lines
Diff to previous 1.26 (colored) to selected 1.239.2.4 (colored)

Put lock around inode hashing, because getnewvnode or MALLOC might block,
creating race conditions.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jun 12 17:14:58 1997 UTC (26 years, 10 months ago) by mrg
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) to selected 1.239.2.4 (colored)

remove swap configuration.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jun 11 10:09:46 1997 UTC (26 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.24: +7 -6 lines
Diff to previous 1.24 (colored) to selected 1.239.2.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.23.4.1 / (download) - annotate - [select for diffs], Wed Mar 12 21:26:25 1997 UTC (27 years, 1 month ago) by is
Branch: is-newarp
Changes since 1.23: +1 -14 lines
Diff to previous 1.23 (colored) next main 1.24 (colored) to selected 1.239.2.4 (colored)

Merge in changes from Trunk

Revision 1.24 / (download) - annotate - [select for diffs], Mon Mar 10 06:18:29 1997 UTC (27 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: is-newarp-before-merge
Changes since 1.23: +1 -14 lines
Diff to previous 1.23 (colored) to selected 1.239.2.4 (colored)

Just increment the generation count.  Using the time is bogus and defeats
fsirand(8).

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jan 31 03:05:31 1997 UTC (27 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: mrg-vm-swap, is-newarp-base
Branch point for: is-newarp
Changes since 1.22: +7 -2 lines
Diff to previous 1.22 (colored) to selected 1.239.2.4 (colored)

- Add ffs_mountroot to ffs_vfsops.
- Only attempt to mount a root FFS on a DV_DISK class device.

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Tue Jan 14 21:27:30 1997 UTC (27 years, 3 months ago) by thorpej
Branch: thorpej-setroot
Changes since 1.22: +7 -2 lines
Diff to previous 1.22 (colored) next main 1.23 (colored) to selected 1.239.2.4 (colored)

Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection.  Notable features:

	- All ports behave in a consistent manner regarding root
	  device selection.
	- No more "options GENERIC"; all kernels have the ability
	  to boot with RB_ASKNAME to select root device and file system
	  type.
	- Root file system type can be wildcarded; a machine-independent
	  function will try all possible file systems for the selected
	  root device until one succeeds.
	- If the root file system fails to mount, the operator will
	  be given the chance to select a new root device and file
	  system type, rather than having the machine simply panic.
	- nfs_mountroot() no longer panics if any part of the NFS
	  mount process fails; it now returns an error, giving the
	  operator a chance to recover.
	- New, more consistent, config(8) grammar.  The constructs:

		config netbsd swap generic
		config netbsd root on nfs

	  have been replaced with:

		config netbsd root on ? type ?
		config netbsd root on ? type nfs

	  Additionally, the operator may select or wildcard root file
	  system type in the kernel configuration file:

		config netbsd root on cd0a type cd9660

	  config(8) now requires that a "root" specification be
	  made.  "root" may be wired down or wildcarded.  "swap" and
	  "dump" specifications are optional, and follow previous
	  semantics.

	- config(8) has a new "file-system" keyword, used to configure
	  file systems into the kernel.  Eventually, this will be used
	  to generate the default vfssw[].

	- "options NFSCLIENT" is obsolete, and is replaced by
	  "file-system NFS".  "options NFSSERVER" still exists, since
	  NFS server support is independent of the NFS file system
	  client.

	- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
	  will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot().  Only SPARC, i386, and Alpha ports have been
tested at this time.  Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().

Revision 1.22 / (download) - annotate - [select for diffs], Sun Dec 22 10:10:41 1996 UTC (27 years, 4 months ago) by cgd
Branch: MAIN
Branch point for: thorpej-setroot
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored) to selected 1.239.2.4 (colored)

Change the second and third args to struct vfsops' (*vfs_mount)() to
'const char *', and 'void *', respectively.  The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions.  The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 12 21:58:47 1996 UTC (27 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored) to selected 1.239.2.4 (colored)

revert previous kprintf changes

Revision 1.20 / (download) - annotate - [select for diffs], Thu Oct 10 17:21:19 1996 UTC (27 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.239.2.4 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.19 / (download) - annotate - [select for diffs], Fri Feb 9 22:22:26 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.18: +53 -33 lines
Diff to previous 1.18 (colored) to selected 1.239.2.4 (colored)

ffs prototypes

Revision 1.16.2.2 / (download) - annotate - [select for diffs], Tue Dec 26 21:14:36 1995 UTC (28 years, 3 months ago) by mycroft
Branch: netbsd-1-1
CVS Tags: netbsd-1-1-PATCH001
Changes since 1.16.2.1: +23 -8 lines
Diff to previous 1.16.2.1 (colored) to branchpoint 1.16 (colored) next main 1.17 (colored) to selected 1.239.2.4 (colored)

Pull in ffs_reload() fix from trunk.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Dec 19 23:27:53 1995 UTC (28 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.17: +23 -8 lines
Diff to previous 1.17 (colored) to selected 1.239.2.4 (colored)

Fix from Lite-2: when reloading the file system, save fs_maxcluster and
the old summary structure pointers, and recalculate cluster per cyl. grp.
information.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 11 22:00:23 1995 UTC (28 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored) to selected 1.239.2.4 (colored)

ffs -> ufs

Revision 1.16.2.1 / (download) - annotate - [select for diffs], Wed Nov 1 00:06:34 1995 UTC (28 years, 5 months ago) by jtc
Branch: netbsd-1-1
CVS Tags: netbsd-1-1-RELEASE
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored) to selected 1.239.2.4 (colored)

complete ufs -> ffs change (From John Kohl; PR #1403)

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jun 18 14:48:22 1995 UTC (28 years, 10 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-1-base
Branch point for: netbsd-1-1
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored) to selected 1.239.2.4 (colored)

don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN

Revision 1.15 / (download) - annotate - [select for diffs], Wed Apr 12 21:21:00 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.14: +54 -11 lines
Diff to previous 1.14 (colored) to selected 1.239.2.4 (colored)

Make use of the `fs_clean' field.  If it was set when the file system was
mounted or upgraded to r-w, then clear it and set it again later when the
file system is unmounted or downgraded.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Mar 9 12:06:08 1995 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) to selected 1.239.2.4 (colored)

copy*str() should use size_t.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Mar 8 01:51:49 1995 UTC (29 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.239.2.4 (colored)

size for copyinstr should be u_long

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jan 18 09:44:34 1995 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +6 -10 lines
Diff to previous 1.11 (colored) to selected 1.239.2.4 (colored)

Clean up the code to frob mnt_stat a bit.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jan 18 06:19:49 1995 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +3 -7 lines
Diff to previous 1.10 (colored) to selected 1.239.2.4 (colored)

Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 15 19:49:44 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.9: +1 -2 lines
Diff to previous 1.9 (colored) to selected 1.239.2.4 (colored)

Call foo_statfs() from a common place when mounting.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Dec 14 13:03:38 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +68 -44 lines
Diff to previous 1.8 (colored) to selected 1.239.2.4 (colored)

Sync with CSRG.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Wed Nov 23 08:49:59 1994 UTC (29 years, 5 months ago) by cgd
Branch: netbsd-1-0
CVS Tags: netbsd-1-0-PATCH06, netbsd-1-0-PATCH05
Changes since 1.4: +24 -2 lines
Diff to previous 1.4 (colored) next main 1.5 (colored) to selected 1.239.2.4 (colored)

from mycroft, for patch_05

Revision 1.8 / (download) - annotate - [select for diffs], Fri Oct 28 20:20:18 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored) to selected 1.239.2.4 (colored)

This is not my day.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Oct 28 20:16:10 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.239.2.4 (colored)

Fix typo.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Oct 28 20:15:09 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +23 -3 lines
Diff to previous 1.5 (colored) to selected 1.239.2.4 (colored)

For now, limit the maxfilesize to 2^31*bsize-1 in core.  This is temporary.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Oct 28 19:59:21 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored) to selected 1.239.2.4 (colored)

Fix a couple of types in the compatibility code.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 29 06:46:37 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0
Branch point for: netbsd-1-0
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored) to selected 1.239.2.4 (colored)

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

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 28 21:50:24 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored) to selected 1.239.2.4 (colored)

Reload mnt_maxsymlinklen, for `fsck -c2'.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 22 03:01:40 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored) to selected 1.239.2.4 (colored)

Add a couple of missing casts.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jun 8 11:42:09 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Diff to selected 1.239.2.4 (colored)

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>