The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.70 / (download) - annotate - [select for diffs], Mon Jul 11 08:27:40 2011 UTC (10 months, 2 weeks ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, netbsd-6-base, netbsd-6, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, HEAD
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (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.68.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:35 2010 UTC (2 years ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.68: +19 -21 lines
Diff to previous 1.68 (colored) next main 1.69 (colored)

Sync with HEAD.

Revision 1.65.10.3 / (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.65.10.2: +19 -21 lines
Diff to previous 1.65.10.2 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored)

sync with head

Revision 1.69 / (download) - annotate - [select for diffs], Tue Feb 16 23:20:30 2010 UTC (2 years, 3 months ago) by mlelstv
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.68: +19 -21 lines
Diff to previous 1.68 (colored)

Three changes in a single commit.

- drop the notion of frags (LFS fragments) vs fsb (FFS fragments)
  The code uses a complicated unity function that just makes the
  code difficult to understand.

- support larger sector sizes. Fix disk address computations
  to use DEV_BSIZE in the kernel as required by device drivers
  and to use sector sizes in userland.

- Fix several locking bugs in lfs_bio.c and lfs_subr.c.

Revision 1.67.12.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.67: +3 -3 lines
Diff to previous 1.67 (colored) next main 1.68 (colored)

Sync with HEAD.

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

Revision 1.65.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.65.10.1: +7 -6 lines
Diff to previous 1.65.10.1 (colored) to branchpoint 1.65 (colored)

sync with head.

Revision 1.67.6.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:57 2009 UTC (3 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored) next main 1.68 (colored)

Sync with HEAD.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:24 2009 UTC (3 years, 2 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, uebayasi-xip-base, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base
Branch point for: uebayasi-xip
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

bzero -> memset

Revision 1.66.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.66: +6 -5 lines
Diff to previous 1.66 (colored) next main 1.67 (colored)

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

Revision 1.65.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.65: +6 -12 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Sync with HEAD.

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

sync with head.

Revision 1.67 / (download) - annotate - [select for diffs], Fri May 16 09:22:00 2008 UTC (4 years ago) by hannken
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-hppapmap-base2, 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, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, jym-xensuspend
Changes since 1.66: +6 -5 lines
Diff to previous 1.66 (colored)

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

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

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

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

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

Welcome to 4.99.63

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

Revision 1.65.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.65: +2 -9 lines
Diff to previous 1.65 (colored)

sync with head.

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

Remove clause 3 and 4 from TNF licenses

Revision 1.62.20.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.62.20.2: +3 -3 lines
Diff to previous 1.62.20.2 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

sync with HEAD

Revision 1.56.2.5 / (download) - annotate - [select for diffs], Wed Feb 27 08:37:06 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.56.2.4: +3 -3 lines
Diff to previous 1.56.2.4 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

sync with head.

Revision 1.63.4.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:28 2008 UTC (4 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.63: +22 -23 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

Sync with HEAD.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Feb 15 13:30:56 2008 UTC (4 years, 3 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.64: +3 -3 lines
Diff to previous 1.64 (colored)

The buffer LOCKED flag need not be under the protection of bufcache_lock,
BUSY is enough.

Revision 1.56.2.4 / (download) - annotate - [select for diffs], Mon Jan 21 09:48:10 2008 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.56.2.3: +22 -23 lines
Diff to previous 1.56.2.3 (colored) to branchpoint 1.56 (colored)

sync with head

Revision 1.62.20.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:29 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.62.20.1: +22 -23 lines
Diff to previous 1.62.20.1 (colored) to branchpoint 1.62 (colored)

sync with HEAD

Revision 1.63.10.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:58:22 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.63: +22 -23 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

Sync with HEAD

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:10 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.63: +22 -23 lines
Diff to previous 1.63 (colored)

Merge vmlocking2 to head.

Revision 1.63.6.2 / (download) - annotate - [select for diffs], Wed Dec 19 21:27:13 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.63.6.1: +17 -19 lines
Diff to previous 1.63.6.1 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored)

Use a global lfs_lock.

Revision 1.63.6.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:03:48 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.63: +23 -22 lines
Diff to previous 1.63 (colored)

Pull the vmlocking changes into a new branch.

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

sync with HEAD

Revision 1.56.2.3 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:45 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.56.2.2: +5 -5 lines
Diff to previous 1.56.2.2 (colored) to branchpoint 1.56 (colored)

sync with head.

Revision 1.62.18.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:33 2007 UTC (4 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored) next main 1.63 (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.62.22.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:49:18 2007 UTC (4 years, 7 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored) next main 1.63 (colored)

sync with head.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Oct 8 18:01:29 2007 UTC (4 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, bouyer-xeni386
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored)

Merge ffs locking & brelse changes from the vmlocking branch.

Revision 1.62.6.3 / (download) - annotate - [select for diffs], Fri Aug 24 23:28:46 2007 UTC (4 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.62.6.2: +7 -6 lines
Diff to previous 1.62.6.2 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

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

Revision 1.62.6.2 / (download) - annotate - [select for diffs], Sun May 13 17:36:43 2007 UTC (5 years ago) by ad
Branch: vmlocking
Changes since 1.62.6.1: +5 -5 lines
Diff to previous 1.62.6.1 (colored) to branchpoint 1.62 (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.62.6.1 / (download) - annotate - [select for diffs], Tue Mar 13 17:51:22 2007 UTC (5 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.62: +18 -18 lines
Diff to previous 1.62 (colored)

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

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

sync with head.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Feb 15 15:40:54 2007 UTC (5 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, yamt-idlelwp-base8, yamt-idlelwp, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, hpcarm-cleanup, ad-audiomp-base, ad-audiomp
Branch point for: yamt-x86pmap, vmlocking, matt-armv6, jmcneill-pm
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored)

Replace some uses of lockmgr() / simplelocks.

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

sync with head

Revision 1.56.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.56: +20 -32 lines
Diff to previous 1.56 (colored)

sync with head.

Revision 1.59.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:43 2006 UTC (5 years, 11 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.59.6.1: +7 -5 lines
Diff to previous 1.59.6.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

Sync with head.

Revision 1.59.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:48 2006 UTC (6 years ago) by tron
Branch: peter-altq
Changes since 1.59: +8 -6 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

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

Revision 1.59.8.2 / (download) - annotate - [select for diffs], Wed May 24 10:59:25 2006 UTC (6 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.59.8.1: +7 -5 lines
Diff to previous 1.59.8.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

sync with head.

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Sat May 20 22:05:51 2006 UTC (6 years ago) by riz
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.51.2.1: +3 -3 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored) next main 1.52 (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.61 / (download) - annotate - [select for diffs], Sun May 14 21:32:45 2006 UTC (6 years ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, post-newlock2-merge, newlock2-nbase, newlock2-base, newlock2, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.60: +7 -5 lines
Diff to previous 1.60 (colored)

integrate kauth.

Revision 1.59.10.3 / (download) - annotate - [select for diffs], Sat May 6 23:32:58 2006 UTC (6 years ago) by christos
Branch: elad-kernelauth
Changes since 1.59.10.2: +3 -2 lines
Diff to previous 1.59.10.2 (colored) to branchpoint 1.59 (colored) next main 1.60 (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.59.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:25 2006 UTC (6 years, 1 month ago) by simonb
Branch: simonb-timecounters
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

Sync with head.

Revision 1.59.10.2 / (download) - annotate - [select for diffs], Wed Apr 19 03:54:09 2006 UTC (6 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.59.10.1: +3 -3 lines
Diff to previous 1.59.10.1 (colored) to branchpoint 1.59 (colored)

sync with head.

Revision 1.59.8.1 / (download) - annotate - [select for diffs], Tue Apr 11 11:55:58 2006 UTC (6 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

sync with head

Revision 1.60 / (download) - annotate - [select for diffs], Fri Apr 7 23:59:28 2006 UTC (6 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, elad-kernelauth-base
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (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.59.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.59: +6 -5 lines
Diff to previous 1.59 (colored)

Adapt to kernel authorization KPI.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Dec 24 20:45:10 2005 UTC (6 years, 5 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base3, 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.58: +3 -3 lines
Diff to previous 1.58 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:26 2005 UTC (6 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

merge ktrace-lwp.

Revision 1.42.2.5 / (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.42.2.4: +99 -59 lines
Diff to previous 1.42.2.4 (colored) next main 1.43 (colored)

Sync with HEAD. Here we go again...

Revision 1.57 / (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.56: +14 -28 lines
Diff to previous 1.56 (colored)

merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.56.4.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.56: +14 -28 lines
Diff to previous 1.56 (colored) next main 1.57 (colored)

adapt ufs.

Revision 1.48.6.1 / (download) - annotate - [select for diffs], Tue May 10 05:08:57 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.48: +105 -2 lines
Diff to previous 1.48 (colored) next main 1.49 (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.51.2.1 / (download) - annotate - [select for diffs], Sat May 7 11:21:29 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.51: +87 -33 lines
Diff to previous 1.51 (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.48.8.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.48: +173 -16 lines
Diff to previous 1.48 (colored) next main 1.49 (colored)

sync with -current

Revision 1.56 / (download) - annotate - [select for diffs], Tue Apr 19 20:59:05 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr, kent-audio2-base
Branch point for: yamt-vop, yamt-lazymbuf
Changes since 1.55: +10 -2 lines
Diff to previous 1.55 (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.55 / (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.54: +36 -34 lines
Diff to previous 1.54 (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.54 / (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.53: +3 -3 lines
Diff to previous 1.53 (colored)

Tabify leading whitespace

Revision 1.53 / (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.52: +41 -34 lines
Diff to previous 1.52 (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.52 / (download) - annotate - [select for diffs], Fri Apr 1 21:59:46 2005 UTC (7 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.51: +41 -4 lines
Diff to previous 1.51 (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.48.10.1 / (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.48: +116 -13 lines
Diff to previous 1.48 (colored) next main 1.49 (colored)

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

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

Sync with HEAD.

Hi Perry!

Revision 1.51 / (download) - annotate - [select for diffs], Wed Mar 2 21:16:09 2005 UTC (7 years, 2 months ago) by perseant
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.50: +4 -6 lines
Diff to previous 1.50 (colored)

Put the ISSPACE() check where it belongs.  This allows rewriting a file
on a full filesystem while still returning ENOSPC on an attempt to allocate
new blocks.

Revision 1.50 / (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.49: +13 -13 lines
Diff to previous 1.49 (colored)

nuke trailing whitespace

Revision 1.49 / (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.48: +107 -2 lines
Diff to previous 1.48 (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.42.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:39:14 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42.2.2: +2 -2 lines
Diff to previous 1.42.2.2 (colored)

Fix the sync with head I botched.

Revision 1.42.2.2 / (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.42.2.1: +0 -0 lines
Diff to previous 1.42.2.1 (colored)

Sync with HEAD.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:56:57 2004 UTC (7 years, 9 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.42: +32 -38 lines
Diff to previous 1.42 (colored)

Sync with HEAD

Revision 1.48 / (download) - annotate - [select for diffs], Sun Jan 25 18:06:49 2004 UTC (8 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, 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, matt-timespec, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, netbsd-2, kent-audio2
Changes since 1.47: +4 -4 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Tue Dec 30 12:33:24 2003 UTC (8 years, 4 months ago) by pk
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Oct 29 01:25:04 2003 UTC (8 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.45: +29 -28 lines
Diff to previous 1.45 (colored)

Adjust to remove bogus initializer.

Revision 1.45 / (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.44: +3 -3 lines
Diff to previous 1.44 (colored)

Fix uninitialized variable warnings.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Sep 4 12:28:53 2003 UTC (8 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.43: +3 -6 lines
Diff to previous 1.43 (colored)

don't call LFS_DEBUG_COUNTLOCKED after bread().
lfs_countlocked doesn't count buffers that isn't on the freelist.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:34 2003 UTC (8 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.42: +3 -7 lines
Diff to previous 1.42 (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.42 / (download) - annotate - [select for diffs], Sun May 18 12:59:05 2003 UTC (9 years ago) by yamt
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

make is_sequential a callback in order to achieve better lfs write clustering.

since lfs always rewrite blocks into the new segment,
current on-disk place of the block doesn't affect to write clustering.

ok'ed by Konrad Schroder.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Apr 29 07:44:04 2003 UTC (9 years ago) by yamt
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)

add an assertion.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Apr 2 10:39:40 2003 UTC (9 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.39: +14 -13 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Sat Mar 15 06:58:50 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.38: +2 -4 lines
Diff to previous 1.38 (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.38 / (download) - annotate - [select for diffs], Fri Feb 28 07:36:32 2003 UTC (9 years, 2 months ago) by perseant
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

Fix a clrbuf() on an uninitialized pointer.

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

Tabify, and fix some comment alignment problems.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Feb 17 23:48:16 2003 UTC (9 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.35: +71 -49 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Fri Jan 24 21:55:26 2003 UTC (9 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.34: +14 -10 lines
Diff to previous 1.34 (colored)

Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.

Revision 1.27.2.8 / (download) - annotate - [select for diffs], Wed Dec 11 16:16:59 2002 UTC (9 years, 5 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.27.2.7: +5 -3 lines
Diff to previous 1.27.2.7 (colored) to branchpoint 1.27 (colored) next main 1.28 (colored)

Sync with HEAD.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Dec 11 13:34:14 2002 UTC (9 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.33: +5 -3 lines
Diff to previous 1.33 (colored)

take care of B_CLRBUF in lfs_balloc.
otherwise you'll see uninitialized blocks.

Revision 1.28.4.4 / (download) - annotate - [select for diffs], Fri Sep 6 08:50:15 2002 UTC (9 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.28.4.3: +15 -17 lines
Diff to previous 1.28.4.3 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

sync kqueue branch with HEAD

Revision 1.27.2.7 / (download) - annotate - [select for diffs], Thu Aug 1 02:47:03 2002 UTC (9 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.27.2.6: +15 -17 lines
Diff to previous 1.27.2.6 (colored) to branchpoint 1.27 (colored)

Catch up to -current.

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Mon Jul 15 10:37:24 2002 UTC (9 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.32: +15 -17 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

catch up with -current.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jul 6 01:30:12 2002 UTC (9 years, 10 months ago) by perseant
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gehenna-devsw-base
Changes since 1.32: +15 -17 lines
Diff to previous 1.32 (colored)

Deal with fragment size changes better.  For each fragment that can
exist on an on-disk inode, we keep a record of its size in struct inode,
which is updated when we write the block to disk.  The cleaner routines
thus have ready access to what size is the correct size for this block,
on disk.

Fixed a related bug: if a file with fragments is being cleaned
(fragments being cleaned) at the same time it is being extended beyond
NDADDR blocks, we could write a bogus FINFO record that has a frag in the
middle; when it was cleaned this would give back bogus file data.  Don't
write the indirect blocks in this case, since there is no need.

lfs_fragextend and lfs_truncate no longer require the seglock, but instead
take a shared lock, which the seglock locks exclusively.

Revision 1.28.4.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:52:10 2002 UTC (9 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.28.4.2: +7 -3 lines
Diff to previous 1.28.4.2 (colored) to branchpoint 1.28 (colored)

catch up with -current on kqueue branch

Revision 1.27.2.6 / (download) - annotate - [select for diffs], Thu Jun 20 03:50:28 2002 UTC (9 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.27.2.5: +7 -3 lines
Diff to previous 1.27.2.5 (colored) to branchpoint 1.27 (colored)

Catch up to -current.

Revision 1.32 / (download) - annotate - [select for diffs], Tue May 14 20:03:53 2002 UTC (10 years ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.31: +7 -3 lines
Diff to previous 1.31 (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.28.4.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:05:10 2002 UTC (10 years, 4 months ago) by thorpej
Branch: kqueue
Changes since 1.28.4.1: +7 -4 lines
Diff to previous 1.28.4.1 (colored) to branchpoint 1.28 (colored)

Sync kqueue branch with -current.

Revision 1.27.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:51 2002 UTC (10 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.27.2.4: +5 -5 lines
Diff to previous 1.27.2.4 (colored) to branchpoint 1.27 (colored)

Catch up to -current.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Nov 23 21:44:26 2001 UTC (10 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, ifpoll, eeh-devprop-base, eeh-devprop
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored)

add spaces for KNF.  confirmed to produce identical objects.

Revision 1.27.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 19:18:58 2001 UTC (10 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.27.2.3: +4 -1 lines
Diff to previous 1.27.2.3 (colored) to branchpoint 1.27 (colored)

Catch up to -current.

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

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

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

add RCSID

Revision 1.27.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:13:23 2001 UTC (10 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.27.2.2: +16 -20 lines
Diff to previous 1.27.2.2 (colored) to branchpoint 1.27 (colored)

Catch up with -current.

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

update to -current

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jul 13 20:30:23 2001 UTC (10 years, 10 months ago) by perseant
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.28: +16 -20 lines
Diff to previous 1.28 (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.28.2.2 / (download) - annotate - [select for diffs], Mon Jul 2 17:48:18 2001 UTC (10 years, 10 months ago) by perseant
Branch: perseant-lfsv2
Changes since 1.28.2.1: +15 -13 lines
Diff to previous 1.28.2.1 (colored) to branchpoint 1.28 (colored) next main 1.29 (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.28.2.1 / (download) - annotate - [select for diffs], Fri Jun 29 03:56:39 2001 UTC (10 years, 10 months ago) by perseant
Branch: perseant-lfsv2
Changes since 1.28: +4 -10 lines
Diff to previous 1.28 (colored)

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

Revision 1.27.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:10:09 2001 UTC (10 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.27.2.1: +2 -2 lines
Diff to previous 1.27.2.1 (colored) to branchpoint 1.27 (colored)

Catch up to -current.

Revision 1.28 / (download) - annotate - [select for diffs], Wed May 30 11:57:18 2001 UTC (10 years, 11 months ago) by mrg
Branch: MAIN
CVS Tags: perseant-lfsv2-base
Branch point for: perseant-lfsv2, kqueue
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

use _KERNEL_OPT

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

Initial commit of scheduler activations and lightweight process support.

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Sat Feb 3 21:50:51 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.18.2.1: +31 -5 lines
Diff to previous 1.18.2.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

Pull up revisions 1.26-1.27 (requested by perseant):
  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.13.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:06:49 2000 UTC (11 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.13.2.1: +31 -5 lines
Diff to previous 1.13.2.1 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

Sync with HEAD.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Nov 21 00:00:31 2000 UTC (11 years, 6 months ago) by perseant
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

More locked_queue_* and lfs_avail accounting fixes from Jesse Off
<joff@gci-net.com>.  Remove a specious btodb() in lfs_fragextend, and
count blocks shrunk or removed by VOP_TRUNCATE in lfs_avail.

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:11:48 2000 UTC (11 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.13: +186 -111 lines
Diff to previous 1.13 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.26 / (download) - annotate - [select for diffs], Fri Nov 17 19:14:41 2000 UTC (11 years, 6 months ago) by perseant
Branch: MAIN
Changes since 1.25: +31 -5 lines
Diff to previous 1.25 (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.18.2.1 / (download) - annotate - [select for diffs], Thu Sep 14 18:50:17 2000 UTC (11 years, 8 months ago) by perseant
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.18: +123 -117 lines
Diff to previous 1.18 (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.25 / (download) - annotate - [select for diffs], Sat Sep 9 04:49:54 2000 UTC (11 years, 8 months ago) by perseant
Branch: MAIN
Changes since 1.24: +5 -3 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Tue Jul 4 22:30:37 2000 UTC (11 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.23: +1 -7 lines
Diff to previous 1.23 (colored)

Fix errors observed while trying to fill the filesystem with yesterday's
fixes:

- Write copies of bfree and avail in the CLEANERINFO block, so the
  cleaner doesn't have to guess which superblock has the current
  information (if indeed any do).

- Tighten up accounting of lfs_avail (more needs to be done).

- When cleansing indirect blocks of UNWRITTEN, make sure not to mark
  them clean, since they'll need to be rewritten later.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jul 3 20:12:42 2000 UTC (11 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.22: +2 -3 lines
Diff to previous 1.22 (colored)

Fix i_ffs_blocks in fragment extension case where fragment has not yet
been written to disk.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 3 08:20:58 2000 UTC (11 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

i_lfs_effnblks fixes.  Put debugging printfs under #ifdef DEBUG_LFS.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jul 3 01:45:48 2000 UTC (11 years, 10 months ago) by perseant
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Allow the number of free segments reserved for the cleaner to be
parametrized in the filesystem, defaulting to MIN_FREE_SEGS = 2 but set
to something more reasonable at newfs_lfs time.

Note the number of blocks that have been scheduled for writing but which
are not yet on disk in an inode extension, i_lfs_effnblks.  Move
i_ffs_effnlink out of the ffs extension and onto the main inode, since
it's used all over the shared code and the lfs extension would clobber
it.

At inode write time, indirect blocks and inode-held blocks of inodes
that have i_lfs_effnblks != i_ffs_blocks are cleansed of UNWRITTEN disk
addresses, so that these never make it to disk.

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

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

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jun 27 20:57:12 2000 UTC (11 years, 11 months ago) by perseant
Branch: MAIN
Changes since 1.18: +117 -107 lines
Diff to previous 1.18 (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.16.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:36 2000 UTC (11 years, 11 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.16: +22 -21 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jun 6 20:19:15 2000 UTC (11 years, 11 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.17: +17 -18 lines
Diff to previous 1.17 (colored)

Protect inode free list with seglock, instead of separate lock, so that
the head of the inode free list (on the superblock) always matches the
rest of the free list (in the ifile).

Protect lfs_fragextend with seglock, to prevent the segment byte count
fudging from making its way to disk.

Don't try to inactivate dirop vnodes that are still in the middle of
their dirop (may address PR#10285).

Revision 1.17 / (download) - annotate - [select for diffs], Tue May 30 04:08:41 2000 UTC (11 years, 11 months ago) by perseant
Branch: MAIN
Changes since 1.16: +6 -4 lines
Diff to previous 1.16 (colored)

Don't try to "correct" accounting for fragments being extended but which
have never been written to disk.

Revision 1.16 / (download) - annotate - [select for diffs], Fri May 5 20:59:21 2000 UTC (12 years ago) by perseant
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.15: +64 -14 lines
Diff to previous 1.15 (colored)

Change the way LFS does block accounting, from trying to infer from the
buffer cache flags, to marking the inode and/or indirect blocks with a
special disk address UNWRITTEN==-2 when a block is accounted for.  (This
address is never written to disk, but only used in-core.  This is essentially
the same method of block accounting as on the UBC branch, where the buffer
headers don't exist.)  Make sure that truncation is handled properly,
especially in the case of holey files.

Fixes PR#9994.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Apr 23 21:10:26 2000 UTC (12 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.14: +24 -15 lines
Diff to previous 1.14 (colored)

Fix problems outlined in PR#9926:
	- lfs_truncate extends the file if called with length > i_ffs_size;
    - lfs_truncate errors out if called with length < 0;
	- lfs_balloc block accounting corrected for the case of blocks read
	  into the cache before they exist on disk;
	- mp->mnt_stat.f_iosize is initialized in lfs_mountfs.

Revision 1.13.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:39 1999 UTC (12 years, 5 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.13: +23 -10 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Pull up to last week's -current.

Revision 1.12.6.1 / (download) - annotate - [select for diffs], Tue Nov 30 13:36:22 1999 UTC (12 years, 5 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.12: +14 -1 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:14 1999 UTC (12 years, 6 months ago) by fvdl
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.13: +23 -10 lines
Diff to previous 1.13 (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.13.4.1 / (download) - annotate - [select for diffs], Tue Oct 19 12:50:41 1999 UTC (12 years, 7 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.13: +23 -10 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

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

Revision 1.12.4.3 / (download) - annotate - [select for diffs], Tue Aug 31 21:03:45 1999 UTC (12 years, 8 months ago) by perseant
Branch: chs-ubc2
Changes since 1.12.4.2: +127 -25 lines
Diff to previous 1.12.4.2 (colored) to branchpoint 1.12 (colored) next main 1.13 (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.12.4.2 / (download) - annotate - [select for diffs], Sun Jul 4 01:54:05 1999 UTC (12 years, 10 months ago) by chs
Branch: chs-ubc2
Changes since 1.12.4.1: +15 -7 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored)

a couple steps towards supporting UBC.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Fri Jun 25 20:50:33 1999 UTC (12 years, 11 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Changes since 1.12: +14 -1 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

pullup 1.12->1.13 (perseant)

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

Sync w/ -current.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 15 22:25:41 1999 UTC (12 years, 11 months ago) by perseant
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.12: +14 -1 lines
Diff to previous 1.12 (colored)

Minor changes to the segment live bytes calculation.  In particular, fixed
a bug in fragment extension that could run the count negative.  Also, don't
overcount for inodes, and don't count segment summaries.  Thus, for empty
segments the live bytes count should now be exactly zero.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:31 1999 UTC (13 years, 2 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.11: +3 -7 lines
Diff to previous 1.11 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.11 / (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.10: +89 -24 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Mon Nov 9 01:18:34 1998 UTC (13 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

GC the B_CACHE bit.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jun 9 07:46:33 1998 UTC (13 years, 11 months ago) by scottr
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t, chs-ubc-base, chs-ubc
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored)

Protect various config(8)-generated files from inclusion while
building LKMs.  Fixes PR 5557.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jun 8 04:27:51 1998 UTC (13 years, 11 months ago) by scottr
Branch: MAIN
Changes since 1.7: +4 -1 lines
Diff to previous 1.7 (colored)

Use the newly-defined opt_quota.h.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Mar 3 09:02:51 1998 UTC (14 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Don't cast the quad_t file size to u_long, this can cause overflows.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Mar 3 01:49:21 1998 UTC (14 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.5: +5 -1 lines
Diff to previous 1.5 (colored)

Make this compile again with UVM

Revision 1.5 / (download) - annotate - [select for diffs], Sun Mar 1 02:23:24 1998 UTC (14 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.4: +129 -31 lines
Diff to previous 1.4 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:14:09 1998 UTC (14 years, 2 months ago) by fvdl
Branch: netbsd, CSRG
CVS Tags: lite-2
Changes since 1.1.1.1: +120 -29 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:47 1998 UTC (14 years, 2 months ago) by fvdl
Branch: netbsd, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 11 10:09:55 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.3: +3 -3 lines
Diff to previous 1.3 (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.3 / (download) - annotate - [select for diffs], Fri Feb 9 22:28:48 1996 UTC (16 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-setroot, netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.2: +5 -2 lines
Diff to previous 1.2 (colored)

lfs prototypes

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 29 06:46:49 1994 UTC (17 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, 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:26 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>