The NetBSD Project

CVS log for src/sys/ufs/lfs/lfs_vnops.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.238.2.4 / (download) - annotate - [select for diffs], Wed May 23 10:08:19 2012 UTC (2 days, 22 hours ago) by yamt
Branch: yamt-pagecache
Changes since 1.238.2.3: +91 -832 lines
Diff to previous 1.238.2.3 (colored) to branchpoint 1.238 (colored) next main 1.239 (colored)

sync with head.

Revision 1.218.6.1 / (download) - annotate - [select for diffs], Sat May 19 17:28:28 2012 UTC (6 days, 14 hours ago) by riz
Branch: netbsd-5
Changes since 1.218: +8 -3 lines
Diff to previous 1.218 (colored) next main 1.219 (colored)

Apply patch (requested by buhrow in ticket #1759):


sys/ufs/lfs/lfs_vnops.c				patch
sys/ufs/ufs/inode.h 				patch
sys/ufs/ufs/ufs_extern.h			patch
sys/ufs/ufs/ufs_lookup.c			patch
sys/ufs/ufs/ufs_vnops.c				patch
sys/ufs/ufs/ufs_wapbl.c				patch

	Port dholland's ufs_rename locking changes to netbsd-5.
	[buhrow, ticket #1759]

        Hello.  More testing has revealed a minor misunderstanding between the
vnode API in -current and 5.x.  The below patch, against NetBSD-5.1
sources, rolls all the accumulated patches into one patch set.  With this
patch, I believe you can now run with WAPBL, softdep or traditional ufs
semantics with heavy file loads and avoid panics due to resource exhaustion
and/or tstile deadlocks.  Testing has been done on I386, both uniprocessor
and multiprocessor, and on Sparc  machines in uniprocessor mode, though I
think multiprocessor Sparc would be fine as well.  Since these changes are
machine independent, I don't anticipate any issues on any platform.  It is
my hope that modulo any final issues that come up in the final round of
testing I'm currently performing, these patches will be ready to be pulled
up into the NetBSD-5 branch.
        Finally, I'd like to thank mouse@ and hannken@ for their help and
patience in helping me track down and test the final versions of these
patches.  With their assistance, I'm confident these patches make NetBSD-5
a much more stable and robust operating environment in a variety of
setings.

Revision 1.242 / (download) - annotate - [select for diffs], Wed May 9 00:21:18 2012 UTC (2 weeks, 3 days ago) by riastradh
Branch: MAIN
CVS Tags: yamt-pagecache-base5, HEAD
Changes since 1.241: +91 -832 lines
Diff to previous 1.241 (colored)

Adapt ffs, lfs, and ext2fs to use genfs_rename.

ok dholland, rmind

Revision 1.238.2.3 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:57 2012 UTC (5 weeks, 4 days ago) by yamt
Branch: yamt-pagecache
Changes since 1.238.2.2: +995 -111 lines
Diff to previous 1.238.2.2 (colored) to branchpoint 1.238 (colored)

sync with head

Revision 1.238.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:51 2012 UTC (7 weeks, 1 day ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.238.6.1: +11 -11 lines
Diff to previous 1.238.6.1 (colored) to branchpoint 1.238 (colored) next main 1.239 (colored)

sync to latest -current.

Revision 1.239.2.1 / (download) - annotate - [select for diffs], Sat Mar 17 17:40:06 2012 UTC (2 months, 1 week ago) by bouyer
Branch: netbsd-6
Changes since 1.239: +807 -40 lines
Diff to previous 1.239 (colored) next main 1.240 (colored)

Pull up following revision(s) (requested by perseant in ticket #116):
	sys/ufs/lfs/lfs_alloc.c: revision 1.112
	tests/fs/vfs/t_rmdirrace.c: revision 1.9
	tests/fs/vfs/t_renamerace.c: revision 1.25
	sys/ufs/lfs/lfs_vnops.c: revision 1.240
	sys/ufs/lfs/lfs_segment.c: revision 1.224
	sys/ufs/lfs/lfs_bio.c: revision 1.122
	sys/ufs/lfs/lfs_vfsops.c: revision 1.294
	sbin/newfs_lfs/make_lfs.c: revision 1.19
	sys/ufs/lfs/lfs.h: revision 1.136
Pass t_renamerace and t_rmdirrace tests.
Adapt dholland@'s fix to ufs_rename to fix PR kern/43582.  Address several
other MP locking issues discovered during the course of investigating the
same problem.
Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.
Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).

Revision 1.241 / (download) - annotate - [select for diffs], Tue Mar 13 18:41:14 2012 UTC (2 months, 1 week ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8
Changes since 1.240: +11 -11 lines
Diff to previous 1.240 (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.218.12.1 / (download) - annotate - [select for diffs], Wed Feb 29 22:23:55 2012 UTC (2 months, 3 weeks ago) by matt
Branch: matt-nb5-mips64
Changes since 1.218: +4 -4 lines
Diff to previous 1.218 (colored) next main 1.219 (colored)

Deal with UVM_PAGE_OWN changes.

Revision 1.238.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:55 2012 UTC (3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.238: +993 -108 lines
Diff to previous 1.238 (colored)

merge to -current.

Revision 1.240 / (download) - annotate - [select for diffs], Thu Feb 16 02:47:55 2012 UTC (3 months, 1 week ago) by perseant
Branch: MAIN
CVS Tags: jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.239: +807 -40 lines
Diff to previous 1.239 (colored)

Pass t_renamerace and t_rmdirrace tests.

Adapt dholland@'s fix to ufs_rename to fix PR kern/43582.  Address several
other MP locking issues discovered during the course of investigating the
same problem.

Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.

Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).

Revision 1.239 / (download) - annotate - [select for diffs], Mon Jan 2 22:10:45 2012 UTC (4 months, 3 weeks ago) by perseant
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.238: +188 -70 lines
Diff to previous 1.238 (colored)


* Remove PGO_RECLAIM during lfs_putpages()' call to genfs_putpages(),
  to avoid a live lock in the latter when reclaiming a vnode with
  dirty pages.

* Add a new segment flag, SEGM_RECLAIM, to note when a segment is
  being written for vnode reclamation, and record which inode is being
  reclaimed, to aid in forensic debugging.

* Add a new segment flag, SEGM_SINGLE, so that opportunistic writes
  can write a single segment's worth of blocks and then stop, rather
  than writing all the way up to the cleaner's reserved number of
  segments.

* Add assert statements to check mutex ownership is the way it ought
  to be, mostly in lfs_putpages; fix problems uncovered by this.

* Don't clear VU_DIROP until the inode actually makes its way to disk,
  avoiding a problem where dirop inodes could become separated
  (uncovered by a modified version of the "ckckp" forensic regression
  test).

* Move the vfs_getopsbyname() call into lfs_writerd.  Prepare code to
  make lfs_writerd notice when there are no more LFSs, and exit losing
  the reference, so that, in theory, the module can be unloaded.  This
  code is not enabled, since it causes a crash on exit.

* Set IN_MODIFIED on inodes flushed by lfs_flush_dirops.  Really we
  only need to set IN_MODIFIED if we are going to write them again
  (e.g., to write pages); need to think about this more.

Finally, several changes to help avoid "no clean segments" panics:

* In lfs_bmapv, note when a vnode is loaded only to discover whether
  its blocks are live, so it can immediately be recycled.  Since the
  cleaner will try to choose ~empty segments over full ones, this
  prevents the cleaner from (1) filling the vnode cache with junk, and
  (2) squeezing any unwritten writes to disk and running the fs out of
  segments.

* Overestimate by half the amount of metadata that will be required
  to fill the clean segments.  This will make the disk appear smaller,
  but should help avoid a "no clean segments" panic.

* Rearrange lfs_writerd.  In particular, lfs_writerd now pays
  attention to the number of clean segments available, and holds off
  writing until there is room.

Revision 1.238.2.2 / (download) - annotate - [select for diffs], Sun Nov 6 22:05:01 2011 UTC (6 months, 2 weeks ago) by yamt
Branch: yamt-pagecache
Changes since 1.238.2.1: +11 -55 lines
Diff to previous 1.238.2.1 (colored) to branchpoint 1.238 (colored)

remove pg->listq and uobj->memq

Revision 1.238.2.1 / (download) - annotate - [select for diffs], Wed Nov 2 21:54:00 2011 UTC (6 months, 3 weeks ago) by yamt
Branch: yamt-pagecache
Changes since 1.238: +9 -6 lines
Diff to previous 1.238 (colored)

page cache related changes

- maintain object pages in radix tree rather than rb tree.
- reduce unnecessary page scan in putpages.  esp. when an object has a ton of
  pages cached but only a few of them are dirty.
- reduce the number of pmap operations by tracking page dirtiness more
  precisely in uvm layer.
- fix nfs commit range tracking.
- fix nfs write clustering.  XXX hack

Revision 1.238 / (download) - annotate - [select for diffs], Tue Sep 20 14:01:33 2011 UTC (8 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.237: +3 -2 lines
Diff to previous 1.237 (colored)

strengthen the assertions about pages existing during block allocation,
which were incorrectly relaxed last year.  add some comments so that
the intent of these is hopefully clearer.

in ufs_balloc_range(), don't free pages or mark them dirty if
allocating their backing store failed.  this fixes PR 45369.

Revision 1.237 / (download) - annotate - [select for diffs], Tue Jul 12 16:59:48 2011 UTC (10 months, 2 weeks ago) by dholland
Branch: MAIN
Changes since 1.236: +8 -3 lines
Diff to previous 1.236 (colored)

Pass the ufs_lookup_results pointer around instead of fetching it from
the inode in the guts of ufs. Now, in VOPs where i_crap is used it is
used (directly) only immediately on entry to the VOP call and then
passed around by reference.

Except for rename, which needs explicit sorting out. The code in
ufs_wapbl_rename is unchanged in behavior but I'm increasingly
inclined to think it's wrong.

Revision 1.236 / (download) - annotate - [select for diffs], Mon Jul 11 08:27:41 2011 UTC (10 months, 2 weeks ago) by hannken
Branch: MAIN
Changes since 1.235: +3 -3 lines
Diff to previous 1.235 (colored)

Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do.  Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

- change all occurences of VOP_BWRITE(bp) to VOP_BWRITE(bp->b_vp, bp).
- remove layer_bwrite().
- welcome to 5.99.55

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.

Revision 1.234.6.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:32 2011 UTC (11 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.234: +40 -38 lines
Diff to previous 1.234 (colored) next main 1.235 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.235 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:01 2011 UTC (11 months, 2 weeks ago) by rmind
Branch: MAIN
Changes since 1.234: +40 -38 lines
Diff to previous 1.234 (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.226.4.6 / (download) - annotate - [select for diffs], Sat May 21 03:35:22 2011 UTC (12 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.226.4.5: +3 -3 lines
Diff to previous 1.226.4.5 (colored) to branchpoint 1.226 (colored) next main 1.227 (colored)

Fix the build.

Revision 1.226.4.5 / (download) - annotate - [select for diffs], Thu May 19 03:43:05 2011 UTC (12 months, 1 week ago) by rmind
Branch: rmind-uvmplock
Changes since 1.226.4.4: +9 -7 lines
Diff to previous 1.226.4.4 (colored) to branchpoint 1.226 (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.226.4.4 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:33 2011 UTC (14 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.226.4.3: +29 -9 lines
Diff to previous 1.226.4.3 (colored) to branchpoint 1.226 (colored)

sync with head

Revision 1.234 / (download) - annotate - [select for diffs], Wed Jan 5 19:34:27 2011 UTC (16 months, 2 weeks ago) by martin
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Changes since 1.233: +4 -3 lines
Diff to previous 1.233 (colored)

Avoid NULL deref inside a KASSERT, as discussed on tech-kern.

Revision 1.233 / (download) - annotate - [select for diffs], Sun Jan 2 05:09:32 2011 UTC (16 months, 3 weeks ago) by dholland
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.232: +4 -4 lines
Diff to previous 1.232 (colored)

Remove the special refcount behavior (adding an extra reference to the
parent dir) associated with SAVESTART in relookup().

Check all call sites to make sure that SAVESTART wasn't set while
calling relookup(); if it was, adjust the refcount behavior. Remove
related references to SAVESTART.

The only code that was reaching the extra ref was msdosfs_rename,
where the refcount behavior was already fairly broken and/or gross;
repair it.

Add a dummy 4th argument to relookup to make sure code that hasn't
been inspected won't compile. (This will go away next time the
relookup semantics change, which they will.)

Revision 1.232 / (download) - annotate - [select for diffs], Sat Dec 18 00:01:46 2010 UTC (17 months, 1 week ago) by eeh
Branch: MAIN
Changes since 1.231: +7 -4 lines
Diff to previous 1.231 (colored)

Byebye deadlock.

Revision 1.226.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:48:12 2010 UTC (21 months, 1 week ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.226.2.1: +36 -15 lines
Diff to previous 1.226.2.1 (colored) to branchpoint 1.226 (colored) next main 1.227 (colored)

Sync with HEAD.

Revision 1.215.10.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:14 2010 UTC (21 months, 2 weeks ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.215.10.4: +63 -42 lines
Diff to previous 1.215.10.4 (colored) to branchpoint 1.215 (colored) next main 1.216 (colored)

sync with head.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Aug 4 10:43:53 2010 UTC (21 months, 3 weeks ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.230: +14 -2 lines
Diff to previous 1.230 (colored)

Free the on disk inodes in the reclaim routine.

Revision 1.230 / (download) - annotate - [select for diffs], Thu Jul 29 10:54:51 2010 UTC (21 months, 4 weeks ago) by hannken
Branch: MAIN
Changes since 1.229: +9 -5 lines
Diff to previous 1.229 (colored)

Add vm page flag PG_MARKER and use it to tag dummy marker pages
in genfs_do_putpages() and uao_put().
Use 'v_uobj.uo_npages' to check for an empty memq.
Put some assertions where these marker pages may not appear.

Ok: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.226.4.3 / (download) - annotate - [select for diffs], Sat Jul 3 01:20:05 2010 UTC (22 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.226.4.2: +19 -14 lines
Diff to previous 1.226.4.2 (colored) to branchpoint 1.226 (colored)

sync with head

Revision 1.229 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:19 2010 UTC (23 months ago) by hannken
Branch: MAIN
Changes since 1.228: +6 -6 lines
Diff to previous 1.228 (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.228 / (download) - annotate - [select for diffs], Thu Jun 24 07:54:47 2010 UTC (23 months ago) by hannken
Branch: MAIN
Changes since 1.227: +16 -11 lines
Diff to previous 1.227 (colored)

Clean up vnode lock operations:

 - VOP_LOCK(vp, flags): Limit the set of allowed flags to LK_EXCLUSIVE,
   LK_SHARED and LK_NOWAIT.  LK_INTERLOCK is no longer allowed as it
   makes no sense here.

- VOP_ISLOCKED(vp): Remove the for some time unused return value
  LK_EXCLOTHER.  Mark this operation as "diagnostic only".
  Making a lock decision based on this operation is no longer allowed.

Discussed on tech-kern.

Revision 1.226.4.2 / (download) - annotate - [select for diffs], Sun May 30 05:18:09 2010 UTC (23 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.226.4.1: +27 -27 lines
Diff to previous 1.226.4.1 (colored) to branchpoint 1.226 (colored)

sync with head

Revision 1.226.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:36 2010 UTC (2 years ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.226: +27 -27 lines
Diff to previous 1.226 (colored)

Sync with HEAD.

Revision 1.227 / (download) - annotate - [select for diffs], Mon Mar 29 13:11:34 2010 UTC (2 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.226: +27 -27 lines
Diff to previous 1.226 (colored)

Stop exposing fifofs internals and leave only fifo_vnodeop_p visible.

Revision 1.226.4.1 / (download) - annotate - [select for diffs], Tue Mar 16 15:38:16 2010 UTC (2 years, 2 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.226: +34 -34 lines
Diff to previous 1.226 (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.215.10.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:45 2010 UTC (2 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.215.10.3: +26 -12 lines
Diff to previous 1.215.10.3 (colored) to branchpoint 1.215 (colored)

sync with head

Revision 1.226 / (download) - annotate - [select for diffs], Mon Dec 7 04:12:10 2009 UTC (2 years, 5 months ago) by eeh
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.225: +5 -4 lines
Diff to previous 1.225 (colored)

Fix some more hangs and deadlocks.

Revision 1.225 / (download) - annotate - [select for diffs], Tue Nov 17 22:49:24 2009 UTC (2 years, 6 months ago) by eeh
Branch: MAIN
Changes since 1.224: +4 -2 lines
Diff to previous 1.224 (colored)

This should fix a deadlock.

Revision 1.224 / (download) - annotate - [select for diffs], Thu Nov 5 11:54:49 2009 UTC (2 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.223: +3 -26 lines
Diff to previous 1.223 (colored)

Include compat code by default.

Revision 1.223 / (download) - annotate - [select for diffs], Fri Oct 30 00:53:29 2009 UTC (2 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.222: +4 -2 lines
Diff to previous 1.222 (colored)

compile without COMPAT_50

Revision 1.222 / (download) - annotate - [select for diffs], Thu Oct 29 17:10:32 2009 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.221: +40 -8 lines
Diff to previous 1.221 (colored)

PR/42246: NAKAJIMA Yoshihiro: provide COMPAT_50 for LFS

Revision 1.215.10.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:53 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.215.10.2: +4 -4 lines
Diff to previous 1.215.10.2 (colored) to branchpoint 1.215 (colored)

sync with head

Revision 1.219.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:07 2009 UTC (3 years ago) by jym
Branch: jym-xensuspend
Changes since 1.219: +4 -8 lines
Diff to previous 1.219 (colored) next main 1.220 (colored)

Sync with HEAD.

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

Revision 1.221 / (download) - annotate - [select for diffs], Thu May 7 20:32:51 2009 UTC (3 years ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, jymxensuspend-base, jym-xensuspend-base
Changes since 1.220: +4 -4 lines
Diff to previous 1.220 (colored)

Replace KAUTH_GENERIC_ISSUSER with a better alternative.

Revision 1.215.10.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:38 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.215.10.1: +8 -12 lines
Diff to previous 1.215.10.1 (colored) to branchpoint 1.215 (colored)

sync with head.

Revision 1.218.4.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:34:40 2009 UTC (3 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.218.4.1: +2 -6 lines
Diff to previous 1.218.4.1 (colored) to branchpoint 1.218 (colored) next main 1.219 (colored)

Sync with HEAD.

Revision 1.220 / (download) - annotate - [select for diffs], Sun Feb 22 20:28:07 2009 UTC (3 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base
Changes since 1.219: +2 -6 lines
Diff to previous 1.219 (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.218.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:35 2009 UTC (3 years, 4 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.218: +3 -3 lines
Diff to previous 1.218 (colored)

Sync with HEAD.

Revision 1.215.6.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:42 2009 UTC (3 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.215.6.3: +1 -1 lines
Diff to previous 1.215.6.3 (colored) to branchpoint 1.215 (colored) next main 1.216 (colored)

Sync with HEAD.

Revision 1.219 / (download) - annotate - [select for diffs], Fri Jan 16 05:15:29 2009 UTC (3 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.218: +3 -3 lines
Diff to previous 1.218 (colored)

one more change which i forgot to commit with
UVM_PAGE_HASH_PENALTY -> UVM_PAGE_TREE_PENALTY rename.
noticed by Andreas Wrede.

Revision 1.216.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:06 2008 UTC (3 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.216.2.1: +4 -4 lines
Diff to previous 1.216.2.1 (colored) to branchpoint 1.216 (colored) next main 1.217 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.215.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:21 2008 UTC (3 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.215.6.2: +2 -2 lines
Diff to previous 1.215.6.2 (colored) to branchpoint 1.215 (colored)

Sync with HEAD.

Revision 1.217.2.1 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:55 2008 UTC (3 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.217: +4 -4 lines
Diff to previous 1.217 (colored) next main 1.218 (colored)

Sync with head.

Revision 1.218 / (download) - annotate - [select for diffs], Tue Jun 24 10:47:32 2008 UTC (3 years, 11 months ago) by gmcgarry
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64
Changes since 1.217: +4 -4 lines
Diff to previous 1.217 (colored)

fcntl(4) says the command is type int.  lfs_fcntl() comment says u_long.  The implementation says int.  Synchronise comment with documentation and cast to int before comparison.

Revision 1.216.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:05 2008 UTC (3 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.216: +5 -5 lines
Diff to previous 1.216 (colored)

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

Revision 1.215.8.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:17 2008 UTC (3 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.215.8.1: +5 -5 lines
Diff to previous 1.215.8.1 (colored) to branchpoint 1.215 (colored) next main 1.216 (colored)

sync with head.

Revision 1.215.6.2 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:37 2008 UTC (3 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.215.6.1: +3 -3 lines
Diff to previous 1.215.6.1 (colored) to branchpoint 1.215 (colored)

Sync with HEAD.

Also fix build.

Revision 1.217 / (download) - annotate - [select for diffs], Wed Jun 4 12:41:40 2008 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.216: +5 -5 lines
Diff to previous 1.216 (colored)

vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.

Revision 1.215.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:36 2008 UTC (3 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.215: +2 -9 lines
Diff to previous 1.215 (colored)

Sync with HEAD.

Revision 1.215.8.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:56 2008 UTC (4 years ago) by yamt
Branch: yamt-pf42
Changes since 1.215: +2 -9 lines
Diff to previous 1.215 (colored)

sync with head.

Revision 1.215.10.1 / (download) - annotate - [select for diffs], Fri May 16 02:26:00 2008 UTC (4 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.215: +2 -9 lines
Diff to previous 1.215 (colored)

sync with head.

Revision 1.216 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:11 2008 UTC (4 years ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.215: +2 -9 lines
Diff to previous 1.215 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.210.6.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:12 2008 UTC (4 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.210.6.2: +2 -5 lines
Diff to previous 1.210.6.2 (colored) to branchpoint 1.210 (colored) next main 1.211 (colored)

sync with HEAD

Revision 1.212.4.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:29 2008 UTC (4 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.212.4.1: +285 -281 lines
Diff to previous 1.212.4.1 (colored) to branchpoint 1.212 (colored) next main 1.213 (colored)

Sync with HEAD.

Revision 1.152.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:25:06 2008 UTC (4 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.152.2.7: +2 -5 lines
Diff to previous 1.152.2.7 (colored) next main 1.153 (colored)

sync with head.

Revision 1.215 / (download) - annotate - [select for diffs], Fri Jan 25 14:32:17 2008 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, mjf-devfs2
Changes since 1.214: +2 -5 lines
Diff to previous 1.214 (colored)

Remove VOP_LEASE. Discussed on tech-kern.

Revision 1.152.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:48:14 2008 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.152.2.6: +285 -278 lines
Diff to previous 1.152.2.6 (colored)

sync with head

Revision 1.210.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:32 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.210.6.1: +289 -293 lines
Diff to previous 1.210.6.1 (colored) to branchpoint 1.210 (colored)

sync with HEAD

Revision 1.193.2.1.2.2 / (download) - annotate - [select for diffs], Sun Jan 6 05:01:15 2008 UTC (4 years, 4 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.193.2.1.2.1: +3 -3 lines
Diff to previous 1.193.2.1.2.1 (colored) next main 1.193.2.2 (colored)

Catch up to netbsd-4.0 release.

Revision 1.213.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:58:27 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.213: +285 -278 lines
Diff to previous 1.213 (colored) next main 1.214 (colored)

Sync with HEAD

Revision 1.214 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:12 2008 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.213: +285 -278 lines
Diff to previous 1.213 (colored)

Merge vmlocking2 to head.

Revision 1.213.2.4 / (download) - annotate - [select for diffs], Wed Dec 19 21:27:19 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.213.2.3: +93 -102 lines
Diff to previous 1.213.2.3 (colored) to branchpoint 1.213 (colored) next main 1.214 (colored)

Use a global lfs_lock.

Revision 1.213.2.3 / (download) - annotate - [select for diffs], Wed Dec 19 19:16:46 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.213.2.2: +8 -9 lines
Diff to previous 1.213.2.2 (colored) to branchpoint 1.213 (colored)

Fix some more problems w/lfs on this branch.

Revision 1.213.2.2 / (download) - annotate - [select for diffs], Wed Dec 19 00:02:02 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.213.2.1: +11 -4 lines
Diff to previous 1.213.2.1 (colored) to branchpoint 1.213 (colored)

Get lfs mostly working.

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

Sync with HEAD.

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

sync with head

Revision 1.213.2.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:03:53 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.213: +288 -278 lines
Diff to previous 1.213 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.210.4.2 / (download) - annotate - [select for diffs], Tue Nov 27 19:39:26 2007 UTC (4 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.210.4.1: +6 -17 lines
Diff to previous 1.210.4.1 (colored) to branchpoint 1.210 (colored) next main 1.211 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.213 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:32 2007 UTC (4 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.212: +6 -17 lines
Diff to previous 1.212 (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.193.2.3 / (download) - annotate - [select for diffs], Sun Nov 25 09:46:40 2007 UTC (4 years, 6 months ago) by xtraeme
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-1-RELEASE, netbsd-4-0
Changes since 1.193.2.2: +3 -3 lines
Diff to previous 1.193.2.2 (colored) to branchpoint 1.193 (colored) next main 1.194 (colored)

Pull up following revision(s) (requested by christos in ticket #994):
	sys/ufs/lfs/lfs_vnops.c: revision 1.208 (patch)
Move the "vp = NULL" assignment after the code that requires vp != NULL.
Reported by Chris Ross on current-users.

Revision 1.210.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:35:21 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.210: +23 -23 lines
Diff to previous 1.210 (colored)

sync with HEAD

Revision 1.152.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:49 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.152.2.4: +23 -23 lines
Diff to previous 1.152.2.4 (colored)

sync with head.

Revision 1.210.4.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:36 2007 UTC (4 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.210: +23 -23 lines
Diff to previous 1.210 (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.210.8.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:49:21 2007 UTC (4 years, 7 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.210: +23 -23 lines
Diff to previous 1.210 (colored) next main 1.211 (colored)

sync with head.

Revision 1.212 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:35 2007 UTC (4 years, 7 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.211: +22 -22 lines
Diff to previous 1.211 (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.211 / (download) - annotate - [select for diffs], Mon Oct 8 18:01:31 2007 UTC (4 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.210: +3 -3 lines
Diff to previous 1.210 (colored)

Merge ffs locking & brelse changes from the vmlocking branch.

Revision 1.201.2.12 / (download) - annotate - [select for diffs], Sun Sep 16 19:02:49 2007 UTC (4 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.11: +4 -4 lines
Diff to previous 1.201.2.11 (colored) to branchpoint 1.201 (colored) next main 1.202 (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.152.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:46:56 2007 UTC (4 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.152.2.3: +440 -308 lines
Diff to previous 1.152.2.3 (colored)

sync with head.

Revision 1.193.2.1.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:05:22 2007 UTC (4 years, 8 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.193.2.1: +442 -306 lines
Diff to previous 1.193.2.1 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.201.2.11 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:28 2007 UTC (4 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.10: +3 -3 lines
Diff to previous 1.201.2.10 (colored) to branchpoint 1.201 (colored)

Sync with HEAD.

Revision 1.201.2.10 / (download) - annotate - [select for diffs], Sun Aug 19 19:25:02 2007 UTC (4 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.9: +7 -4 lines
Diff to previous 1.201.2.9 (colored) to branchpoint 1.201 (colored)

- Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).

Revision 1.208.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:51:16 2007 UTC (4 years, 9 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.208: +3 -4 lines
Diff to previous 1.208 (colored) next main 1.209 (colored)

Sync with HEAD.

Revision 1.210.10.2 / (download) - annotate - [select for diffs], Sun Jul 29 13:31:16 2007 UTC (4 years, 9 months ago) by ad
Branch: matt-mips64
Changes since 1.210.10.1: +2449 -0 lines
Diff to previous 1.210.10.1 (colored) to branchpoint 1.210 (colored) next main 1.211 (colored)

It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.

Revision 1.210.10.1, Sun Jul 29 13:31:15 2007 UTC (4 years, 9 months ago) by ad
Branch: matt-mips64
Changes since 1.210: +0 -2449 lines
FILE REMOVED

file lfs_vnops.c was added on branch matt-mips64 on 2007-07-29 13:31:16 +0000

Revision 1.210 / (download) - annotate - [select for diffs], Sun Jul 29 13:31:15 2007 UTC (4 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.209: +2 -3 lines
Diff to previous 1.209 (colored)

It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.

Revision 1.209 / (download) - annotate - [select for diffs], Fri Jul 27 08:26:39 2007 UTC (4 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.208: +3 -3 lines
Diff to previous 1.208 (colored)

Change unused fflags parameter in VOP_MMAP to prot and pass in
desired vm protection.

Revision 1.201.2.9 / (download) - annotate - [select for diffs], Sun Jul 15 13:28:18 2007 UTC (4 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.8: +3 -3 lines
Diff to previous 1.201.2.8 (colored) to branchpoint 1.201 (colored)

Sync with head.

Revision 1.201.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:47 2007 UTC (4 years, 10 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.201: +438 -305 lines
Diff to previous 1.201 (colored) next main 1.202 (colored)

Sync with head.

Revision 1.208 / (download) - annotate - [select for diffs], Tue Jul 10 23:06:24 2007 UTC (4 years, 10 months ago) by perseant
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.207: +3 -3 lines
Diff to previous 1.207 (colored)

Move the "vp = NULL" assignment after the code that requires vp != NULL.
Reported by Chris Ross on current-users.

Revision 1.207 / (download) - annotate - [select for diffs], Mon Jul 9 21:11:35 2007 UTC (4 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.206: +4 -4 lines
Diff to previous 1.206 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.201.2.8 / (download) - annotate - [select for diffs], Sat Jun 23 18:06:07 2007 UTC (4 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.7: +5 -5 lines
Diff to previous 1.201.2.7 (colored) to branchpoint 1.201 (colored)

- Lock v_cleanblkhd, v_dirtyblkhd, v_numoutput with the vnode's interlock.
  Get rid of global_v_numoutput_lock. Partially incomplete as the buffer
  cache locking doesn't work very well and needs an overhaul.
- Some changes to try and make softdep MP safe. Untested.

Revision 1.201.2.7 / (download) - annotate - [select for diffs], Sun Jun 17 21:32:16 2007 UTC (4 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.6: +15 -18 lines
Diff to previous 1.201.2.6 (colored) to branchpoint 1.201 (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.201.2.6 / (download) - annotate - [select for diffs], Fri Jun 8 14:18:18 2007 UTC (4 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.5: +269 -139 lines
Diff to previous 1.201.2.5 (colored) to branchpoint 1.201 (colored)

Sync with head.

Revision 1.193.2.2 / (download) - annotate - [select for diffs], Tue Jun 5 20:35:03 2007 UTC (4 years, 11 months ago) by bouyer
Branch: netbsd-4
CVS Tags: netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.193.2.1: +442 -306 lines
Diff to previous 1.193.2.1 (colored) to branchpoint 1.193 (colored)

Pull up following revision(s) (requested by perseant in ticket #703):
	sys/miscfs/genfs/genfs.h              1.21
	sys/miscfs/genfs/genfs_vnops.c        1.151
	sys/ufs/lfs/lfs.h                     1.119, 1.120
	sys/ufs/lfs/lfs_bio.c                 1.99-101
	sys/ufs/lfs/lfs_extern.h              1.89
	sys/ufs/lfs/lfs_inode.c               1.108, 1.109
	sys/ufs/lfs/lfs_segment.c             1.197, 1.199, 1.200
	sys/ufs/lfs/lfs_subr.c                1.69, 1.70
	sys/ufs/lfs/lfs_syscalls.c            1.119
	sys/ufs/lfs/lfs_vfsops.c              1.234, 1.235
	sys/ufs/lfs/lfs_vnops.c               1.195, 1.196, 1.200, 1.202-206

Reduce busy waiting in lfs_putpages(), and other LFS improvements.

Revision 1.201.2.5 / (download) - annotate - [select for diffs], Sun May 13 17:36:45 2007 UTC (5 years ago) by ad
Branch: vmlocking
Changes since 1.201.2.4: +5 -7 lines
Diff to previous 1.201.2.4 (colored) to branchpoint 1.201 (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.198.2.4 / (download) - annotate - [select for diffs], Mon May 7 10:56:17 2007 UTC (5 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.198.2.3: +431 -298 lines
Diff to previous 1.198.2.3 (colored) to branchpoint 1.198 (colored) next main 1.199 (colored)

sync with head.

Revision 1.206 / (download) - annotate - [select for diffs], Tue Apr 24 22:47:56 2007 UTC (5 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.205: +4 -449 lines
Diff to previous 1.205 (colored)

Get rid of our own private copy of genfs_putpages, having adapted the real
genfs_putpages to suit our purposes.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Apr 17 20:30:29 2007 UTC (5 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.204: +7 -4 lines
Diff to previous 1.204 (colored)

Fix another locking protocol error in lfs_fsync().

Revision 1.204 / (download) - annotate - [select for diffs], Tue Apr 17 06:49:40 2007 UTC (5 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.203: +17 -8 lines
Diff to previous 1.203 (colored)

Fix MP locking protocol violations introduced in my previous commit.

Revision 1.203 / (download) - annotate - [select for diffs], Tue Apr 17 01:16:47 2007 UTC (5 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.202: +864 -298 lines
Diff to previous 1.202 (colored)

Install a new sysctl, vfs.lfs.ignore_lazy_sync, which causes LFS to ignore
the "smooth" syncer, as if vfs.sync.*delay = 0, but only for LFS.  The
default is "on", i.e., ignore lazy sync.

Reduce the amount of polling/busy-waiting done by lfs_putpages().  To
accomplish this, copied genfs_putpages() and modified it to indicate which
page it was that caused it to return with EDEADLK.  fsync()/fdatasync()
should no longer ever fail with EAGAIN, and should not consume huge
quantities of cpu.

Also, try to make dirops less likely to be written as the result of a
VOP_PUTPAGES(), while ensuring that they are written regularly.

Revision 1.198.2.3 / (download) - annotate - [select for diffs], Sun Apr 15 16:04:08 2007 UTC (5 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.198.2.2: +7 -7 lines
Diff to previous 1.198.2.2 (colored) to branchpoint 1.198 (colored)

sync with head.

Revision 1.201.2.4 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:55 2007 UTC (5 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.201.2.3: +7 -7 lines
Diff to previous 1.201.2.3 (colored) to branchpoint 1.201 (colored)

Sync with head.

Revision 1.201.2.3 / (download) - annotate - [select for diffs], Mon Apr 9 22:10:07 2007 UTC (5 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.201.2.2: +4 -4 lines
Diff to previous 1.201.2.2 (colored) to branchpoint 1.201 (colored)

- Add two new arguments to kthread_create1: pri_t pri, bool mpsafe.
- Fork kthreads off proc0 as new LWPs, not new processes.

Revision 1.202 / (download) - annotate - [select for diffs], Thu Apr 5 17:44:18 2007 UTC (5 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.201: +7 -7 lines
Diff to previous 1.201 (colored)

correct comment for lfs_putpages

Revision 1.201.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:11:59 2007 UTC (5 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.201.2.1: +3 -7 lines
Diff to previous 1.201.2.1 (colored) to branchpoint 1.201 (colored)

- Replace more simple_locks, and fix up in a few places.
- Use condition variables.
- LOCK_ASSERT -> KASSERT.

Revision 1.201.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 17:51:51 2007 UTC (5 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.201: +134 -116 lines
Diff to previous 1.201 (colored)

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

Revision 1.198.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 06:01:09 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.198.2.1: +3 -3 lines
Diff to previous 1.198.2.1 (colored) to branchpoint 1.198 (colored)

Sync with HEAD.

Revision 1.201 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:46 2007 UTC (5 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.198.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:23 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.198: +4 -3 lines
Diff to previous 1.198 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.152.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:22 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.152.2.2: +17 -12 lines
Diff to previous 1.152.2.2 (colored)

sync with head.

Revision 1.200 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:11 2007 UTC (5 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.199 / (download) - annotate - [select for diffs], Tue Feb 20 16:21:05 2007 UTC (5 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.198: +3 -2 lines
Diff to previous 1.198 (colored)

Call genfs_node_destroy() where appropriate.

Revision 1.193.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 23:27:52 2007 UTC (5 years, 3 months ago) by tron
Branch: netbsd-4
Branch point for: wrstuden-fixsa
Changes since 1.193: +9 -7 lines
Diff to previous 1.193 (colored)

Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.

Revision 1.198 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:42 2007 UTC (5 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.197: +7 -7 lines
Diff to previous 1.197 (colored)

Merge newlock2 to head.

Revision 1.188.2.4 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:50 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.188.2.3: +3 -2 lines
Diff to previous 1.188.2.3 (colored) to branchpoint 1.188 (colored) next main 1.189 (colored)

Sync with head.

Revision 1.188.2.3 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:43 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.188.2.2: +7 -7 lines
Diff to previous 1.188.2.2 (colored) to branchpoint 1.188 (colored)

Remove support for SA. Ok core@.

Revision 1.197 / (download) - annotate - [select for diffs], Fri Jan 19 14:49:12 2007 UTC (5 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.196: +3 -2 lines
Diff to previous 1.196 (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.188.2.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:25 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.188.2.1: +16 -11 lines
Diff to previous 1.188.2.1 (colored) to branchpoint 1.188 (colored)

Sync with head.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Jan 4 16:55:30 2007 UTC (5 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.195: +4 -4 lines
Diff to previous 1.195 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.195 / (download) - annotate - [select for diffs], Wed Jan 3 02:42:23 2007 UTC (5 years, 4 months ago) by perseant
Branch: MAIN
Changes since 1.194: +7 -4 lines
Diff to previous 1.194 (colored)

Change VONWORKLST handling to better match its other uses; in particular,
check memq and clear VWRITEMAPDIRTY at the same time.

Revision 1.152.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:51:01 2006 UTC (5 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.152.2.1: +176 -60 lines
Diff to previous 1.152.2.1 (colored)

sync with head.

Revision 1.189.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:33 2006 UTC (5 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.189.2.1: +10 -8 lines
Diff to previous 1.189.2.1 (colored) to branchpoint 1.189 (colored) next main 1.190 (colored)

sync with head.

Revision 1.194 / (download) - annotate - [select for diffs], Sat Dec 9 16:11:52 2006 UTC (5 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.193: +9 -7 lines
Diff to previous 1.193 (colored)

a smorgasbord of improvements to vnode locking and path lookup:
 - LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().

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

Sync with head.

Revision 1.193 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:53 2006 UTC (5 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

__unused removal on arguments; approved by core.

Revision 1.189.2.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:51 2006 UTC (5 years, 7 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.189: +20 -21 lines
Diff to previous 1.189 (colored)

sync with head

Revision 1.192 / (download) - annotate - [select for diffs], Fri Oct 20 18:58:13 2006 UTC (5 years, 7 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.191: +4 -6 lines
Diff to previous 1.191 (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.191 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:52 2006 UTC (5 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.190: +3 -3 lines
Diff to previous 1.190 (colored)

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

Revision 1.190 / (download) - annotate - [select for diffs], Thu Sep 28 23:08:23 2006 UTC (5 years, 7 months ago) by perseant
Branch: MAIN
Changes since 1.189: +17 -16 lines
Diff to previous 1.189 (colored)

Use lockstatus instead of a homebrewed locking system to control
LFCNWRAPSTOP and LFCNWRAPGO.

Be less verbose about the various looping checks: use log() rather than
printf(), and only log anything if we are really looping ("count = 2" is
not an error condition).

Allow dirops sleeping on available space to be interruptible.

Revision 1.189 / (download) - annotate - [select for diffs], Fri Sep 15 18:50:49 2006 UTC (5 years, 8 months ago) by perseant
Branch: MAIN
CVS Tags: yamt-splraiseipl-base
Branch point for: yamt-splraiseipl
Changes since 1.188: +4 -5 lines
Diff to previous 1.188 (colored)

Don't remark a locked inode with IN_MODIFIED after writing it to disk,
if we ourselves hold the lock.  This prevents e.g. mknod from hanging
indefinitely.

Also, always use the return value from VOP_ISLOCKED to determine whether
we hold the lock or someone else does, rather than looking into the lock
structure ourselves.

Revision 1.157.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 03:00:01 2006 UTC (5 years, 8 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.157: +394 -109 lines
Diff to previous 1.157 (colored) next main 1.158 (colored)

sync with head

Revision 1.157.8.6 / (download) - annotate - [select for diffs], Sun Sep 3 15:26:08 2006 UTC (5 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.157.8.5: +65 -16 lines
Diff to previous 1.157.8.5 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

sync with head.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Sep 1 19:41:28 2006 UTC (5 years, 8 months ago) by perseant
Branch: MAIN
CVS Tags: yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Changes since 1.187: +65 -16 lines
Diff to previous 1.187 (colored)

Changes to help the roll-forward agent, to wit:

* Mark being-deleted files in the Ifile so we can finish deleting them
  at fs mount time.
* Flag the Ifile with "cleaner must clean" when writers are waiting for
  the cleaner, rather than relying solely on the cleaner's estimation of
  whether it should clean or not.
* Note partial segments written by a user agent (in particular,
  fsck_lfs) so that repeated rolls forward don't interfere with one
  another.
* Add a new fcntl, LFCNPASS, that allows the log to wrap exactly once,
  for better testing of the validity of checkpoints.
* Keep track of the on-disk nlink count when cleaning, so that we don't
  partially complete directory operations while cleaning.
* Ensure that every single Ifile inode write represents a consistent
  view of the filesystem.  In particular, the accounting for the segment
  we are writing the inode into must be correct, and the accounting for
  the segment that inode used to reside in must be correct.  Rather than
  just rewriting the inode if we wrote it wrong, rewrite the necessary
  ifile blocks before writing the inode so we never write it wrong.
* Don't unmark any VDIROP vnodes if we haven't written them to disk,
  avoiding yet another problem with the "wait for the cleaner" error
  return from lfs_putpages().

Also, move the last callback to an aiodone call, so we no longer do any
memory management from interrupt context.

Revision 1.157.8.5 / (download) - annotate - [select for diffs], Fri Aug 11 15:47:37 2006 UTC (5 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.157.8.4: +49 -23 lines
Diff to previous 1.157.8.4 (colored) to branchpoint 1.157 (colored)

sync with head

Revision 1.137.2.25 / (download) - annotate - [select for diffs], Thu Aug 10 12:16:47 2006 UTC (5 years, 9 months 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.137.2.24: +20 -37 lines
Diff to previous 1.137.2.24 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored)

Apply patch (requested by fair in perseant #1457):
Bring LFS up to current, including a patch (1.95 lfs_alloc.c) that
should prevent the inode free list errors seen on the STABLE branch
subsequent to pullup ticket #1327.

Revision 1.187 / (download) - annotate - [select for diffs], Sun Aug 6 12:34:12 2006 UTC (5 years, 9 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.186: +3 -2 lines
Diff to previous 1.186 (colored)

Fix size confusion with lfs_fhandle - and as it now turns out to be the same
as the lfs compat_30_fhandle, g/c the latter.
Add an alias for the LFCNIFILEFH fcntl, so that binaries compiled in the
meantime (with too large lfs_fhandle) continue to work.

This makes vfs_cleanerd work again after the kernel checks filehandle size
more strictly (problem reported by Kurt Schreiner on current-users).

Revision 1.186 / (download) - annotate - [select for diffs], Mon Jul 31 16:34:45 2006 UTC (5 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.185: +3 -3 lines
Diff to previous 1.185 (colored)

Make filehandles opaque to userland

Revision 1.185 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:15 2006 UTC (5 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.184: +11 -12 lines
Diff to previous 1.184 (colored)

Use the LWP cached credentials where sane.

Revision 1.184 / (download) - annotate - [select for diffs], Thu Jul 20 23:14:09 2006 UTC (5 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.183: +8 -9 lines
Diff to previous 1.183 (colored)

Move the kauth checks up front, so that all new LFS fcntl calls are subject
to the check for superuser privilege.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Jul 13 22:08:00 2006 UTC (5 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.182: +4 -2 lines
Diff to previous 1.182 (colored)

Apply _KERNEL_OPT

Revision 1.182 / (download) - annotate - [select for diffs], Thu Jul 13 22:05:52 2006 UTC (5 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.181: +17 -2 lines
Diff to previous 1.181 (colored)

Version the lfs_cleanerd internal fcntl() for filehandles too,
so old cleaners should work with newer kernels.

Revision 1.178.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:50:13 2006 UTC (5 years, 10 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.178: +75 -24 lines
Diff to previous 1.178 (colored) next main 1.179 (colored)

Merge from HEAD.

Revision 1.181 / (download) - annotate - [select for diffs], Thu Jul 13 12:00:26 2006 UTC (5 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.180: +6 -3 lines
Diff to previous 1.180 (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 / (download) - annotate - [select for diffs], Thu Jun 29 19:28:21 2006 UTC (5 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.179: +17 -10 lines
Diff to previous 1.179 (colored)

Don't wake up the cleaner if the filesystem is unwrappable, and fix the
compatibility fcntls.

Also includes one-line fixes for an MP locking bug and a zero-length FINFO
problem that manifested during testing.

Revision 1.157.8.4 / (download) - annotate - [select for diffs], Mon Jun 26 12:54:50 2006 UTC (5 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.157.8.3: +65 -24 lines
Diff to previous 1.157.8.3 (colored) to branchpoint 1.157 (colored)

sync with head.

Revision 1.179 / (download) - annotate - [select for diffs], Sat Jun 24 05:28:54 2006 UTC (5 years, 11 months ago) by perseant
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6
Changes since 1.178: +65 -24 lines
Diff to previous 1.178 (colored)

Change LFCNWRAP{STOP,GO} to make them more suitable for snapshotting; in
particular, the caller can now choose whether to wait for the condition
to be met, and if the caller of LFCNWRAPSTOP dies or otherwise closes
the descriptor, the filesystem is started again.  Updated the ckckp
regression test to use the new semantics.

dump_lfs(8) now uses the fcntls to implement LFS-style snapshotting through
the -X flag, addressing PR#33457 albeit not using fss(4).  Fixed a couple
other problems with dump_lfs that manifested themselves during testing.

Revision 1.152.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:39 2006 UTC (5 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.152: +289 -148 lines
Diff to previous 1.152 (colored)

sync with head.

Revision 1.157.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:44 2006 UTC (5 years, 11 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.157.6.1: +78 -81 lines
Diff to previous 1.157.6.1 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

Sync with head.

Revision 1.157.12.3 / (download) - annotate - [select for diffs], Wed May 24 15:50:48 2006 UTC (6 years ago) by tron
Branch: peter-altq
Changes since 1.157.12.2: +230 -91 lines
Diff to previous 1.157.12.2 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

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

Revision 1.157.8.3 / (download) - annotate - [select for diffs], Wed May 24 10:59:25 2006 UTC (6 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.157.8.2: +118 -81 lines
Diff to previous 1.157.8.2 (colored) to branchpoint 1.157 (colored)

sync with head.

Revision 1.137.2.24 / (download) - annotate - [select for diffs], Sat May 20 22:44:08 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.23: +10 -5 lines
Diff to previous 1.137.2.23 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.177
Don't be quite so eager to error out from lfs_putpages() when pages are
busy; if we've sensed a possible 3-way deadlock and are not the pagedaemon,
relock and try again.

Revision 1.137.2.23 / (download) - annotate - [select for diffs], Sat May 20 22:43:42 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.22: +13 -2 lines
Diff to previous 1.137.2.22 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_alloc.c: revision 1.93
	sys/ufs/lfs/lfs.h: revision 1.106
	sys/ufs/lfs/lfs_vfsops.c: revision 1.209
	sys/ufs/lfs/lfs_vnops.c: revision 1.175
	sys/ufs/lfs/lfs_segment.c: revision 1.178
Fixes to address the "vinvalbuf: dirty blocks" panic that can occur when
many inodes are cleaned at once.  Make sure that we write all the pages
on vnodes that are being flushed, even if we don't think there's room;
drain v_numoutput before lfs_vflush() completes.
Also, don't allow a vnode that is in the process of being cleaned to be
chosen by getnewvnode(); this avoids a segment accounting panic in the case
that a large number of inodes are fed to lfs_markv() all at once.

Revision 1.137.2.22 / (download) - annotate - [select for diffs], Sat May 20 22:42:50 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.21: +3 -2 lines
Diff to previous 1.137.2.21 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_alloc.c: revision 1.92
	sys/ufs/lfs/lfs.h: revision 1.105
	sys/ufs/lfs/lfs_vfsops.c: revision 1.207
	sys/ufs/lfs/lfs_subr.c: revision 1.59
	sys/ufs/lfs/lfs_vnops.c: revision 1.173
	sys/ufs/lfs/lfs_bio.c: revision 1.92
Introduce another per-filesystem parameter, lfs_resvseg, to separate the
notion of "how many segments are reserved for the cleaner" from that of
"how many segments are not counted in lfs_bfree".  The default value
used for existing filesystems is the same as the previous implicit value
of (lfs_minfreeseg / 2 + 1), modulo some sanity checking.
Count pending dirops on a per-filesystem basis, since once we start
writing them we can't stop until we're done.  This seems to help stave off
the "no clean segments" panic in the case of filling the filesystem with
directories and small files (e.g. simultaneously unpacking more copies of
pkgsrc than will fit).

Revision 1.137.2.21 / (download) - annotate - [select for diffs], Sat May 20 22:41:58 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.20: +6 -15 lines
Diff to previous 1.137.2.20 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.172
Fix a "locking against myself": lfs_flush_dirops() doesn't need to lock the
vnodes to write their blocks, since it holds the segment lock.

Revision 1.137.2.20 / (download) - annotate - [select for diffs], Sat May 20 22:41:31 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.19: +6 -3 lines
Diff to previous 1.137.2.19 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.171
	sys/ufs/lfs/lfs_extern.h: revision 1.81
	sys/ufs/lfs/lfs_segment.c: revision 1.177
Don't ever partially write dirops, even if we need the cleaner to run.
This increases the chances of the "no clean segments" panic slightly,
but allows us to run the ckckp regression test successfully to completion.

Revision 1.137.2.19 / (download) - annotate - [select for diffs], Sat May 20 22:38:57 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.18: +17 -8 lines
Diff to previous 1.137.2.18 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs.h: revision 1.104
	sys/ufs/lfs/lfs_vfsops.c: revision 1.206
	sys/ufs/lfs/lfs_vnops.c: revision 1.170
	sys/ufs/lfs/lfs_extern.h: revision 1.80
	sys/ufs/lfs/lfs_segment.c: revision 1.176
	sys/ufs/lfs/lfs_inode.c: revision 1.103 via patch
	sys/ufs/lfs/lfs_alloc.c: revision 1.90
Postpone the segment accounting changes coming from truncation until the
inode that makes those changes valid is either written to disk by
lfs_writeinode() or discarded by lfs_vfree().
A couple of locking fixes are also included as well.

Revision 1.137.2.18 / (download) - annotate - [select for diffs], Sat May 20 22:25:28 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.17: +6 -4 lines
Diff to previous 1.137.2.17 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.169
Yet another MP locking issue.

Revision 1.137.2.17 / (download) - annotate - [select for diffs], Sat May 20 22:24:27 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.16: +36 -2 lines
Diff to previous 1.137.2.16 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs.h: revision 1.103
	sys/ufs/lfs/lfs_segment.c: revision 1.174
	sys/ufs/lfs/lfs_vnops.c: revision 1.168
Introduce two fcntl calls that freeze the filesystem right at the point
where segment 0 is being considered for writing.  This allows for automated
checkpoint vailidity scanning, and could be used (in conjunction with the
existing LFCNREWIND) for e.g. snapshot dumps as well.
Include a regression test that does such scanning.
When writing the Ifile, loop through the dirty block list three times to
make sure that the checkpoint is always consistent (the first and second
times the Ifile blocks can cross a segment boundary; not so the third time
unless the segments are very small).  Discovered by using the aforementioned
regression test.

Revision 1.137.2.16 / (download) - annotate - [select for diffs], Sat May 20 22:19:33 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.15: +13 -9 lines
Diff to previous 1.137.2.15 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs.h: revision 1.102
	sys/ufs/lfs/lfs_segment.c: revision 1.173
	sys/ufs/lfs/lfs_vnops.c: revision 1.167 via patch
	sys/ufs/lfs/lfs_bio.c: revision 1.91
Make lfs_vref/lfs_vunref not need to know about VXLOCK and VFREEING
explicitly (especially since we didn't know about VFREEING at all before),
but notice the EBUSY return from vget() instead.
Fix some more MP locking protocol issues, most of which were pointed out by
Christian Ehrhardt this morning on tech-kern.

Revision 1.137.2.15 / (download) - annotate - [select for diffs], Sat May 20 22:16:00 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.14: +4 -4 lines
Diff to previous 1.137.2.14 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.166
Another MP locking fix.

Revision 1.137.2.14 / (download) - annotate - [select for diffs], Sat May 20 22:11:24 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.13: +6 -5 lines
Diff to previous 1.137.2.13 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.165
Don't leak vnode references if we fail to lock a vnode in lfs_flush_pchain().
Also fix another (probably only academic) simple_lock protocol error.

Revision 1.137.2.13 / (download) - annotate - [select for diffs], Sat May 20 22:10:29 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.12: +118 -19 lines
Diff to previous 1.137.2.12 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.200
	sys/ufs/lfs/lfs_vnops.c: revision 1.164
	sys/ufs/lfs/lfs_inode.c: revision 1.101
	sys/ufs/lfs/lfs_extern.h: revision 1.78
	sys/ufs/lfs/lfs.h: revision 1.100
Implement a somewhat finer-grained mechanism for paging LFS-backed pages.
The writer daemon, if it does not need to flush the whole filesystem,
now only writes the vnodes for which the pagedaemon has requested pageouts
(although it does not pay attention to the page ranges the pagedaemon
supplies).

Revision 1.137.2.12 / (download) - annotate - [select for diffs], Sat May 20 22:05:51 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.11: +3 -3 lines
Diff to previous 1.137.2.11 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_balloc.c: revision 1.60
	sys/ufs/lfs/lfs_syscalls.c: revision 1.111
	sys/ufs/lfs/lfs_segment.c: revision 1.172
	sys/ufs/lfs/lfs_vnops.c: revision 1.163
Several minor bug fixes:
* Correct (weak) segment lock assertions in lfs_fragextend and lfs_putpages.
* Keep IN_MODIFIED set if we run out of avail in lfs_putpages.
* Don't try to (re)write buffers on a VBLK vnode; fixes a panic I found
   while running with an LFS root.
* Raise priority of LFCNSEGWAIT to PVFS; PUSER is way too low for
   something the pagedaemon is relying on.

Revision 1.137.2.11 / (download) - annotate - [select for diffs], Sat May 20 22:03:36 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.10: +4 -2 lines
Diff to previous 1.137.2.10 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.162
Make sure we unlock to zero when avoiding 3-way deadlock; otherwise we
simply have a different form of deadlock.

Revision 1.137.2.10 / (download) - annotate - [select for diffs], Sat May 20 22:02:06 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.9: +6 -2 lines
Diff to previous 1.137.2.9 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.198
	sys/ufs/lfs/lfs_vnops.c: revision 1.161
Handle the "filesystem is clean" flag correctly when upgrading from
read-only to read-write mount.  This makes "root on lfs" work for me,
although it looks like a different traceback from PR#32667.

Revision 1.137.2.9 / (download) - annotate - [select for diffs], Sat May 20 22:00:51 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.8: +9 -9 lines
Diff to previous 1.137.2.8 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.159
Don't let the pagedaemon wait for pages, since that is just asking for
a deadlock.

Revision 1.137.2.8 / (download) - annotate - [select for diffs], Sat May 20 21:59:46 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.7: +38 -8 lines
Diff to previous 1.137.2.7 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.158
	sys/ufs/lfs/lfs_subr.c: revision 1.57
	sys/ufs/lfs/lfs_segment.c: revision 1.171
	sys/ufs/lfs/lfs.h: revision 1.97
	sys/ufs/lfs/lfs_vfsops.c: revision 1.195
	sys/ufs/lfs/lfs_extern.h: revision 1.76
Improvements to LFS's paging mechanism, to wit:
* Acknowledge that sometimes there are more dirty pages to be written to
   disk than clean segments.  When we reach the danger line,
   lfs_gop_write() now returns EAGAIN.  The caller of VOP_PUTPAGES(), if
   it holds the segment lock, drops it and waits for the cleaner to make
   room before continuing.
* Note and avoid a three-way deadlock in lfs_putpages (a writer holding
   a page busy blocks on the cleaner while the cleaner blocks on the
   segment lock while lfs_putpages blocks on the page).

Revision 1.137.2.7 / (download) - annotate - [select for diffs], Sat May 20 21:55:43 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.6: +4 -3 lines
Diff to previous 1.137.2.6 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.153
	sys/ufs/lfs/lfs_debug.c: revision 1.32
	sys/ufs/lfs/lfs_alloc.c: revision 1.84
	sys/ufs/lfs/lfs_vfsops.c: revision 1.185
	sys/ufs/lfs/lfs_segment.c: revision 1.165
64 bit inode changes.

Revision 1.137.2.6 / (download) - annotate - [select for diffs], Sat May 20 21:50:26 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.5: +2 -4 lines
Diff to previous 1.137.2.5 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.152
	sys/ufs/lfs/lfs_debug.c: revision 1.31
	sys/ufs/lfs/lfs_subr.c: revision 1.53
	sys/ufs/lfs/lfs_extern.h: revision 1.68
	sys/ufs/lfs/lfs_inode.c: revision 1.96
	sys/ufs/lfs/lfs_bio.c: revision 1.86
	sys/ufs/lfs/lfs_alloc.c: revision 1.83
	sys/ufs/lfs/lfs_vfsops.c: revision 1.181
	sys/ufs/lfs/lfs.h: revision 1.88
	sys/ufs/lfs/lfs_segment.c: revision 1.164
- sprinkle const
- avoid shadow variables.

Revision 1.137.2.5 / (download) - annotate - [select for diffs], Sat May 20 21:16:25 2006 UTC (6 years ago) by riz
Branch: netbsd-3
Changes since 1.137.2.4: +5 -3 lines
Diff to previous 1.137.2.4 (colored) to branchpoint 1.137 (colored)

Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vnops.c: revision 1.151
VOP_LOCK drops the interlock; pick it up again to avoid an "already unlocked"
panic in lfs_putpages.

Revision 1.178 / (download) - annotate - [select for diffs], Thu May 18 23:15:09 2006 UTC (6 years ago) by perseant
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: gdamore-uart
Changes since 1.177: +20 -37 lines
Diff to previous 1.177 (colored)

Break out the finfo array manipulation code into two new functions,
lfs_acquire_finfo() and lfs_release_finfo().  Add a debugging check
for zero-length finfo arrays in the segment summary to avoid future
regressions.

Revision 1.177 / (download) - annotate - [select for diffs], Wed May 17 19:47:09 2006 UTC (6 years ago) by perseant
Branch: MAIN
Changes since 1.176: +10 -5 lines
Diff to previous 1.176 (colored)

Don't be quite so eager to error out from lfs_putpages() when pages are
busy; if we've sensed a possible 3-way deadlock and are not the pagedaemon,
relock and try again.

Revision 1.176 / (download) - annotate - [select for diffs], Sun May 14 21:32:45 2006 UTC (6 years ago) by elad
Branch: MAIN
Changes since 1.175: +17 -13 lines
Diff to previous 1.175 (colored)

integrate kauth.

Revision 1.175 / (download) - annotate - [select for diffs], Fri May 12 23:36:12 2006 UTC (6 years ago) by perseant
Branch: MAIN
Changes since 1.174: +13 -2 lines
Diff to previous 1.174 (colored)

Fixes to address the "vinvalbuf: dirty blocks" panic that can occur when
many inodes are cleaned at once.  Make sure that we write all the pages
on vnodes that are being flushed, even if we don't think there's room;
drain v_numoutput before lfs_vflush() completes.

Also, don't allow a vnode that is in the process of being cleaned to be
chosen by getnewvnode(); this avoids a segment accounting panic in the case
that a large number of inodes are fed to lfs_markv() all at once.

Revision 1.157.10.5 / (download) - annotate - [select for diffs], Thu May 11 23:32:03 2006 UTC (6 years ago) by elad
Branch: elad-kernelauth
Changes since 1.157.10.4: +30 -34 lines
Diff to previous 1.157.10.4 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

sync with head

Revision 1.157.10.4 / (download) - annotate - [select for diffs], Sat May 6 23:32:58 2006 UTC (6 years ago) by christos
Branch: elad-kernelauth
Changes since 1.157.10.3: +3 -2 lines
Diff to previous 1.157.10.3 (colored) to branchpoint 1.157 (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.174 / (download) - annotate - [select for diffs], Thu May 4 16:48:16 2006 UTC (6 years ago) by perseant
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.173: +2 -12 lines
Diff to previous 1.173 (colored)

Change VOP_FCNTL to take an unlocked vnode.  Approved by wrstuden@.

Revision 1.173 / (download) - annotate - [select for diffs], Thu May 4 04:22:57 2006 UTC (6 years ago) by perseant
Branch: MAIN
Changes since 1.172: +3 -2 lines
Diff to previous 1.172 (colored)

Introduce another per-filesystem parameter, lfs_resvseg, to separate the
notion of "how many segments are reserved for the cleaner" from that of
"how many segments are not counted in lfs_bfree".  The default value
used for existing filesystems is the same as the previous implicit value
of (lfs_minfreeseg / 2 + 1), modulo some sanity checking.

Count pending dirops on a per-filesystem basis, since once we start
writing them we can't stop until we're done.  This seems to help stave off
the "no clean segments" panic in the case of filling the filesystem with
directories and small files (e.g. simultaneously unpacking more copies of
pkgsrc than will fit).

Revision 1.172 / (download) - annotate - [select for diffs], Tue May 2 00:52:26 2006 UTC (6 years ago) by perseant
Branch: MAIN
Changes since 1.171: +6 -15 lines
Diff to previous 1.171 (colored)

Fix a "locking against myself": lfs_flush_dirops() doesn't need to lock the
vnodes to write their blocks, since it holds the segment lock.

Revision 1.171 / (download) - annotate - [select for diffs], Mon May 1 19:47:29 2006 UTC (6 years ago) by perseant
Branch: MAIN
Changes since 1.170: +6 -3 lines
Diff to previous 1.170 (colored)

Don't ever partially write dirops, even if we need the cleaner to run.
This increases the chances of the "no clean segments" panic slightly,
but allows us to run the ckckp regression test successfully to completion.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Apr 30 21:19:42 2006 UTC (6 years ago) by perseant
Branch: MAIN
Changes since 1.169: +17 -8 lines
Diff to previous 1.169 (colored)

Postpone the segment accounting changes coming from truncation until the
inode that makes those changes valid is either written to disk by
lfs_writeinode() or discarded by lfs_vfree().

A couple of locking fixes are also included as well.

Revision 1.157.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:26 2006 UTC (6 years, 1 month ago) by simonb
Branch: simonb-timecounters
Changes since 1.157: +208 -36 lines
Diff to previous 1.157 (colored)

Sync with head.

Revision 1.157.10.3 / (download) - annotate - [select for diffs], Wed Apr 19 03:54:13 2006 UTC (6 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.157.10.2: +206 -36 lines
Diff to previous 1.157.10.2 (colored) to branchpoint 1.157 (colored)

sync with head.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Apr 18 21:41:20 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.168: +6 -4 lines
Diff to previous 1.168 (colored)

Yet another MP locking issue.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Apr 17 20:02:35 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.167: +36 -2 lines
Diff to previous 1.167 (colored)

Introduce two fcntl calls that freeze the filesystem right at the point
where segment 0 is being considered for writing.  This allows for automated
checkpoint vailidity scanning, and could be used (in conjunction with the
existing LFCNREWIND) for e.g. snapshot dumps as well.

Include a regression test that does such scanning.

When writing the Ifile, loop through the dirty block list three times to
make sure that the checkpoint is always consistent (the first and second
times the Ifile blocks can cross a segment boundary; not so the third time
unless the segments are very small).  Discovered by using the aforementioned
regression test.

Revision 1.167 / (download) - annotate - [select for diffs], Thu Apr 13 23:46:28 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.166: +13 -9 lines
Diff to previous 1.166 (colored)

Make lfs_vref/lfs_vunref not need to know about VXLOCK and VFREEING
explicitly (especially since we didn't know about VFREEING at all before),
but notice the EBUSY return from vget() instead.

Fix some more MP locking protocol issues, most of which were pointed out by
Christian Ehrhardt this morning on tech-kern.

Revision 1.166 / (download) - annotate - [select for diffs], Tue Apr 11 22:08:00 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.165: +4 -4 lines
Diff to previous 1.165 (colored)

Another MP locking fix.

Revision 1.157.8.2 / (download) - annotate - [select for diffs], Tue Apr 11 11:55:59 2006 UTC (6 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.157.8.1: +120 -20 lines
Diff to previous 1.157.8.1 (colored) to branchpoint 1.157 (colored)

sync with head

Revision 1.165 / (download) - annotate - [select for diffs], Mon Apr 10 21:17:21 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4
Changes since 1.164: +6 -5 lines
Diff to previous 1.164 (colored)

Don't leak vnode references if we fail to lock a vnode in lfs_flush_pchain().
Also fix another (probably only academic) simple_lock protocol error.

Revision 1.164 / (download) - annotate - [select for diffs], Sat Apr 8 00:26:34 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.163: +118 -19 lines
Diff to previous 1.163 (colored)

Implement a somewhat finer-grained mechanism for paging LFS-backed pages.
The writer daemon, if it does not need to flush the whole filesystem,
now only writes the vnodes for which the pagedaemon has requested pageouts
(although it does not pay attention to the page ranges the pagedaemon
supplies).

Revision 1.163 / (download) - annotate - [select for diffs], Fri Apr 7 23:59:28 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

Several minor bug fixes:

* Correct (weak) segment lock assertions in lfs_fragextend and lfs_putpages.
* Keep IN_MODIFIED set if we run out of avail in lfs_putpages.
* Don't try to (re)write buffers on a VBLK vnode; fixes a panic I found
  while running with an LFS root.
* Raise priority of LFCNSEGWAIT to PVFS; PUSER is way too low for
  something the pagedaemon is relying on.

Revision 1.157.8.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:57 2006 UTC (6 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.157: +44 -12 lines
Diff to previous 1.157 (colored)

sync with head.

Revision 1.162 / (download) - annotate - [select for diffs], Sat Apr 1 00:13:01 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3
Changes since 1.161: +4 -2 lines
Diff to previous 1.161 (colored)

Make sure we unlock to zero when avoiding 3-way deadlock; otherwise we
simply have a different form of deadlock.

Revision 1.157.12.2 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:29 2006 UTC (6 years, 1 month ago) by tron
Branch: peter-altq
Changes since 1.157.12.1: +6 -6 lines
Diff to previous 1.157.12.1 (colored) to branchpoint 1.157 (colored)

Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.161 / (download) - annotate - [select for diffs], Fri Mar 31 02:31:37 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.160: +6 -2 lines
Diff to previous 1.160 (colored)

Handle the "filesystem is clean" flag correctly when upgrading from
read-only to read-write mount.  This makes "root on lfs" work for me,
although it looks like a different traceback from PR#32667.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Mar 30 12:40:06 2006 UTC (6 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.159: +2 -6 lines
Diff to previous 1.159 (colored)

some cleanups after the introduction of GOP_SIZE_MEM flag.
- remove GOP_SIZE_READ/GOP_SIZE_WRITE flags.
  they have not been used since the change.
- ufs_balloc_range: remove code which has been no-op since the change.
  thanks Konrad Schroder for explaining the original intention of the code.
- ffs_gop_size: don't extend past eof, in the case of GOP_SIZE_MEM.
  otherwise genfs_getpages end up to allocate pages past eof unnecessarily.

Revision 1.157.12.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:30 2006 UTC (6 years, 2 months ago) by tron
Branch: peter-altq
Changes since 1.157: +38 -8 lines
Diff to previous 1.157 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.159 / (download) - annotate - [select for diffs], Tue Mar 28 01:29:55 2006 UTC (6 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.158: +9 -9 lines
Diff to previous 1.158 (colored)

Don't let the pagedaemon wait for pages, since that is just asking for
a deadlock.

Revision 1.158 / (download) - annotate - [select for diffs], Fri Mar 24 20:05:32 2006 UTC (6 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.157: +38 -8 lines
Diff to previous 1.157 (colored)

Improvements to LFS's paging mechanism, to wit:

* Acknowledge that sometimes there are more dirty pages to be written to
  disk than clean segments.  When we reach the danger line,
  lfs_gop_write() now returns EAGAIN.  The caller of VOP_PUTPAGES(), if
  it holds the segment lock, drops it and waits for the cleaner to make
  room before continuing.

* Note and avoid a three-way deadlock in lfs_putpages (a writer holding
  a page busy blocks on the cleaner while the cleaner blocks on the
  segment lock while lfs_putpages blocks on the page).

Revision 1.157.10.2 / (download) - annotate - [select for diffs], Fri Mar 10 14:21:11 2006 UTC (6 years, 2 months ago) by elad
Branch: elad-kernelauth
Changes since 1.157.10.1: +4 -4 lines
Diff to previous 1.157.10.1 (colored) to branchpoint 1.157 (colored)

generic_authorize() -> kauth_authorize_generic().

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

Adapt to kernel authorization KPI.

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

merge ktrace-lwp.

Revision 1.109.2.11 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:32 2005 UTC (6 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.10: +85 -66 lines
Diff to previous 1.109.2.10 (colored) next main 1.110 (colored)

Sync with HEAD. Here we go again...

Revision 1.156 / (download) - annotate - [select for diffs], Wed Nov 2 12:39:14 2005 UTC (6 years, 6 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.155: +3 -19 lines
Diff to previous 1.155 (colored)

merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.155.2.2 / (download) - annotate - [select for diffs], Sat Oct 29 17:22:22 2005 UTC (6 years, 6 months ago) by yamt
Branch: yamt-vop
Changes since 1.155.2.1: +3 -3 lines
Diff to previous 1.155.2.1 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored)

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

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Thu Oct 20 03:00:30 2005 UTC (6 years, 7 months ago) by yamt
Branch: yamt-vop
Changes since 1.155: +3 -19 lines
Diff to previous 1.155 (colored)

adapt ufs.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Sep 13 04:13:26 2005 UTC (6 years, 8 months ago) by christos
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.154: +2 -53 lines
Diff to previous 1.154 (colored)

split out lfs_itimes(). It is used in fsck_lfs.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Sep 12 16:24:41 2005 UTC (6 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.153: +52 -16 lines
Diff to previous 1.153 (colored)

Use nanotime() to update the time fields in filesystems. Convert the code
from macros to real functions. Original patch and review from chuq.
Note: ext2fs only keeps seconds in the on-disk inode, and msdosfs does not
have enough precision for all fields, so this is not very useful for those
two.

Revision 1.153 / (download) - annotate - [select for diffs], Fri Aug 19 02:04:09 2005 UTC (6 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.152: +4 -3 lines
Diff to previous 1.152 (colored)

64 bit inode changes.

Revision 1.152 / (download) - annotate - [select for diffs], Sun May 29 21:25:24 2005 UTC (6 years, 11 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.151: +2 -4 lines
Diff to previous 1.151 (colored)

- sprinkle const
- avoid shadow variables.

Revision 1.151 / (download) - annotate - [select for diffs], Fri May 20 19:09:25 2005 UTC (7 years ago) by perseant
Branch: MAIN
Changes since 1.150: +5 -3 lines
Diff to previous 1.150 (colored)

VOP_LOCK drops the interlock; pick it up again to avoid an "already unlocked"
panic in lfs_putpages.

Revision 1.129.4.1 / (download) - annotate - [select for diffs], Tue May 10 05:08:58 2005 UTC (7 years ago) by riz
Branch: netbsd-2
CVS Tags: 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
Changes since 1.129: +34 -10 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

Pull up the following revisions (requested by perseant in ticket #1281):

        1.8 sys/ufs/lfs/TODO
        1.75 sys/ufs/lfs/lfs.h                  (via patch)
        1.74 sys/ufs/lfs/lfs_alloc.c            (via patch)
        1.49, 1.51 sys/ufs/lfs/lfs_balloc.c     (1.51 via patch)
        1.78 sys/ufs/lfs/lfs_bio.c
        1.62 sys/ufs/lfs/lfs_extern.h           (via patch)
        1.156 sys/ufs/lfs/lfs_segment.c         (via patch)
        1.48 sys/ufs/lfs/lfs_subr.c
        1.101 sys/ufs/lfs/lfs_syscalls.c
        1.163 sys/ufs/lfs/lfs_vfsops.c          (via patch)
        1.134 sys/ufs/lfs/lfs_vnops.c           (via patch)
        1.61 sys/ufs/ufs/ufs_readwrite.c        (via patch)

        1.20 libexec/lfs_cleanerd/clean.h       (via patch)
        1.52 libexec/lfs_cleanerd/cleanerd.c    (via patch)
        1.41 libexec/lfs_cleanerd/library.c     (via patch)

        1.4 regress/sys/fs/lfs/newfs_fsck/Makefile
        1.2 regress/sys/fs/lfs/newfs_fsck/mkfs_mount
        1.2 regress/sys/fs/lfs/newfs_fsck/smallfiles
        1.3 sbin/fsck_lfs/bufcache.c
        1.3 sbin/fsck_lfs/bufcache.h
        1.3 sbin/fsck_lfs/lfs.h
        1.8 sbin/fsck_lfs/lfs.c                 (via patch)
        1.8 sbin/fsck_lfs/pass3.c               (via patch)
        1.18 sbin/fsck_lfs/pass0.c              (via patch)
        1.18 sbin/fsck_lfs/utilities.c          (via patch)
        1.7 sbin/fsck_lfs/segwrite.c
        1.19 sbin/fsck_lfs/setup.c              (via patch)
        1.3 sbin/newfs_lfs/Makefile
        0 sbin/newfs_lfs/lfs.c                  (yes, remove it)
        1.1 sbin/newfs_lfs/make_lfs.c
        1.15 sbin/newfs_lfs/newfs.c             (via patch)

Various minor LFS improvements.

Kernel:

* Note when lfs_putpages(9) thinks it is not going to be writing any
   pages before calling genfs_putpages(9).  This prevents a situation in
   which blocks can be queued for writing without a segment header.
* Correct computation of NRESERVE(), though it is still a gross
   overestimate in most cases.  Note that if NRESERVE() is too high, it
   may be impossible to create files on the filesystem.  We catch this
   case on filesystem mount and refuse to mount r/w.
* Allow filesystems to be mounted whose block size is == MAXBSIZE.
* Somewhere along the line, ufs_bmaparray(9) started mangling UNWRITTEN
   entries in indirect blocks again, triggering a failed assertion "daddr
   <= LFS_MAX_DADDR".  Explicitly convert to and from int32_t to correct
   this.  Should fix PR #29045.
* Add a high-water mark for the number of dirty pages any given LFS can
   hold before triggering a flush.  This is settable by sysctl, but off
   (zero) by default.
* Be more careful about the MAX_BYTES and MAX_BUFS computations so we
   shouldn't see "please increase to at least zero" messages.
* Note that VBLK and VCHR vnodes can have nonzero values in di_db[0]
   even though their v_size == 0.  Don't panic when we see this.
   Fixes PR #26680.
* Change lfs_bfree to a signed quantity.  The manner in which it is
   processed before being passed to the cleaner means that sometimes it
   may drop below zero, and the cleaner must be aware of this.
* Never report bfree < 0 (or higher than lfs_dsize) through
   lfs_statfs(9).  This prevents df(1) from ever telling us that our full
   filesystems have 16TB free.
* Account space allocated through lfs_balloc(9) that does not have
   associated buffer headers, so that the pagedaemon doesn't run us out
   of segments.
* Return ENOSPC from lfs_balloc(9) when bfree drops to zero.
* Address a deadlock in lfs_bmapv/lfs_markv when the filesystem is being
   unmounted.  Because vfs_busy() is a shared lock, and
   lfs_bmapv/lfs_markv mark the filesystem vfs_busy(), the cleaner can be
   holding the lock that umount() is blocking on, then try to vfs_busy()
   again in getnewvnode().

cleaner:

* Adapt lfs_cleanerd to use the fcntl call to get the Ifile filehandle,
   so it need not be in the namespace.
* Make lfs_cleanerd be more careful when there are very few available
   segments.
* Make lfs_cleanerd less verbose when the filesystem is unmounted.

newfs_lfs, fsck_lfs, and regression:

* Extend the lfs library from fsck_lfs(8) so that it can be used with a
   not-yet-existent LFS.  Make newfs_lfs(8) use this library, so it can
   create LFSs whose Ifile is larger than one segment.  Addresses PR #11110.
* Make newfs_lfs(8) use strsuftoi64() for its arguments, a la newfs(8).
* Make fsck_lfs(8) respect the "file system is clean" flag.
* Don't let fsck_lfs(8) think it has dirty blocks when invoked with the
   -n flag.
* Remove the Ifile from the filesystem namespace.  The cleaner now uses
   a fcntl call on the root inode to find the Ifile filehandle.  (As a
   side-effect, addresses PR #29144.)

Revision 1.137.2.4 / (download) - annotate - [select for diffs], Sat May 7 11:21:30 2005 UTC (7 years ago) by tron
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.137.2.3: +76 -27 lines
Diff to previous 1.137.2.3 (colored) to branchpoint 1.137 (colored)

Apply patch (requested by perseant in ticket #242):
* fsck_lfs buffer cache fixes, including PR #29151
* Change fsck_lfs phase 0 message to reflect reality
* fsck_lfs: check phase 5 (cleanerinfo accounting) even on
  roll-forward
* Keep better track of the free list during roll-forward, avoiding
  a core dump
* Improve hash table use for fsck_lfs buffer and vnode cache
* Document fsck_lfs flag -f, and implement -q
* Add resize_lfs, including kernel support
* Add LFS to mountd's list of exportable filesystem types
* Make the LFS lkm work again [christos@]
* Add MP locking to the LFS kernel subsystem
* Fix pager_map deadlock in lfs_putpages()
* Avoid incomplete file extension that looks like "partial
  truncation" to fsck
* Use lfs_malloc for cleaner malloc, since the cleaner often runs
  in low-memory conditions.
* Use splay trees, not hash table, to track page allocation for
  write.
* Fix mkdir panic on full fs
* Fix page accounting leak by counting differently.
* Use rightly named structure for lfs_getattr [skrll@]
* Cosmetic changes for readability.

Revision 1.132.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:39 2005 UTC (7 years ago) by kent
Branch: kent-audio2
Changes since 1.132: +280 -181 lines
Diff to previous 1.132 (colored) next main 1.133 (colored)

sync with -current

Revision 1.150 / (download) - annotate - [select for diffs], Wed Apr 27 20:35:10 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.149: +3 -3 lines
Diff to previous 1.149 (colored)

Recognize that we hold the v_interlock when relocking after a flush in
lfs_putpages.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Apr 25 06:28:51 2005 UTC (7 years, 1 month ago) by skrll
Branch: MAIN
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

Use the right arg structure for lfs_setattr, i.e. s/getattr/setattr/.

Revision 1.148 / (download) - annotate - [select for diffs], Sat Apr 23 19:47:51 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.147: +23 -2 lines
Diff to previous 1.147 (colored)

Provide a resize_lfs(8), including kernel and cleaner support.  The current
implementation requires the fs to be mounted while resizing.  Tested in both
directions, and everything appears to work happily, but ymmv.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Apr 19 20:59:05 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.146: +2 -6 lines
Diff to previous 1.146 (colored)

Keep per-inode, per-fs, and subsystem-wide counts of blocks allocated through
lfs_balloc(), and use that to estimate the number of dirty pages belonging
to LFS (subsystem or filesystem).  This is almost certainly wrong for
the case of a large mmap()ed region, but the accounting is tighter than
what we had before, and performs much better in the typical case of pages
dirtied through write().

Revision 1.146 / (download) - annotate - [select for diffs], Mon Apr 18 17:36:46 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

Check for the inode having been previously freed, in UNMARK_VNODE().
Avoids a panic when calling mkdir() on a full filesystem.

Revision 1.145 / (download) - annotate - [select for diffs], Sat Apr 16 17:35:58 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.144: +3 -2 lines
Diff to previous 1.144 (colored)

Use splay trees, rather than a hash table, to manage the accounting of
blocks allocated through VOP_BALLOC() for pages to be written to disk.
This accounting no longer takes a noticeable fraction of the system CPU.

Revision 1.144 / (download) - annotate - [select for diffs], Sat Apr 16 17:28:37 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.143: +5 -6 lines
Diff to previous 1.143 (colored)

Use lfs_malloc() to manage the blkiov arrays that the cleaner functions use,
since the cleaner is likely to operate in a low-memory condition.

Revision 1.143 / (download) - annotate - [select for diffs], Thu Apr 14 00:58:26 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.142: +4 -4 lines
Diff to previous 1.142 (colored)

Tabify leading whitespace

Revision 1.142 / (download) - annotate - [select for diffs], Thu Apr 14 00:44:17 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.141: +3 -4 lines
Diff to previous 1.141 (colored)

Consolidate the hash table we use to maintain the integrity of lfs_avail
into a single, system-wide table, rather than having a separate hash table
per inode.  Significantly reduces the "system" cpu usage of your average
file write.

Revision 1.141 / (download) - annotate - [select for diffs], Fri Apr 1 21:59:47 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.140: +46 -13 lines
Diff to previous 1.140 (colored)

Protect various per-fs structures with fs->lfs_interlock simple_lock, to
improve behavior in the multiprocessor case.  Add debugging segment-lock
assertion statements.

Revision 1.109.2.10 / (download) - annotate - [select for diffs], Fri Apr 1 14:32:11 2005 UTC (7 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.9: +125 -95 lines
Diff to previous 1.109.2.9 (colored)

Sync with HEAD.

Revision 1.137.2.3 / (download) - annotate - [select for diffs], Wed Mar 30 10:14:29 2005 UTC (7 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.137.2.2: +4 -4 lines
Diff to previous 1.137.2.2 (colored) to branchpoint 1.137 (colored)

Pull up revision 1.140 (requested by perseant in ticket #74):
Don't sleep while holding the vnode interlock.  Should take care of the
first panic case in PR #26043.

Revision 1.137.2.2 / (download) - annotate - [select for diffs], Wed Mar 30 10:13:23 2005 UTC (7 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.137.2.1: +5 -4 lines
Diff to previous 1.137.2.1 (colored) to branchpoint 1.137 (colored)

Pull up revision 1.139 (requested by perseant in ticket #74):
avoid the need for recursive locking lfs_flush_dirops() by unlocking
the vnode around the call to this in the caller.

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Wed Mar 30 10:12:17 2005 UTC (7 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.137: +119 -89 lines
Diff to previous 1.137 (colored)

Pull up revision 1.138 (requested by perseant in ticket #74):
Make LFS dirops get their vnode first, before incrementing the dirop
count, to prevent a deadlock trying to call VOP_PUTPAGES() on a VDIROP
vnode. This can happen when a stacked filesystem is mounted on top of an
LFS: an LFS dirop needs to get a vnode, which is available from the upper
layer. The corresponding lower layer vnode, however, is VDIROP, so the
upper layer can't be cleaned out since its VOP_PUTPAGES() is passed
through to the lower layer, which waits for dirops to drain before it can
proceed.  Deadlock.
Tweak ufs_makeinode() and ufs_mkdir() to pass the a_vpp argument through
to VOP_VALLOC().
Partially addresses PR # 26043, though it probably does not completely fix
the problem described there.

Revision 1.132.6.3 / (download) - annotate - [select for diffs], Sat Mar 26 18:19:20 2005 UTC (7 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.132.6.2: +124 -93 lines
Diff to previous 1.132.6.2 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored)

sync with head.

Revision 1.140 / (download) - annotate - [select for diffs], Fri Mar 25 01:45:05 2005 UTC (7 years, 2 months ago) by perseant
Branch: MAIN
CVS Tags: yamt-km-base4
Changes since 1.139: +4 -4 lines
Diff to previous 1.139 (colored)

Don't sleep while holding the vnode interlock.  Should take care of the
first panic case in PR #26043.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Mar 24 04:00:33 2005 UTC (7 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.138: +5 -4 lines
Diff to previous 1.138 (colored)

avoid the need for recursive locking lfs_flush_dirops() by unlocking
the vnode around the call to this in the caller.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Mar 23 00:12:51 2005 UTC (7 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.137: +119 -89 lines
Diff to previous 1.137 (colored)

Make LFS dirops get their vnode first, before incrementing the dirop count,
to prevent a deadlock trying to call VOP_PUTPAGES() on a VDIROP vnode.
This can happen when a stacked filesystem is mounted on top of an LFS: an
LFS dirop needs to get a vnode, which is available from the upper layer.
The corresponding lower layer vnode, however, is VDIROP, so the upper layer
can't be cleaned out since its VOP_PUTPAGES() is passed through to the lower
layer, which waits for dirops to drain before it can proceed.  Deadlock.

Tweak ufs_makeinode() and ufs_mkdir() to pass the a_vpp argument through
to VOP_VALLOC().

Partially addresses PR # 26043, though it probably does not completely fix
the problem described there.

Revision 1.132.6.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:37:03 2005 UTC (7 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.132.6.1: +85 -71 lines
Diff to previous 1.132.6.1 (colored) to branchpoint 1.132 (colored)

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

Revision 1.109.2.9 / (download) - annotate - [select for diffs], Tue Mar 8 13:53:12 2005 UTC (7 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.8: +36 -46 lines
Diff to previous 1.109.2.8 (colored)

Sync with HEAD.

Revision 1.137 / (download) - annotate - [select for diffs], Tue Mar 8 04:49:35 2005 UTC (7 years, 2 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.136: +10 -10 lines
Diff to previous 1.136 (colored)

Tab Police.

Revision 1.136 / (download) - annotate - [select for diffs], Tue Mar 8 00:18:21 2005 UTC (7 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.135: +28 -38 lines
Diff to previous 1.135 (colored)

Straighten out the maze of ifdefs.  Instead, consolidate all the debugging
stuff under '#ifdef DEBUG', and use sysctl knobs to turn on/off particular
parts of the debugging reporting (if DEBUG is enabled).  Re-enable the LFS
statistics in sysctl, while I'm there.  A bit of a rototill.

Revision 1.109.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:54:49 2005 UTC (7 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.7: +54 -30 lines
Diff to previous 1.109.2.7 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.135 / (download) - annotate - [select for diffs], Sat Feb 26 22:32:20 2005 UTC (7 years, 2 months ago) by perry
Branch: MAIN
Changes since 1.134: +21 -21 lines
Diff to previous 1.134 (colored)

nuke trailing whitespace

Revision 1.134 / (download) - annotate - [select for diffs], Sat Feb 26 05:40:42 2005 UTC (7 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.133: +34 -10 lines
Diff to previous 1.133 (colored)

Various minor LFS improvements:

* Note when lfs_putpages(9) thinks it is not going to be writing any
  pages before calling genfs_putpages(9).  This prevents a situation in
  which blocks can be queued for writing without a segment header.
* Correct computation of NRESERVE(), though it is still a gross
  overestimate in most cases.  Note that if NRESERVE() is too high, it
  may be impossible to create files on the filesystem.  We catch this
  case on filesystem mount and refuse to mount r/w.
* Allow filesystems to be mounted whose block size is == MAXBSIZE.
* Somewhere along the line, ufs_bmaparray(9) started mangling UNWRITTEN
  entries in indirect blocks again, triggering a failed assertion "daddr
  <= LFS_MAX_DADDR".  Explicitly convert to and from int32_t to correct
  this.
* Add a high-water mark for the number of dirty pages any given LFS can
  hold before triggering a flush.  This is settable by sysctl, but off
  (zero) by default.
* Be more careful about the MAX_BYTES and MAX_BUFS computations so we
  shouldn't see "please increase to at least zero" messages.
* Note that VBLK and VCHR vnodes can have nonzero values in di_db[0]
  even though their v_size == 0.  Don't panic when we see this.
* Change lfs_bfree to a signed quantity.  The manner in which it is
  processed before being passed to the cleaner means that sometimes it
  may drop below zero, and the cleaner must be aware of this.
* Never report bfree < 0 (or higher than lfs_dsize) through
  lfs_statvfs(9).  This prevents df(1) from ever telling us that our full
  filesystems have 16TB free.
* Account space allocated through lfs_balloc(9) that does not have
  associated buffer headers, so that the pagedaemon doesn't run us out
  of segments.
* Return ENOSPC from lfs_balloc(9) when bfree drops to zero.
* Address a deadlock in lfs_bmapv/lfs_markv when the filesystem is being
  unmounted.  Because vfs_busy() is a shared lock, and
  lfs_bmapv/lfs_markv mark the filesystem vfs_busy(), the cleaner can be
  holding the lock that umount() is blocking on, then try to vfs_busy()
  again in getnewvnode().

Revision 1.132.6.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:56 2005 UTC (7 years, 3 months ago) by yamt
Branch: yamt-km
Changes since 1.132: +7 -2 lines
Diff to previous 1.132 (colored)

sync with head.

Revision 1.109.2.7 / (download) - annotate - [select for diffs], Fri Feb 4 11:48:27 2005 UTC (7 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.6: +7 -2 lines
Diff to previous 1.109.2.6 (colored)

Sync with HEAD.

Revision 1.133 / (download) - annotate - [select for diffs], Tue Jan 25 23:55:21 2005 UTC (7 years, 4 months ago) by wrstuden
Branch: MAIN
CVS Tags: yamt-km-base2, matt-timespec
Changes since 1.132: +7 -2 lines
Diff to previous 1.132 (colored)

Extend fsync_range(2) to support the FDISKSYNC flag, which requests
that the sync be propogated out through the disk drive caches.

Revision 1.109.2.6 / (download) - annotate - [select for diffs], Sat Oct 30 06:46:50 2004 UTC (7 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.5: +3 -3 lines
Diff to previous 1.109.2.5 (colored)

Reduced diff to HEAD by restoring the struct proc * argument to lfs_bmapv

Revision 1.109.2.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:39:21 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.4: +21 -18 lines
Diff to previous 1.109.2.4 (colored)

Fix the sync with head I botched.

Revision 1.109.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:56:59 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.3: +18 -21 lines
Diff to previous 1.109.2.3 (colored)

Sync with HEAD.

Revision 1.109.2.3 / (download) - annotate - [select for diffs], Tue Aug 24 17:57:55 2004 UTC (7 years, 9 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.2: +3 -3 lines
Diff to previous 1.109.2.2 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:56:59 2004 UTC (7 years, 9 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.1: +162 -185 lines
Diff to previous 1.109.2.1 (colored)

Sync with HEAD

Revision 1.132 / (download) - annotate - [select for diffs], Thu Apr 22 10:45:00 2004 UTC (8 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.131: +2 -7 lines
Diff to previous 1.131 (colored)

check_dirty: fix another PHOLD leak. ("goto top" path)

Revision 1.131 / (download) - annotate - [select for diffs], Wed Apr 21 01:05:45 2004 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.

Revision 1.130 / (download) - annotate - [select for diffs], Tue Apr 20 11:52:17 2004 UTC (8 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.129: +3 -3 lines
Diff to previous 1.129 (colored)

check_dirty: plug a PHOLD leak.  from Greg Oster.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Feb 26 22:41:36 2004 UTC (8 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0
Branch point for: netbsd-2
Changes since 1.128: +18 -19 lines
Diff to previous 1.128 (colored)

lfs_putpages: fix a simple_lock mismatch.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Jan 26 10:39:30 2004 UTC (8 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.127: +4 -3 lines
Diff to previous 1.127 (colored)

Fix xxx_strategy() to use the vnode arg instead of bp->b_vp.

Revision 1.127 / (download) - annotate - [select for diffs], Sun Jan 25 18:06:49 2004 UTC (8 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.126: +3 -4 lines
Diff to previous 1.126 (colored)

Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.

VOP_STRATEGY(bp) is replaced by one of two new functions:

- VOP_STRATEGY(vp, bp)  Call the strategy routine of vp for bp.
- DEV_STRATEGY(bp)      Call the d_strategy routine of bp->b_dev for bp.

DEV_STRATEGY(bp) is used only for block-to-block device situations.

Revision 1.126 / (download) - annotate - [select for diffs], Tue Dec 16 13:47:48 2003 UTC (8 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.125: +44 -76 lines
Diff to previous 1.125 (colored)

- reduce code duplication.
- use boolean_t where appropriate.

Revision 1.125 / (download) - annotate - [select for diffs], Tue Dec 16 11:45:07 2003 UTC (8 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.124: +2 -3 lines
Diff to previous 1.124 (colored)

g/c lfs_no_inactive.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Nov 25 15:14:57 2003 UTC (8 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.123: +8 -10 lines
Diff to previous 1.123 (colored)

use FINFOSIZE macro.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Oct 30 01:43:10 2003 UTC (8 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.122: +5 -7 lines
Diff to previous 1.122 (colored)

Remove some assigned-to but otherwise unused variables.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Oct 25 18:26:46 2003 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.121: +5 -4 lines
Diff to previous 1.121 (colored)

Fix uninitialized variable warnings.

Revision 1.121 / (download) - annotate - [select for diffs], Tue Oct 21 00:39:03 2003 UTC (8 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.120: +8 -8 lines
Diff to previous 1.120 (colored)

Correct preempt() calls.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Oct 18 15:52:42 2003 UTC (8 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.119: +17 -6 lines
Diff to previous 1.119 (colored)

be more strict about sa->vp.
(make sure the last lfs_updatemata in lfs_putpages takes effect.)

Revision 1.119 / (download) - annotate - [select for diffs], Tue Oct 14 14:02:56 2003 UTC (8 years, 7 months ago) by dbj
Branch: MAIN
Changes since 1.118: +4 -4 lines
Diff to previous 1.118 (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.118 / (download) - annotate - [select for diffs], Wed Sep 24 10:22:54 2003 UTC (8 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

fix a bug of lfs.

genfs_getpages() can read in more blocks than it should due to faked filesize
of lfs_gop_size().  it's a security problem and it makes gcc3 "internal error"

to fix this,
- in genfs_getpages(), always calculate diskeof and memeof separately
  so that filesystems (in this case, lfs) can use different strategies
  for them.
- introduce GOP_SIZE_MEM flag and use it to request in-core filesize.
  (it was an intention of GOP_SIZE_READ,
  but after the above change _READ is not a straightforward name)

after this, no one uses GOP_SIZE_{READ,WRITE} anymore but leave them for now.

Revision 1.117 / (download) - annotate - [select for diffs], Tue Sep 23 05:26:50 2003 UTC (8 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.116: +29 -24 lines
Diff to previous 1.116 (colored)

cleanup IN_ADIROP/VDIROP handling a little.

Revision 1.116 / (download) - annotate - [select for diffs], Tue Sep 23 05:26:13 2003 UTC (8 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.115: +2 -3 lines
Diff to previous 1.115 (colored)

remove unnecessary externs of lfs_do_flush.

Revision 1.115 / (download) - annotate - [select for diffs], Sat Sep 20 17:51:55 2003 UTC (8 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.114: +17 -3 lines
Diff to previous 1.114 (colored)

some comments

Revision 1.114 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:40 2003 UTC (8 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.113: +3 -7 lines
Diff to previous 1.113 (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.113 / (download) - annotate - [select for diffs], Sat Jul 12 16:19:00 2003 UTC (8 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.112: +33 -19 lines
Diff to previous 1.112 (colored)

more MP locks.

Revision 1.112 / (download) - annotate - [select for diffs], Sat Jul 12 16:17:09 2003 UTC (8 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.111: +2 -6 lines
Diff to previous 1.111 (colored)

- protect global resource counts with lfs_subsys_lock.
- clean up scattered externs a little.

Revision 1.109.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:25 2003 UTC (8 years, 10 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.109: +22 -19 lines
Diff to previous 1.109 (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.111 / (download) - annotate - [select for diffs], Wed Jul 2 13:40:54 2003 UTC (8 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.110: +6 -20 lines
Diff to previous 1.110 (colored)

- add a new functions, lfs_writer_enter/leave, and use them instead of
  duplicated code fragments.
- add an assertion.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Jul 2 13:39:03 2003 UTC (8 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.109: +12 -14 lines
Diff to previous 1.109 (colored)

drain dirops before aqcuiring seglock.  otherwise it might deadlocks.
PR/20676 (Karl Knutsson)

Revision 1.109 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:42 2003 UTC (8 years, 10 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.108: +18 -21 lines
Diff to previous 1.108 (colored)

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

Revision 1.108 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:46 2003 UTC (8 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (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.107 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:27 2003 UTC (8 years, 11 months ago) by darrenr
Branch: MAIN
Changes since 1.106: +22 -19 lines
Diff to previous 1.106 (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.106 / (download) - annotate - [select for diffs], Wed May 7 18:49:29 2003 UTC (9 years ago) by ragge
Branch: MAIN
Changes since 1.105: +4 -2 lines
Diff to previous 1.105 (colored)

Add a missing ifdef DDB.

Revision 1.105 / (download) - annotate - [select for diffs], Fri May 2 01:47:39 2003 UTC (9 years ago) by perseant
Branch: MAIN
Changes since 1.104: +7 -4 lines
Diff to previous 1.104 (colored)

Correct arguments to check_dirty, ensuring that all pages in a block are
written if any of them are dirty.  Pointed out by yamt.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Apr 27 06:47:45 2003 UTC (9 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

fix a comment.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Apr 23 07:20:39 2003 UTC (9 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.102: +65 -52 lines
Diff to previous 1.102 (colored)

Make LFS work better (though still not "well") as an NFS-exported
filesystem (and other things that needed to be fixed before the tests
would complete), to wit:

* Include the fs ident in the filehandle; improve stale filehandle checks.

* Change definition of blksize() to use the on-dinode size instead of
  the inode's i_size, so that fsck_lfs will work properly again.

* Use b_interlock in lfs_vtruncbuf.

* Postpone dirop reclamation until after the seglock has been released,
  so that lfs_truncate is not called with the segment lock held.

* Don't loop in lfs_fsync(), just write everything and wait.

* Be more careful about the interlock/uobjlock in lfs_putpages: when we
  lose this lock, we have to resynchronize dirtiness of pages in each
  block.

* Be sure to always write indirect blocks and update metadata in
  lfs_putpages; fixes a bug that caused blocks to be accounted to the
  wrong segment.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Apr 2 10:39:42 2003 UTC (9 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.101: +29 -28 lines
Diff to previous 1.101 (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.101 / (download) - annotate - [select for diffs], Tue Apr 1 14:31:50 2003 UTC (9 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.100: +7 -4 lines
Diff to previous 1.100 (colored)

lfs_strategy is used only for read.

Revision 1.100 / (download) - annotate - [select for diffs], Fri Mar 28 08:03:39 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.99: +24 -3 lines
Diff to previous 1.99 (colored)

Add a sleeper count, to prevent the cleaner from panicing the kernel
when the filesystem is unmounted, relocking the Ifile when its lock is
draining.  (We can't use vfs_busy() since the process is sleeping for a
good long time.)  Clean up / organize lfs.h, while I'm here.

In lfs_update_single, assert that disk addresses are either negative, or
are still positive when converted to int32_t, to prevent recurrence of a
negative/positive block problem.

Revision 1.99 / (download) - annotate - [select for diffs], Sat Mar 22 21:31:41 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.98: +3 -2 lines
Diff to previous 1.98 (colored)

Unlock ifile inode during streamlined VOP_INACTIVE.

Revision 1.98 / (download) - annotate - [select for diffs], Fri Mar 21 06:26:37 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored)

KNF (space after keywords).

Revision 1.97 / (download) - annotate - [select for diffs], Fri Mar 21 06:16:56 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.96: +20 -58 lines
Diff to previous 1.96 (colored)

Use VONWORKLST as a heuristic for vnode emptiness, rather than exhaustively
checking the memq.

Take greater care not to dirty the Ifile vnode when unmounting the filesystem.
This should fix a "(vp->v_flag & VONWORKLST) == 0" assertion panic in vgonel
that could occur when unmounting.

Do not allow the Ifile to be mapped for writing.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Mar 15 06:58:51 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.95: +17 -7 lines
Diff to previous 1.95 (colored)

Add simple_lock protection for lfs_seglock and lfs_subsys_pages; these will
be expanded to cover other per-fs and subsystem-wide data as well.

Fix a case of IN_MODIFIED being set without updating lfs_uinodes, resulting
in a "lfs_uinodes < 0" panic.

Fix a deadlock in lfs_putpages arising from the need to busy all pages in a
block; unbusy any that had already been busied before starting over.

Revision 1.95 / (download) - annotate - [select for diffs], Sat Mar 8 21:46:06 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.94: +21 -30 lines
Diff to previous 1.94 (colored)

Take away "#ifdef LFS_UBC".

Revision 1.94 / (download) - annotate - [select for diffs], Sat Mar 8 02:55:50 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.93: +94 -3 lines
Diff to previous 1.93 (colored)

Add an lfs_strategy() that checks to make sure we're not trying to read
where the cleaner is trying to write, instead of tying up the "live"
buffers (or pages).

Fix a bug in the LFS_UBC case where oversized buffers would not be
checksummed correctly, causing uncleanable segments.

Make sure that wakeup(fs->lfs_iocount) is done if fs->lfs_iocount is 1
as well as 0, since we wait in some places for it to drop to 1.

Activate all pages that make it into lfs_gop_write without the segment
lock held, since they must have been dirtied very recently, even if
PG_DELWRI is not set.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Mar 4 19:19:43 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.92: +4 -4 lines
Diff to previous 1.92 (colored)

Make sure we hold the uobjlock when checking for dirty pages, in lfs_vflush.
Note that pages can become dirty without our knowing it, anyway; don't
panic if that happens.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Mar 2 04:34:32 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.91: +130 -3 lines
Diff to previous 1.91 (colored)

Account SEGUSE_ACTIVE correctly so that the automatic segment cleaning
actually happens.

Add a new fcntl call that will write the minimum necessary to checkpoint
(i.e., for on-disk directory structure to be consistent, not including
updates to file data) so that the cleaner can clean segments more quickly
without sacrificing three-way commit for cleaning.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Mar 1 11:20:22 2003 UTC (9 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

use pid_t for pid.

Revision 1.90 / (download) - annotate - [select for diffs], Tue Feb 25 23:12:07 2003 UTC (9 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.89: +24 -23 lines
Diff to previous 1.89 (colored)

Make fs-specific fcntl macros take three arguments (approved wrstuden).
Let LFS use fcntl for cleaner functions.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Feb 24 08:42:49 2003 UTC (9 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.88: +75 -3 lines
Diff to previous 1.88 (colored)

Add lfs_ioctl vnode op, with ioctls to take over cleaner system call
functionality (not including segment clean, since that is now done
automatically as checkpoints happen).

Revision 1.88 / (download) - annotate - [select for diffs], Sun Feb 23 00:22:35 2003 UTC (9 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.87: +23 -28 lines
Diff to previous 1.87 (colored)

Fix a buffer overflow bug in the LFS_UBC case that manifested itself
either as a mysterious UVM error or as "panic: dirty bufs".  Verify
maximum size in lfs_malloc.

Teach lfs_updatemeta and lfs_shellsort about oversized cluster blocks from
lfs_gop_write.

When unwiring pages in lfs_gop_write, deactivate them, under the theory
that the pagedaemon wanted to free them last we knew.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Feb 22 01:52:25 2003 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.86: +8 -7 lines
Diff to previous 1.86 (colored)

fix simple_lock/unlock mismatches.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Feb 20 04:27:25 2003 UTC (9 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.85: +122 -122 lines
Diff to previous 1.85 (colored)

Tabify, and fix some comment alignment problems.

Revision 1.85 / (download) - annotate - [select for diffs], Wed Feb 19 12:22:51 2003 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.84: +9 -8 lines
Diff to previous 1.84 (colored)

wire the pages instead of just dequeue'ing them.
advised by Chuck Silvers.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Feb 17 23:48:22 2003 UTC (9 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.83: +724 -46 lines
Diff to previous 1.83 (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.83 / (download) - annotate - [select for diffs], Mon Feb 3 00:32:35 2003 UTC (9 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.82: +44 -2 lines
Diff to previous 1.82 (colored)

Don't call a dirop within a dirop: if lfs_rename is actually deleting
a link, call lfs_remove directly before starting dirop rather than
having ufs_rename do it.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Jan 30 14:18:32 2003 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.81: +3 -23 lines
Diff to previous 1.81 (colored)

there's no need to treat VOP_WHITEOUT as dirop
because it modifies only one inode.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Jan 25 23:00:10 2003 UTC (9 years, 4 months ago) by kleink
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Fix further printf format warnings for DEBUG, in the wake of daddr_t
having changed.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jan 18 09:38:20 2003 UTC (9 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.79: +4 -3 lines
Diff to previous 1.79 (colored)

Merge the nathanw_sa branch.

Revision 1.50.2.15 / (download) - annotate - [select for diffs], Wed Jan 8 17:17:51 2003 UTC (9 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.50.2.14: +2 -24 lines
Diff to previous 1.50.2.14 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

Sync with HEAD.

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jan 8 17:14:58 2003 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.78: +2 -24 lines
Diff to previous 1.78 (colored)

for lfs_remove/lfs_rmdir, keep removed vnodes marked VDIROP.
(backout parts of rev.1.40)
otherwise, directory structures can be corrupted because checkpoints can
occur via eg. lfs_vflush before parent directory is written.

Revision 1.50.2.14 / (download) - annotate - [select for diffs], Wed Jan 8 17:04:02 2003 UTC (9 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.50.2.13: +14 -12 lines
Diff to previous 1.50.2.13 (colored) to branchpoint 1.50 (colored)

Sync with HEAD.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Jan 8 15:43:29 2003 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.77: +8 -8 lines
Diff to previous 1.77 (colored)

in set_dirop/endop, use normal vref/vrele instead of lfs versions
so that we don't miss lfs_inactivate.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jan 8 15:40:56 2003 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.76: +6 -2 lines
Diff to previous 1.76 (colored)

add assertions.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Jan 8 15:40:05 2003 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.75: +4 -6 lines
Diff to previous 1.75 (colored)

use lfs_unmark_vnode instead of duplicated code fragments.

Revision 1.50.2.13 / (download) - annotate - [select for diffs], Sun Dec 29 20:57:20 2002 UTC (9 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.50.2.12: +39 -16 lines
Diff to previous 1.50.2.12 (colored) to branchpoint 1.50 (colored)

Sync with HEAD.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Dec 29 07:05:55 2002 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.74: +7 -6 lines
Diff to previous 1.74 (colored)

backout assertions in lfs_inactive.
they can be false when unmounting forcibly.

Revision 1.74 / (download) - annotate - [select for diffs], Sat Dec 28 20:08:36 2002 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.73: +5 -9 lines
Diff to previous 1.73 (colored)

fix compile problem.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Dec 28 17:22:47 2002 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.72: +4 -2 lines
Diff to previous 1.72 (colored)

avoid warnings without DIAGNOSTIC.

pointed by Andreas Wrede.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Dec 28 15:12:26 2002 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.71: +7 -6 lines
Diff to previous 1.71 (colored)

dirop inode can't be passed to lfs_inactivate.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Dec 28 14:39:09 2002 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.70: +32 -15 lines
Diff to previous 1.70 (colored)

- in lfs_reserve, vref vnodes that we're locking so that cleaner doesn't
  try to reclaim them.
  (workaround for deadlock noted in the comment in lfs_reserveavail)
- in lfs_rename, mark vnodes which are being moved as well as directry vnodes.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Dec 26 13:37:19 2002 UTC (9 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.69: +12 -6 lines
Diff to previous 1.69 (colored)

- in lfs_reserve, reserve locked buffer count as well.
- don't wait for locking buf in lfs_bwrite_ext to avoid deadlocks.
- skip lfs_reserve when we're doing dirop.
  reserve more (for lfs_truncate) in set_dirop instead.

this mostly solves PR 18972. (and hopefully PR 19196)

Revision 1.50.2.12 / (download) - annotate - [select for diffs], Wed Dec 11 06:51:46 2002 UTC (9 years, 5 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.50.2.11: +1 -1 lines
Diff to previous 1.50.2.11 (colored) to branchpoint 1.50 (colored)

Sync with HEAD.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Nov 24 08:23:41 2002 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

correct locking for lfs_rmdir. PR 18976.

Revision 1.50.2.11 / (download) - annotate - [select for diffs], Mon Nov 11 22:16:54 2002 UTC (9 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.10: +3 -0 lines
Diff to previous 1.50.2.10 (colored) to branchpoint 1.50 (colored)

Catch up to -current

Revision 1.68 / (download) - annotate - [select for diffs], Wed Oct 23 09:15:07 2002 UTC (9 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.67: +5 -2 lines
Diff to previous 1.67 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.50.2.10 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:54 2002 UTC (9 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.9: +3 -4 lines
Diff to previous 1.50.2.9 (colored) to branchpoint 1.50 (colored)

Catch up to -current.

Revision 1.50.6.9 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:58 2002 UTC (9 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.6.8: +3 -4 lines
Diff to previous 1.50.6.8 (colored) to branchpoint 1.50 (colored) next main 1.51 (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.67 / (download) - annotate - [select for diffs], Fri Sep 27 15:38:08 2002 UTC (9 years, 8 months ago) by provos
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

remove trailing \n in panic().  approved perry.

Revision 1.50.6.8 / (download) - annotate - [select for diffs], Thu Sep 26 20:40:09 2002 UTC (9 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.6.7: +3 -2 lines
Diff to previous 1.50.6.7 (colored) to branchpoint 1.50 (colored)

hook in genfs_kqfilter(), kevents seem to work fine

Revision 1.50.6.7 / (download) - annotate - [select for diffs], Mon Sep 23 11:39:10 2002 UTC (9 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.6.6: +3 -2 lines
Diff to previous 1.50.6.6 (colored) to branchpoint 1.50 (colored)

add spec kqfilter vnode op

Revision 1.66 / (download) - annotate - [select for diffs], Sun Sep 22 19:32:54 2002 UTC (9 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.65: +2 -3 lines
Diff to previous 1.65 (colored)

don't need <sys/conf.h> here

Revision 1.50.6.6 / (download) - annotate - [select for diffs], Sun Sep 22 13:57:39 2002 UTC (9 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.6.5: +3 -2 lines
Diff to previous 1.50.6.5 (colored) to branchpoint 1.50 (colored)

add fifo_kqfilter() to fifo ops, to switch on support for kevents

Revision 1.50.2.9 / (download) - annotate - [select for diffs], Mon Jun 24 22:12:38 2002 UTC (9 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.8: +3 -3 lines
Diff to previous 1.50.2.8 (colored) to branchpoint 1.50 (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.50.6.5 / (download) - annotate - [select for diffs], Sun Jun 23 17:52:13 2002 UTC (9 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.6.4: +82 -12 lines
Diff to previous 1.50.6.4 (colored) to branchpoint 1.50 (colored)

catch up with -current on kqueue branch

Revision 1.63.2.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:53:13 2002 UTC (9 years, 11 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.63.2.1: +58 -6 lines
Diff to previous 1.63.2.1 (colored) next main 1.64 (colored)

catch up with -current.

Revision 1.64.2.1 / (download) - annotate - [select for diffs], Thu Jun 20 03:52:22 2002 UTC (9 years, 11 months ago) by lukem
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-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.64: +58 -6 lines
Diff to previous 1.64 (colored) next main 1.65 (colored)

Pull up revision 1.65 (requested by perseant in ticket #325):
For synchronous writes, keep separate i/o counters for each write, so
processes don't have to wait for one another to finish (e.g., nfsd seems
to be a little happier now, though I haven't measured the difference).
Synchronous checkpoints, however, must always wait for all i/o to finish.
Take the contents of the callback functions and have them run in thread
context instead (aiodoned thread).  lfs_iocount no longer has to be
protected in splbio(), and quite a bit less of the segment construction
loop needs to be in splbio() as well.
If lfs_markv is handed a block that is not the correct size according to
the inode, refuse to process it.  (Formerly it was extended to the "correct"
size.)  This is possibly more prone to deadlock, but less prone to corruption.
lfs_segclean now outright refuses to clean segments that appear to have live
bytes in them.  Again this may be more prone to deadlock but avoids
corruption.
Replace ufsspec_close and ufsfifo_close with LFS equivalents; this means
that no UFS functions need to know about LFS_ITIMES any more.  Remove
the reference from ufs/inode.h.
Tested on i386, test-compiled on alpha.

Revision 1.50.2.8 / (download) - annotate - [select for diffs], Thu Jun 20 03:50:35 2002 UTC (9 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.7: +82 -12 lines
Diff to previous 1.50.2.7 (colored) to branchpoint 1.50 (colored)

Catch up to -current.

Revision 1.65 / (download) - annotate - [select for diffs], Sun Jun 16 00:13:16 2002 UTC (9 years, 11 months ago) by perseant
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.64: +58 -6 lines
Diff to previous 1.64 (colored)

For synchronous writes, keep separate i/o counters for each write, so
processes don't have to wait for one another to finish (e.g., nfsd seems
to be a little happier now, though I haven't measured the difference).
Synchronous checkpoints, however, must always wait for all i/o to finish.

Take the contents of the callback functions and have them run in thread
context instead (aiodoned thread).  lfs_iocount no longer has to be
protected in splbio(), and quite a bit less of the segment construction
loop needs to be in splbio() as well.

If lfs_markv is handed a block that is not the correct size according to
the inode, refuse to process it.  (Formerly it was extended to the "correct"
size.)  This is possibly more prone to deadlock, but less prone to corruption.

lfs_segclean now outright refuses to clean segments that appear to have live
bytes in them.  Again this may be more prone to deadlock but avoids
corruption.

Replace ufsspec_close and ufsfifo_close with LFS equivalents; this means
that no UFS functions need to know about LFS_ITIMES any more.  Remove
the reference from ufs/inode.h.

Tested on i386, test-compiled on alpha.

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Thu May 30 13:52:43 2002 UTC (9 years, 11 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored)

Catch up with -current.

Revision 1.64 / (download) - annotate - [select for diffs], Fri May 17 21:42:38 2002 UTC (10 years ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored)

use macros from <sys/queue.h>

Revision 1.63 / (download) - annotate - [select for diffs], Tue May 14 20:03:55 2002 UTC (10 years ago) by perseant
Branch: MAIN
Branch point for: gehenna-devsw
Changes since 1.62: +24 -6 lines
Diff to previous 1.62 (colored)

Phase one of my three-phase plan to make LFS play nice with UBC, and bug-fixes
I found while making sure there weren't any new ones.

* Make the write clusters keep track of the buffers whose blocks they contain.
  This should make it possible to (1) write clusters using a page mapping
  instead of malloc, if desired, and (2) schedule blocks for rewriting
  (somewhere else) if a write error occurs.  Code is present to use
  pagemove() to construct the clusters but that is untested and will go away
  anyway in favor of page mapping.
* DEBUG now keeps a log of Ifile writes, so that any lingering instances of
  the "dirty bufs" problem can be properly debugged.
* Keep track of whether the Ifile has been dirtied by various routines that
  can be called by lfs_segwrite, and loop on that until it is clean, for
  a checkpoint.  Checkpoints need to be squeaky clean.
* Warn the user (once) if the Ifile grows larger than is reasonable for their
  buffer cache.  Both lfs_mountfs and lfs_unmount check since the Ifile can
  grow.
* If an inode is not found in a disk block, try rereading the block, under
  the assumption that the block was copied to a cluster and then freed.
* Protect WRITEINPROG() with splbio() to fix a hang in lfs_update.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Apr 27 01:00:46 2002 UTC (10 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored)

Make exported LFSes not panic on the first file create.

Revision 1.50.6.4 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:26 2002 UTC (10 years, 2 months ago) by jdolecek
Branch: kqueue
Changes since 1.50.6.3: +24 -5 lines
Diff to previous 1.50.6.3 (colored) to branchpoint 1.50 (colored)

Catch up with -current.

Revision 1.50.2.7 / (download) - annotate - [select for diffs], Thu Feb 28 04:15:29 2002 UTC (10 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.6: +24 -5 lines
Diff to previous 1.50.2.6 (colored) to branchpoint 1.50 (colored)

Catch up to -current.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Feb 11 02:47:29 2002 UTC (10 years, 3 months ago) by perseant
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, ifpoll, eeh-devprop-base, eeh-devprop
Changes since 1.60: +24 -5 lines
Diff to previous 1.60 (colored)

Include the space taken by inodes in the count made by lfs_check();
make VOP_SETATTR call lfs_check.  This prevents large numbers of inode
changes (say, at the end of tar(1)) from filling the buffer cache.

Revision 1.50.6.3 / (download) - annotate - [select for diffs], Thu Jan 10 20:05:17 2002 UTC (10 years, 4 months ago) by thorpej
Branch: kqueue
Changes since 1.50.6.2: +56 -17 lines
Diff to previous 1.50.6.2 (colored) to branchpoint 1.50 (colored)

Sync kqueue branch with -current.

Revision 1.50.2.6 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:55 2002 UTC (10 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.5: +52 -15 lines
Diff to previous 1.50.2.5 (colored) to branchpoint 1.50 (colored)

Catch up to -current.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Dec 18 07:51:18 2001 UTC (10 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.59: +42 -5 lines
Diff to previous 1.59 (colored)

use the new compatibility routines to allow mmap() to work
(in the same non-coherent fashion that it worked pre-UBC)
until someone has time to do it the right way.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Nov 23 21:44:29 2001 UTC (10 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.58: +12 -12 lines
Diff to previous 1.58 (colored)

add spaces for KNF.  confirmed to produce identical objects.

Revision 1.50.2.5 / (download) - annotate - [select for diffs], Wed Nov 14 19:19:00 2001 UTC (10 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.4: +4 -2 lines
Diff to previous 1.50.2.4 (colored) to branchpoint 1.50 (colored)

Catch up to -current.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:49 2001 UTC (10 years, 6 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.56: +4 -2 lines
Diff to previous 1.56 (colored) next main 1.57 (colored)

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

Revision 1.58 / (download) - annotate - [select for diffs], Thu Nov 8 02:39:14 2001 UTC (10 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.57: +4 -1 lines
Diff to previous 1.57 (colored)

add RCSID

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 26 05:56:10 2001 UTC (10 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.56: +1 -2 lines
Diff to previous 1.56 (colored)

remove #include <ufs/ufs/quota.h> where it was just to appease
<ufs/ufs/inode.h>, since the latter now includes the former.  leave the former
in source that obviously uses specific bits of it (for completeness.)

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:48:30 2001 UTC (10 years, 7 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

Catch up with -current.

Revision 1.50.2.4 / (download) - annotate - [select for diffs], Wed Sep 26 19:55:13 2001 UTC (10 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.3: +2 -1 lines
Diff to previous 1.50.2.3 (colored) to branchpoint 1.50 (colored)

Catch up to -current.
Again.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Sep 22 22:35:20 2001 UTC (10 years, 8 months ago) by sommerfeld
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored)

Add fifo_putpages() placebo so that the vnode's uobj is unlocked.

Revision 1.50.2.3 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:08 2001 UTC (10 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.2: +4 -3 lines
Diff to previous 1.50.2.2 (colored) to branchpoint 1.50 (colored)

Catch up to -current.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:43 2001 UTC (10 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: post-chs-ubcperf
Changes since 1.54: +2 -3 lines
Diff to previous 1.54 (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.50.6.2 / (download) - annotate - [select for diffs], Sat Aug 25 06:17:19 2001 UTC (10 years, 9 months ago) by thorpej
Branch: kqueue
Changes since 1.50.6.1: +9 -4 lines
Diff to previous 1.50.6.1 (colored) to branchpoint 1.50 (colored)

Merge Aug 24 -current into the kqueue branch.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Aug 24 06:42:46 2001 UTC (10 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.53: +3 -1 lines
Diff to previous 1.53 (colored)

disable mmap() for LFS until it is fixed.

Revision 1.50.2.2 / (download) - annotate - [select for diffs], Fri Aug 24 00:13:30 2001 UTC (10 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50.2.1: +42 -48 lines
Diff to previous 1.50.2.1 (colored) to branchpoint 1.50 (colored)

Catch up with -current.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Aug 17 05:54:37 2001 UTC (10 years, 9 months ago) by chs
Branch: MAIN
Changes since 1.52: +7 -4 lines
Diff to previous 1.52 (colored)

add getpages/putpages entries for spec vnodes.

Revision 1.50.6.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:14:10 2001 UTC (10 years, 9 months ago) by lukem
Branch: kqueue
Changes since 1.50: +39 -48 lines
Diff to previous 1.50 (colored)

update to -current

Revision 1.52 / (download) - annotate - [select for diffs], Tue Jul 24 15:39:34 2001 UTC (10 years, 10 months ago) by assar
Branch: MAIN
Changes since 1.51: +10 -2 lines
Diff to previous 1.51 (colored)

change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it.  update callers and
file systems that implement these vnode operations

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jul 13 20:30:25 2001 UTC (10 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.50: +30 -47 lines
Diff to previous 1.50 (colored)

Merge the short-lived perseant-lfsv2 branch into the trunk.

Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default.  Changes for the v2 layout include:

- Segments of non-PO2 size and arbitrary block offset, so these can be
  matched to convenient physical characteristics of the partition (e.g.,
  stripe or track size and offset).

- Address by fragment instead of by disk sector, paving the way for
  non-512-byte-sector devices.  In theory fragments can be as large
  as you like, though in reality they must be smaller than MAXBSIZE in size.

- Use serial number and filesystem identifier to ensure that roll-forward
  doesn't get old data and think it's new.  Roll-forward is enabled for
  v2 filesystems, though not for v1 filesystems by default.

- The inode free list is now a tailq, paving the way for undelete (undelete
  is not yet implemented, but can be without further non-backwards-compatible
  changes to disk structures).

- Inode atime information is kept in the Ifile, instead of on the inode;
  that is, the inode is never written *just* because atime was changed.
  Because of this the inodes remain near the file data on the disk, rather
  than wandering all over as the disk is read repeatedly.  This speeds up
  repeated reads by a small but noticeable amount.

Other changes of note include:

- The ifile written by newfs_lfs can now be of arbitrary length, it is no
  longer restricted to a single indirect block.

- Fixed an old bug where ctime was changed every time a vnode was created.
  I need to look more closely to make sure that the times are only updated
  during write(2) and friends, not after-the-fact during a segment write,
  and certainly not by the cleaner.

Revision 1.50.4.2 / (download) - annotate - [select for diffs], Mon Jul 2 17:48:20 2001 UTC (10 years, 10 months ago) by perseant
Branch: perseant-lfsv2
Changes since 1.50.4.1: +6 -5 lines
Diff to previous 1.50.4.1 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

Change disk addressing unit to be the fragment, instead of the disk sector.
All quantities in the superblock, inodes, indirect blocks, etc. refer now
to this abstract unit (called "fsb" as it is in FFS) instead of disk sectors;
as a consequence segment summary blocks have to be multiples of a fragment in
size.  In v1 filesystems, compatibility code ensures that 1 fsb == 1 sector,
regardless of fragment size.

Fragments can now range in size between 512 and 32k; in the event that
LFS_LABELPAD (8k) is smaller than the disk address unit size, an extra
proto-superblock is kept at 8k from the beginning of the disk, to be used
*only* to locate the real superblocks.  (Not all of the userland knows about
this yet.)

Almost all of this was done not by me, but by joff.

Revision 1.50.4.1 / (download) - annotate - [select for diffs], Fri Jun 29 03:56:43 2001 UTC (10 years, 10 months ago) by perseant
Branch: perseant-lfsv2
Changes since 1.50: +25 -43 lines
Diff to previous 1.50 (colored)

Get rid of __P(), protoizing where it had not already been done

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:50:08 2001 UTC (11 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.50: +3 -2 lines
Diff to previous 1.50 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.28.2.3 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:44 2001 UTC (11 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.28.2.2: +7 -7 lines
Diff to previous 1.28.2.2 (colored) next main 1.29 (colored)

Sync with HEAD.

Revision 1.38.2.6 / (download) - annotate - [select for diffs], Sat Feb 3 21:58:42 2001 UTC (11 years, 3 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.38.2.5: +5 -1 lines
Diff to previous 1.38.2.5 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

Pull up revisions 1.47-1.49 (requested by perseant):
  o Don't write anything if the filesystem is idle (PR#10979).
  o Close up accounting holes in LFS' accounting of immediately-
    available-space, number of clean segments, and amount of dirty
    space taken up by metadata (PR#11468, PR#11470, PR#11534).

Revision 1.50 / (download) - annotate - [select for diffs], Mon Jan 22 12:17:43 2001 UTC (11 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, perseant-lfsv2-base
Branch point for: perseant-lfsv2, nathanw_sa, kqueue
Changes since 1.49: +7 -7 lines
Diff to previous 1.49 (colored)

make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const

Revision 1.38.2.5 / (download) - annotate - [select for diffs], Thu Dec 14 23:36:31 2000 UTC (11 years, 5 months ago) by he
Branch: netbsd-1-5
Changes since 1.38.2.4: +4 -2 lines
Diff to previous 1.38.2.4 (colored) to branchpoint 1.38 (colored)

Pull up revision 1.45 (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.28.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:06:54 2000 UTC (11 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.28.2.1: +5 -1 lines
Diff to previous 1.28.2.1 (colored)

Sync with HEAD.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:11:52 2000 UTC (11 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.28: +266 -97 lines
Diff to previous 1.28 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.49 / (download) - annotate - [select for diffs], Sat Nov 18 02:11:23 2000 UTC (11 years, 6 months ago) by toshii
Branch: MAIN
Changes since 1.48: +4 -2 lines
Diff to previous 1.48 (colored)

Make buildable again.
The previous commit was a backout of rev. 1.45, which must be an accident.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Nov 17 19:14:42 2000 UTC (11 years, 6 months ago) by perseant
Branch: MAIN
Changes since 1.47: +2 -4 lines
Diff to previous 1.47 (colored)

Correct accounting of lfs_avail, locked_queue_count, and locked_queue_bytes.
(PR #11468).  In the case of fragment allocation, check to see if enough
space is available before extending a fragment already scheduled for writing.

The locked_queue_* variables indicate the number of buffer headers and bytes,
respectively, that are unavailable to getnewbuf() because they are locked up
waiting for LFS to flush them; make sure that that is actually what we're
counting, i.e., never count malloced buffers, and always use b_bufsize instead
of b_bcount.

If DEBUG is defined, the periodic calls to lfs_countlocked will now complain
if either counter is incorrect.  (In the future lfs_countlocked will not need
to be called at all if DEBUG is not defined.)

Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 12 07:58:36 2000 UTC (11 years, 6 months ago) by perseant
Branch: MAIN
Changes since 1.46: +5 -1 lines
Diff to previous 1.46 (colored)

Do not needlessly dirty segment table blocks during lfs_segwrite,
preventing needless disk activity when the filesystem is idle.  (PR #10979.)

Revision 1.38.2.4 / (download) - annotate - [select for diffs], Wed Nov 1 16:34:31 2000 UTC (11 years, 6 months ago) by tv
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2
Changes since 1.38.2.3: +7 -4 lines
Diff to previous 1.38.2.3 (colored) to branchpoint 1.38 (colored)

Fix pullup of 1.46 [perseant, toshii]:
In lfs_truncate, don't overcount the real blocks removed from the inode,
when deallocating a fragment that has not made it to disk yet.

Also, during dirops, give the directory vnode an extra reference in
SET_DIROP, to ensure its continued existence during SET_ENDOP, preventing
a possible NULL-dereference there.

These two changes should close PR #11064.

Revision 1.38.2.3 / (download) - annotate - [select for diffs], Wed Nov 1 03:57:18 2000 UTC (11 years, 6 months ago) by tv
Branch: netbsd-1-5
Changes since 1.38.2.2: +4 -2 lines
Diff to previous 1.38.2.2 (colored) to branchpoint 1.38 (colored)

Pullup 1.46 [perseant, toshii]:
In lfs_truncate, don't overcount the real blocks removed from the inode,
when deallocating a fragment that has not made it to disk yet.

Also, during dirops, give the directory vnode an extra reference in
SET_DIROP, to ensure its continued existence during SET_ENDOP, preventing
a possible NULL-dereference there.

These two changes should close PR #11064.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Oct 14 23:22:14 2000 UTC (11 years, 7 months ago) by perseant
Branch: MAIN
Changes since 1.45: +7 -2 lines
Diff to previous 1.45 (colored)

In lfs_truncate, don't overcount the real blocks removed from the inode,
when deallocating a fragment that has not made it to disk yet.

Also, during dirops, give the directory vnode an extra reference in
SET_DIROP, to ensure its continued existence during SET_ENDOP, preventing
a possible NULL-dereference there.

These two changes should close PR #11064.

Revision 1.45 / (download) - annotate - [select for diffs], Tue Sep 19 22:03:15 2000 UTC (11 years, 8 months ago) by fvdl
Branch: MAIN
Changes since 1.44: +4 -2 lines
Diff to previous 1.44 (colored)

Adapt for VOP_FSYNC parameter change.

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Thu Sep 14 18:50:20 2000 UTC (11 years, 8 months ago) by perseant
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-BETA
Changes since 1.38.2.1: +119 -40 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored)

Pull up recent LFS kernel changes (approved by thorpej):

ufs/ufs/inode.h, 1.20--1.22      (add i_lfs_effnblks extension ;
                                 make ITIMES aware of LFS_ITIMES;
                                 _LKM protection so userland progs
                                 compile)
ufs/ufs/ufs_vnops.c, 1.69, 1.71  (remove IN_ADIROP;
                                 use ITIMES instead of FFS_ITIMES)
ufs/ufs/ufs_readwrite.c, 1.27    (use lfs_reserve in lfs_write)
ufs/lfs/lfs.h, 1.26--1.32        (define LFS_EST_* macros ;
                                 change MIN_FREE_SEGS to lfs_minfreesegs ;
                                 add avail and bfree to CLEANERINFO ;
                                 change lfs_uinodes to signed ;
                                 change lfs_dmeta to signed ;
                                 add whitespace to line up structure
                                 members ;
                                 explicit cast to int32_t in LFS_EST_*
                                 macros)
ufs/lfs/lfs_alloc.c, back out 1.34.2.3 (pullups of 1.39, 1.40);
then pull up         1.38        (clean up on error)
                     1.39--1.43  (restore fvdl's ufs_hashlock fix ;
                                 restore fvdl's ufs_hashlock fix ;
                                 set i_lfs_effnblks ;
                                 use UINO macros ;
                                 add comments and fix long lines)
ufs/lfs/lfs_balloc.c, 1.19       (don't succeed halfway)
                      1.21--1.25 (use i_lfs_effnblks ;
                                 fix i_lfs_effnblks computation and
                                 quieten ;
                                 fix i_ffs_blocks in unwritten fragment ;
                                 remove useless debugging check ;
                                 add comments and (c) 2000)
ufs/lfs/lfs_bio.c, 1.24--1.30    (cleanup and make lfs_flush_fs take
                                   "struct lfs *" instead of "struct
                                 mount *" ;
                                 use lfs_minfreeseg instead of
                                 MIN_FREE_SEGS ;
                                 use UINO macros, and copy bfree/avail
                                   to CLEANERINFO ;
                                 add lfs_reserve function ;
                                 1.28--1.30 fix printf formatting)
ufs/lfs/lfs_cksum.c, 1.13        (add (c) 2000)
ufs/lfs/lfs_debug.c, 1.11        (use btodb instead of DEV_BSIZE)
ufs/lfs/lfs_extern.h, 1.18, 1.20--1.21 (function prototype changes)
ufs/lfs/lfs_inode.c, 1.38        (rewrite lfs_truncate from
                                 ffs_truncate)
                     1.40--1.44  (count written and unwritten blocks
                                   seperately ;
                                 use disk block units instead of bytes ;
                                 remove unnecessary "mod" variable ;
                                 correct B_DELWRI to avoid bawrite panic ;
                                 use lfs_reserve)
ufs/lfs/lfs_segment.c, 1.52-1.59 (use lfs_dmeta to note used summaries ;
                                 check for UNWRITTEN in indirect blocks ;
                                 more debugging stuff inside #ifdef
                                 DEBUG_LFS ;
                                 use LK_CANRECURSE ;
                                 don't drop dirty indirect blocks ;
                                 use UINO macros ;
                                 don't hose the free list ;
                                 use btodb() instead of DEV_BSIZE ;
                                 make it compile again (oops))
ufs/lfs/lfs_subr.c, 1.16--1.17   (check for locked inodes before
                                 changing ;
                                 use btodb() instead of DEV_BSIZE, (c)
                                 2000)
ufs/lfs/lfs_syscalls.c, back out 1.41.4.2 (fvdl's ufs_hashlock fix);
then pull up          1.43       (use lfs_dmeta)
                      1.44--1.45 (restore fvdl's ufs_hashlock fix)
                      1.46--1.47 (fix lfs_avail leakage from sblock
                                 segments ;
                                 use UINO macros)
                      1.49       (bounds-check inode numbers in
                                 lfs_markv)
ufs/lfs/lfs_vfsops.c, 1.53       (use LFS_EST_* macros in lfs_statfs)
                      1.56--1.58 (initialize lfs_minfreeseg, lfs_effnblk ;
                                 initialize lfs_uinodes ;
                                 initialize lfs_ravail)
ufs/lfs/lfs_vnops.c, 1.40        (remove VDIROP from removed files)
                     1.42--1.44  (move SET_ENDOP below the removal of
                                 VDIROP ;
                                 use UINO macros and add lfs_itimes
                                 function ;
                                 use lfs_reserve in dirops)

Revision 1.44 / (download) - annotate - [select for diffs], Sat Sep 9 04:49:55 2000 UTC (11 years, 8 months ago) by perseant
Branch: MAIN
Changes since 1.43: +16 -4 lines
Diff to previous 1.43 (colored)

Various bug-fixes to LFS, to wit:


Kernel:

* Add runtime quantity lfs_ravail, the number of disk-blocks reserved
  for writing.  Writes to the filesystem first reserve a maximum amount
  of blocks before their write is allowed to proceed; after the blocks
  are allocated the reserved total is reduced by a corresponding amount.

  If the lfs_reserve function cannot immediately reserve the requested
  number of blocks, the inode is unlocked, and the thread sleeps until
  the cleaner has made enough space available for the blocks to be
  reserved.  In this way large files can be written to the filesystem
  (or, smaller files can be written to a nearly-full but thoroughly
  clean filesystem) and the cleaner can still function properly.

* Remove explicit switching on dlfs_minfreeseg from the kernel code; it
  is now merely a fs-creation parameter used to compute dlfs_avail and
  dlfs_bfree (and used by fsck_lfs(8) to check their accuracy).  Its
  former role is better assumed by a properly computed dlfs_avail.

* Bounds-check inode numbers submitted through lfs_bmapv and lfs_markv.
  This prevents a panic, but, if the cleaner is feeding the filesystem
  the wrong data, you are still in a world of hurt.

* Cleanup: remove explicit references of DEV_BSIZE in favor of
  btodb()/dbtob().

lfs_cleanerd:

* Make -n mean "send N segments' blocks through a single call to
  lfs_markv".  Previously it had meant "clean N segments though N calls
  to lfs_markv, before looking again to see if more need to be cleaned".
  The new behavior gives better packing of direct data on disk with as
  little metadata as possible, largely alleviating the problem that the
  cleaner can consume more disk through inefficient use of metadata than
  it frees by moving dirty data away from clean "holes" to produce
  entirely clean segments.

* Make -b mean "read as many segments as necessary to write N segments
  of dirty data back to disk", rather than its former meaning of "read
  as many segments as necessary to free N segments worth of space".  The
  new meaning, combined with the new -n behavior described above,
  further aids in cleaning storage efficiency as entire segments can be
  written at once, using as few blocks as possible for segment summaries
  and inode blocks.

* Make the cleaner take note of segments which could not be cleaned due
  to error, and not attempt to clean them until they are entirely free
  of dirty blocks.  This prevents the case in which a cleanerd running
  with -n 1 and without -b (formerly the default) would spin trying
  repeatedly to clean a corrupt segment, while the remaining space
  filled and deadlocked the filesystem.

* Update the lfs_cleanerd manual page to describe all the options,
  including the changes mentioned here (in particular, the -b and -n
  flags were previously undocumented).

fsck_lfs:

* Check, and optionally fix, lfs_avail (to an exact figure) and
  lfs_bfree (within a margin of error) in pass 5.

newfs_lfs:

* Reduce the default dlfs_minfreeseg to 1/20 of the total segments.

* Add a warning if the sgs disklabel field is 16 (the default for FFS'
  cpg, but not usually desirable for LFS' sgs: 5--8 is a better range).

* Change the calculation of lfs_avail and lfs_bfree, corresponding to
  the kernel changes mentioned above.

mount_lfs:

* Add -N and -b options to pass corresponding -n and -b options to
  lfs_cleanerd.

* Default to calling lfs_cleanerd with "-b -n 4".


[All of these changes were largely tested in the 1.5 branch, with the
idea that they (along with previous un-pulled-up work) could be applied
to the branch while it was still in ALPHA2; however my test system has
experienced corruption on another filesystem (/dev/console has gone
missing :^), and, while I believe this unrelated to the LFS changes, I
cannot with good conscience request that the changes be pulled up.]

Revision 1.43 / (download) - annotate - [select for diffs], Wed Jul 5 22:25:44 2000 UTC (11 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.42: +13 -5 lines
Diff to previous 1.42 (colored)

Clean up accounting of lfs_uinodes (dirty but unwritten inodes).

Make lfs_uinodes a signed quantity for debugging purposes, and set it to
zero as fs mount time.

Enclose setting/clearing of the dirty flags (IN_MODIFIED, IN_ACCESSED,
IN_CLEANING) in macros, and use those macros everywhere.  Make
LFS_ITIMES use these macros; updated the ITIMES macro in inode.h to know
about this.  Make ufs_getattr use ITIMES instead of FFS_ITIMES.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Jul 1 19:03:57 2000 UTC (11 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Move SET_ENDOP after vrele to avoid deactivating vnode twice, if
SET_ENDOP triggers a write.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jun 28 14:16:42 2000 UTC (11 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.40: +1 -3 lines
Diff to previous 1.40 (colored)

remove include of <vm/vm.h> and <uvm/uvm_extern.h>

Revision 1.40 / (download) - annotate - [select for diffs], Tue Jun 27 20:57:18 2000 UTC (11 years, 11 months ago) by perseant
Branch: MAIN
Changes since 1.39: +92 -33 lines
Diff to previous 1.39 (colored)

Fixes associated with filling an LFS:

Change the space computation to appear to change the size of the *disk*
rather than the *bytes used* when more segment summaries and inode
blocks are written.  Try to estimate the amount of space that these will
take up when more files are written, so the disk size doesn't change too
much.

Regularize error returns from lfs_valloc, lfs_balloc, lfs_truncate: they
now fail entirely, rather than succeeding half-way and leaving the fs in
an inconsistent state.

Rewrite lfs_truncate, mostly stealing from ffs_truncate.  The old
lfs_truncate had difficulty truncating a large file to a non-zero size
(indirect blocks were not handled appropriately).

Unmark VDIROP on fvp after ufs_remove, ufs_rmdir, so these can be
reclaimed immediately: this vnode would not be written to disk again
anyway if the removal succeeded, and if it failed, no directory
operation occurred.

ufs_makeinode and ufs_mkdir now remove IN_ADIROP on error.

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 20:26:20 2000 UTC (11 years, 11 months ago) by perseant
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Pull up lfs_vunref fix from the trunk.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Jun 22 18:11:46 2000 UTC (11 years, 11 months ago) by perseant
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Update lfs_vunref for the fact that now a vnode can be locked with no
references (locked for VOP_INACTIVE at the end of vrele) and it's okay.
Check the return value of lfs_vref where appropriate.
Fixes PR #s 10285 and 10352.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:38 2000 UTC (11 years, 11 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.38 / (download) - annotate - [select for diffs], Wed May 31 01:40:02 2000 UTC (11 years, 11 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

update for IN_ACCESSED changes

Revision 1.37 / (download) - annotate - [select for diffs], Sat May 27 00:19:54 2000 UTC (12 years ago) by perseant
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.36: +74 -41 lines
Diff to previous 1.36 (colored)

Prevent dirops from getting around lfs_check and wedging the buffer cache.
All the dirop vnops now mark the inodes with a new flag, IN_ADIROP, which
is removed as soon as the dirop is done (as opposed to VDIROP which stays
until the file is written).  To address one issue raised in PR#9357.

Revision 1.36 / (download) - annotate - [select for diffs], Sat May 13 23:43:15 2000 UTC (12 years ago) by perseant
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Change the sementics of the last parameter from a boolean ("waitfor") to
a set of flags ("flags").  Two flags are defined, UPDATE_WAIT and
UPDATE_DIROP.

Under the old semantics, VOP_UPDATE would block if waitfor were set,
under the assumption that directory operations should be done
synchronously.  At least LFS and FFS+softdep do not make this
assumption; FFS+softdep got around the problem by enclosing all relevant
calls to VOP_UPDATE in a "if(!DOINGSOFTDEP(vp))", while LFS simply
ignored waitfor, one of the reasons why NFS-serving an LFS filesystem
did not work properly.

Under the new semantics, the UPDATE_DIROP flag is a hint to the
fs-specific update routine that the call comes from a dirop routine, and
should be wait for, or not, accordingly.

Closes PR#8996.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 30 12:41:14 2000 UTC (12 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.34: +6 -6 lines
Diff to previous 1.34 (colored)

Remove register declarations.

Revision 1.25.2.6 / (download) - annotate - [select for diffs], Sat Jan 15 17:55:34 2000 UTC (12 years, 4 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002
Changes since 1.25.2.5: +53 -41 lines
Diff to previous 1.25.2.5 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

Pull up revision 1.34 (requested by perseant):
  Fix error returns on lfs vnops so that locks and reference counts
  are preserved.  Handle dirop accounting in lfs_vfree for this
  case as well.  Addresses PR#8823.

Revision 1.25.2.5 / (download) - annotate - [select for diffs], Sat Jan 15 17:52:33 2000 UTC (12 years, 4 months ago) by he
Branch: netbsd-1-4
Changes since 1.25.2.4: +52 -8 lines
Diff to previous 1.25.2.4 (colored) to branchpoint 1.25 (colored)

Pull up revision 1.28 (requested by perseant):
  Address problems related to using an LFS filesystem as the root
  filesystem, including mknod hangs.  Fixes PR#8172 and PR#9072.

Revision 1.28.6.2 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:40 1999 UTC (12 years, 5 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.28.6.1: +94 -42 lines
Diff to previous 1.28.6.1 (colored) next main 1.29 (colored)

Pull up to last week's -current.

Revision 1.28.6.1 / (download) - annotate - [select for diffs], Tue Dec 21 23:20:10 1999 UTC (12 years, 5 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (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.25.2.4 / (download) - annotate - [select for diffs], Sat Dec 18 00:01:53 1999 UTC (12 years, 5 months ago) by he
Branch: netbsd-1-4
Changes since 1.25.2.3: +9 -2 lines
Diff to previous 1.25.2.3 (colored) to branchpoint 1.25 (colored)

Pull up revision 1.33 (requested by perseant):
  Handle the case of a vnode flush while dirops are active correctly
  in lfs_segwrite.  Also, make sure a flush is called in SET_DIROP
  before sleeping on its results.  Addresses PR#8863.

Revision 1.25.2.3 / (download) - annotate - [select for diffs], Fri Dec 17 23:55:28 1999 UTC (12 years, 5 months ago) by he
Branch: netbsd-1-4
Changes since 1.25.2.2: +7 -6 lines
Diff to previous 1.25.2.2 (colored) to branchpoint 1.25 (colored)

Pull up revision 1.31 (requested by perseant):
  Address locking protocol error for inode hash, and make the
  maximum number of active dirops a global quantity.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Dec 15 07:19:07 1999 UTC (12 years, 5 months ago) by perseant
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.33: +53 -41 lines
Diff to previous 1.33 (colored)

Fix error returns on lfs vnops so that locks and reference counts are
preserved.  Handle dirop accounting in lfs_vfree for this case as well.
May address PR#8823.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Dec 3 21:47:44 1999 UTC (12 years, 5 months ago) by perseant
Branch: MAIN
Changes since 1.32: +9 -2 lines
Diff to previous 1.32 (colored)

Handle the case of a vnode flush while dirops are active correctly in
lfs_segwrite.  Also, make sure a flush is called in SET_DIROP before sleeping
on its results.  Addresses PR #8863.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:14 1999 UTC (12 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.31: +2 -1 lines
Diff to previous 1.31 (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.28.4.2 / (download) - annotate - [select for diffs], Mon Nov 15 00:42:27 1999 UTC (12 years, 6 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.28.4.1: +49 -17 lines
Diff to previous 1.28.4.1 (colored) next main 1.29 (colored)

Sync with -current

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Mon Nov 8 06:26:44 1999 UTC (12 years, 6 months ago) by cgd
Branch: netbsd-1-4
Changes since 1.25.2.1: +43 -12 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored)

pull up revs 1.29-1.30 from trunk (requested by perseant):
  Check for cross-device rename before setting up dirop markers in
  lfs_rename.  Addresses PR#8577.

Revision 1.31.2.2 / (download) - annotate - [select for diffs], Sat Nov 6 20:33:07 1999 UTC (12 years, 6 months ago) by perseant
Branch: comdex-fall-1999
Changes since 1.31.2.1: +713 -0 lines
Diff to previous 1.31.2.1 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

Address ufs_hashlock/ufs_ihashins protocol bug, discovered while doing a
post-mortem of a production machine.  Also, take the active dirop
count off of the fs and make it global (since it is measuring a global
resource) and tie the threshold value LFS_MAXDIROP to desiredvnodes.

Revision 1.31.2.1, Sat Nov 6 20:33:06 1999 UTC (12 years, 6 months ago) by perseant
Branch: comdex-fall-1999
Changes since 1.31: +0 -713 lines
FILE REMOVED

file lfs_vnops.c was added on branch comdex-fall-1999 on 1999-11-06 20:33:07 +0000

Revision 1.31 / (download) - annotate - [select for diffs], Sat Nov 6 20:33:06 1999 UTC (12 years, 6 months ago) by perseant
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base
Branch point for: comdex-fall-1999
Changes since 1.30: +7 -6 lines
Diff to previous 1.30 (colored)

Address ufs_hashlock/ufs_ihashins protocol bug, discovered while doing a
post-mortem of a production machine.  Also, take the active dirop
count off of the fs and make it global (since it is measuring a global
resource) and tie the threshold value LFS_MAXDIROP to desiredvnodes.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Nov 5 20:14:56 1999 UTC (12 years, 6 months ago) by perseant
Branch: MAIN
Changes since 1.29: +40 -13 lines
Diff to previous 1.29 (colored)

Better fix for PR# 8577: before setting dirops, check for cross-device
rename and error out.  This avoids possible problems with attempting
rename between two LFSs.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Nov 1 18:29:33 1999 UTC (12 years, 6 months ago) by perseant
Branch: MAIN
Changes since 1.28: +10 -6 lines
Diff to previous 1.28 (colored)

Check that the destination vnode is on an LFS before trying to twiddle
its superblock.  Fixes PR#8577.

Revision 1.28.4.1 / (download) - annotate - [select for diffs], Tue Oct 19 12:50:45 1999 UTC (12 years, 7 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Bring in Kirk McKusick's FFS softdep code on a branch.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Sep 3 22:48:51 1999 UTC (12 years, 8 months ago) by perseant
Branch: MAIN
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.27: +52 -8 lines
Diff to previous 1.27 (colored)

Make changes that will allow an LFS filesystem to be used as the root
filesystem.  In particular,

- Fix mknod deadlock, described in PR 8172.
- Enable lfs_mountroot.
- Make lfs_writevnodes treat filesystems mounted on lfs device nodes properly,
  by flushing that device rather than trying to add blocks to the device inode.

This, in combination with lfs boot blocks, will allow operation of an all-lfs
system.

Revision 1.25.2.1.2.5 / (download) - annotate - [select for diffs], Tue Aug 31 21:03:46 1999 UTC (12 years, 8 months ago) by perseant
Branch: chs-ubc2
Changes since 1.25.2.1.2.4: +278 -3 lines
Diff to previous 1.25.2.1.2.4 (colored) to branchpoint 1.25.2.1 (colored) next main 1.25.2.2 (colored)

Rudimentary support for LFS under UBC:

- LFS-specific VOP_BALLOC and VOP_PUTPAGES vnode ops.

- getblk VREG panic #ifdef'd out (can be reinstated when Ifile is
  internalized and Ifile can be made another type from VREG)

- interface to VOP_PUTPAGES changed to pass all pager flags, not
  just sync.  FS putpages routines must know about the pager flags.

- new LFS magic disk address, -2 ("unwritten"), meaning accounted for
  but not assigned to a fixed disk location (since LFS does these two
  things separately, and the previous accounting method using buffer
  headers no longer will work).  Changed references to (foo == (daddr_t)-1)
  to (foo < 0).  Since disk drivers reject all addresses < 0, this should
  not present a problem for other FSs.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Aug 3 20:19:22 1999 UTC (12 years, 9 months ago) by wrstuden
Branch: MAIN
Changes since 1.26: +4 -1 lines
Diff to previous 1.26 (colored)

Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden

Revision 1.25.2.1.2.4 / (download) - annotate - [select for diffs], Sun Jul 11 05:52:10 1999 UTC (12 years, 10 months ago) by chs
Branch: chs-ubc2
Changes since 1.25.2.1.2.3: +4 -1 lines
Diff to previous 1.25.2.1.2.3 (colored) to branchpoint 1.25.2.1 (colored)

add placeholders for getpages/putpages.

Revision 1.25.2.1.2.3 / (download) - annotate - [select for diffs], Fri Jul 2 22:43:23 1999 UTC (12 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.25.2.1.2.2: +1 -3 lines
Diff to previous 1.25.2.1.2.2 (colored) to branchpoint 1.25.2.1 (colored)

Take two at making a non-converted LFS work in a UBC kernel.

Revision 1.25.2.1.2.2 / (download) - annotate - [select for diffs], Mon Jun 21 15:50:49 1999 UTC (12 years, 11 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.25.2.1.2.1: +3 -1 lines
Diff to previous 1.25.2.1.2.1 (colored) to branchpoint 1.25.2.1 (colored)

Pull in ffs_extern.h to get ffs_balloc_range() prototype for
ufs_readwrite.c

Revision 1.25.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:31:13 1999 UTC (12 years, 11 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.25.2.1: +0 -0 lines
Diff to previous 1.25.2.1 (colored)

Sync w/ -current.

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Tue Apr 13 21:33:57 1999 UTC (13 years, 1 month ago) by perseant
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.25: +12 -17 lines
Diff to previous 1.25 (colored)

Pull-up of changes made to the trunk on Sunday [1.25->1.26], to wit:

Take out the `#ifdef USE_UFSHASH'; use ufs_hashlock to lock the inode free
list instead of free_lock.

Fix inode reporting in lfs_statfs (the meaning of f_files and f_ffree was
reversed).

Fix "lfs_ifind: dinode xxx not found" panic.  When inodes were freed, then
immediately reloaded, their dinodes were located in an inode block which
was not on disk at the advertized location, nor in the cache (although it
would be flushed to disk next segment write).  Fix this by using getblk()
instead of lfs_newbuf() for inode blocks.

Better checking for held inode locks in lfs_fastvget, for a number of
error conditions.  Also change the default setting of lfs_clean_vnhead to
0, which seems to make the locking problems go away (although this is
difficult to test as I can't reliably reproduce them).

Make sure that the wakeup occurs for vnodes that lfs_update might be
sleeping on (nodes which are not marked IN_MODIFIED/IN_CLEANING, but which
have dirty buffers), by marking them with the appropriate flag if
dirtybuffers were added while the write was in progress.

Fix block counting during file truncation, if not truncating to zero.

Disallow threshold-initiated cache flush when dirops are active.  Also,
make SET_ENDOP use lfs_check instead of inlining most of it.

Improve the debugging printfs in the cleaner syscalls (in particular, make
it obvious that they're coming from lfs).

Check the superblock version field, and refuse to mount the filesystem if
the version number is higher than we know about.  This allows, e.g.,
changes in the format of the ifile, segment size restrictions and
boundaries, etc., which would not affect existing fields in the
superblock, but which would drastically affect the filesystem, to be
smoothly integrated at a later date.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Apr 12 00:36:47 1999 UTC (13 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.25: +12 -17 lines
Diff to previous 1.25 (colored)

Disallow threshold-initiated cache flush when dirops are active.  Also, make
SET_ENDOP use lfs_check instead of inlining most of it.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Mar 29 21:54:26 1999 UTC (13 years, 2 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.24: +3 -2 lines
Diff to previous 1.24 (colored)

Fix the other missing dirop wakeup

Revision 1.24 / (download) - annotate - [select for diffs], Thu Mar 25 22:33:03 1999 UTC (13 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.23: +75 -34 lines
Diff to previous 1.23 (colored)

Since dirop vnodes can't be flushed, they hold a reference until their
dirop is completely written to disk.  This means that ordinary calls to
ufs vnops which would ordinarily call VOP_INACTIVE through vrele/vput,
don't.  This patch detects that condition after such vnops have been
run, and calls VOP_INACTIVE if it would ordinarily have been called by
the ufs call.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Mar 25 21:39:19 1999 UTC (13 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.22: +1 -18 lines
Diff to previous 1.22 (colored)

clean up unused/required #ifdefs

Revision 1.22 / (download) - annotate - [select for diffs], Wed Mar 10 00:20:00 1999 UTC (13 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.21: +113 -23 lines
Diff to previous 1.21 (colored)

New sources should leave the LFS in a more-or-less working state.  Changes
include:

	- DIROP segregation is enabled, and greater care is taken
	  to make sure that a checkpoint completes.  Fsck is not
	  needed to remount the filesystem.
	- Several checks to make sure that the LFS subsystem does not
	  overuse various resources (memory, in particular).
	- The cleaner routines, lfs_markv in particular, are completely
	  rewritten.  A buffer overflow is removed.  Greater care is taken
	  to ensure that inodes come from where lfs_cleanerd say they come
	  from (so we know nothing has changed since lfs_bmapv was called).
	- Fragment allocation is fixed, so that writes beyond end-of-file
	  do the right thing.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Mar 5 21:09:50 1999 UTC (13 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +2 -4 lines
Diff to previous 1.20 (colored)

Pass null pointers to VOP_UPDATE rather than having all the callers fetch the
current time themselves.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Nov 6 23:02:12 1998 UTC (13 years, 6 months ago) by cgd
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

argument to dbtob needs to be cast to u_quad_t here to avoid shift lossage

Revision 1.19 / (download) - annotate - [select for diffs], Tue Sep 1 03:26:05 1998 UTC (13 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

Use the pool allocator and the "nointr" pool page allocator for LFS inodes.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jun 24 20:58:48 1998 UTC (13 years, 11 months ago) by sommerfe
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.17: +1 -5 lines
Diff to previous 1.17 (colored)

Always include fifos; "not an option any more".

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 22 22:01:10 1998 UTC (13 years, 11 months ago) by sommerfe
Branch: MAIN
Changes since 1.16: +3 -1 lines
Diff to previous 1.16 (colored)

defopt for options FIFO

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jun 5 19:53:02 1998 UTC (13 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Sun Mar 1 02:23:25 1998 UTC (14 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.14: +20 -26 lines
Diff to previous 1.14 (colored)

Merge with Lite2 + local changes

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

Import 4.4BSD-Lite2

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

Import 4.4BSD-Lite for reference

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jun 11 10:10:06 1997 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Changes since 1.13: +17 -17 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Sat Sep 7 12:41:40 1996 UTC (15 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

Implement poll(2).

Revision 1.12 / (download) - annotate - [select for diffs], Sun Sep 1 23:49:31 1996 UTC (15 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +6 -3 lines
Diff to previous 1.11 (colored)

Add a set of generic file system operations that most file systems use.
Also, fix some time stamp bogosities.

Revision 1.11 / (download) - annotate - [select for diffs], Sat May 11 18:27:41 1996 UTC (16 years ago) by mycroft
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.10: +4 -4 lines
Diff to previous 1.10 (colored)

Change VOP_UPDATE() semantics:
* Make 2nd and 3rd args timespecs, not timevals.
* Consistently pass a Boolean as the 4th arg (except in LFS).
Also, fix ffs_update() and lfs_update() to actually change the nsec fields.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Feb 9 22:28:59 1996 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.9: +63 -48 lines
Diff to previous 1.9 (colored)

lfs prototypes

Revision 1.9 / (download) - annotate - [select for diffs], Fri Feb 9 14:46:06 1996 UTC (16 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
  cleanup.
* Require the file system to decide whether or not linking and unlinking of
  directories is allowed, and disable it for all current file systems.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Feb 1 00:07:51 1996 UTC (16 years, 3 months ago) by jtc
Branch: MAIN
Changes since 1.7: +7 -7 lines
Diff to previous 1.7 (colored)

Rename struct timespec fields to conform to POSIX.1b

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jun 15 23:22:46 1995 UTC (16 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.6: +7 -4 lines
Diff to previous 1.6 (colored)

compensate for timeval/timespec/stat structure changes.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Dec 14 13:03:50 1994 UTC (17 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +6 -8 lines
Diff to previous 1.5 (colored)

Sync with CSRG.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 13 20:51:56 1994 UTC (17 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +7 -4 lines
Diff to previous 1.4 (colored)

Not ready for part of the previous change yet...

Revision 1.4 / (download) - annotate - [select for diffs], Tue Dec 13 20:16:25 1994 UTC (17 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.3: +8 -9 lines
Diff to previous 1.3 (colored)

Turn lease_check() into a vnode op, per CSRG.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Oct 20 04:21:13 1994 UTC (17 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.2: +7 -4 lines
Diff to previous 1.2 (colored)

update for new syscall args description mechanism, and deal safely
with wider types.

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

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

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

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

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




CVSweb <webmaster@jp.NetBSD.org>