The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.382: download - view: text, markup, annotated - select for diffs
Sat Mar 19 13:53:33 2022 UTC (2 years, 8 months ago) by hannken
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Diff to: previous 1.381: preferred, colored
Changes since revision 1.381: +2 -3 lines
Remove now unused VV_LOCKSWORK, all file systems support locking.

Remove unused predicates vn_locked() and vn_anylocked().

Welcome to 9.99.95

Revision 1.380.6.1: download - view: text, markup, annotated - select for diffs
Sun Aug 1 22:42:45 2021 UTC (3 years, 4 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.380: preferred, colored; next MAIN 1.381: preferred, colored
Changes since revision 1.380: +3 -3 lines
Sync with HEAD.

Revision 1.381: download - view: text, markup, annotated - select for diffs
Sat Jul 31 20:29:37 2021 UTC (3 years, 4 months ago) by andvar
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Diff to: previous 1.380: preferred, colored
Changes since revision 1.380: +3 -3 lines
s/threshhold/threshold

Revision 1.380: download - view: text, markup, annotated - select for diffs
Sat Sep 5 16:30:13 2020 UTC (4 years, 3 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Diff to: previous 1.379: preferred, colored
Changes since revision 1.379: +8 -5 lines
Round of uvm.h cleanup.

The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@

Revision 1.365.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 17 10:30:22 2020 UTC (4 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Diff to: previous 1.365: preferred, colored; next MAIN 1.366: preferred, colored
Changes since revision 1.365: +89 -74 lines
Pull up following revision(s) (requested by riastradh in ticket #1050):

	sys/ufs/lfs/lfs_subr.c: revision 1.101
	sys/ufs/lfs/lfs_subr.c: revision 1.102
	sys/ufs/lfs/lfs_inode.c: revision 1.158
	sys/ufs/lfs/lfs_inode.h: revision 1.25
	sys/ufs/lfs/lfs_balloc.c: revision 1.95
	sys/ufs/lfs/lfs_pages.c: revision 1.21
	sys/ufs/lfs/lfs_vnops.c: revision 1.330
	sys/ufs/lfs/lfs_alloc.c: revision 1.140 (patch)
	sys/ufs/lfs/lfs_alloc.c: revision 1.141 (patch)
	lib/libp2k/p2k.c: revision 1.72
	sys/ufs/lfs/lfs.h: revision 1.205
	sys/ufs/lfs/lfs.h: revision 1.206
	sys/ufs/lfs/lfs_segment.c: revision 1.284
	sys/ufs/lfs/lfs.h: revision 1.207
	sys/ufs/lfs/lfs_segment.c: revision 1.285
	sys/ufs/lfs/lfs_debug.c: revision 1.55
	sys/ufs/lfs/lfs_rename.c: revision 1.23
	usr.sbin/dumplfs/dumplfs.c: revision 1.65
	sys/ufs/lfs/lfs_vfsops.c: revision 1.371
	sys/arch/i386/stand/efiboot/bootx64/Makefile: revision 1.3
	sys/ufs/lfs/lfs_vfsops.c: revision 1.372
	sys/ufs/lfs/lfs_vfsops.c: revision 1.373
	sbin/fsck_lfs/pass1.c: revision 1.46
	sys/ufs/lfs/lfs_vnops.c: revision 1.326
	sys/ufs/lfs/lfs_vnops.c: revision 1.327
	sys/ufs/lfs/lfs_vfsops.c: revision 1.375 (patch)
	sys/ufs/lfs/lfs_vnops.c: revision 1.328
	sys/ufs/lfs/lfs_subr.c: revision 1.98
	sys/ufs/lfs/lfs_extern.h: revision 1.116
	sys/ufs/lfs/lfs_vnops.c: revision 1.329
	sys/ufs/lfs/lfs_subr.c: revision 1.99
	sys/ufs/lfs/lfs_extern.h: revision 1.117
	sys/ufs/lfs/lfs_accessors.h: revision 1.49
	sys/ufs/lfs/lfs_extern.h: revision 1.118
	sys/rump/fs/lib/liblfs/Makefile: revision 1.15
	sys/ufs/lfs/lfs_bio.c: revision 1.146 (patch)
	sys/ufs/lfs/lfs_bio.c: revision 1.147
	sys/ufs/lfs/lfs_subr.c: revision 1.100

Fix kassert in lfs by initializing vp first.

Use a marker node to iterate lfs_dchainhd / i_lfs_dchain.

I believe elements can be removed while the lock is dropped,
including the next node we're hanging on to.

Just use VOP_BWRITE for lfs_bwrite_log.
Hope this doesn't cause trouble with vfs_suspend.

Teach lfs to transition ro<->rw.

Prevent new dirops while we issue lfs_flush_dirops.

lfs_flush_dirops assumes (by KASSERT((ip->i_state & IN_ADIROP) == 0))
that vnodes on the dchain will not become involved in active dirops
even while holding no other locks (lfs_lock, v_interlock), so we must
set lfs_writer here.  All other callers already set lfs_writer.

We set fs->lfs_writer++ without explicitly doing lfs_writer_enter
because
(a) we already waited for the dirops to drain, and
(b) we hold lfs_lock and cannot drop it before setting lfs_writer.

Assert lfs_writer where I think we can now prove it.

Serialize access to the splay tree with lfs_lock.

Change some cheap KDASSERT into KASSERT.

Take a reference and fix assertions in lfs_flush_dirops.
Fixes panic:
KASSERT((ip->i_state & IN_ADIROP) == 0) at lfs_vnops.c:1670
lfs_flush_dirops
lfs_check
lfs_setattr
VOP_SETATTR
change_mode
sys_fchmod
syscall

This assertion -- and the assertion that vp->v_uflag has VU_DIROP set
-- is valid only until we release lfs_lock, because we may race with
lfs_unmark_dirop which will remove the nodes and change the flags.

Further, vp itself is valid only as long as it is referenced, which it
is as long as it's on the dchain, but lfs_unmark_dirop drops the
dchain's reference.

Don't lfs_writer_enter while holding v_interlock.

There's no need to lfs_writer_enter at all here, as far as I can see.
lfs_flush_fs will do it for us.

Break deadlock in PR kern/52301.

The lock order is lfs_writer -> lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -> lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):
(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.
(b) The test for fs->lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:
(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.
(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs->lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.

Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs.

Fixes reloading lfs.kmod.

In lfs_update, hold lfs_writer around lfs_vflush.

Otherwise, we might do
lfs_vflush
-> lfs_seglock
-> lfs_segwait(SEGM_CKP)
   -> lfs_writer_enter
which is the reverse of the lfs_writer -> lfs_seglock ordering.

Call lfs_orphan in lfs_rename while we're still in the dirop.
lfs_writer_enter can't fail; keep it simple and don't pretend it can.

Assert that mtsleep can't fail either -- it doesn't catch signals and
there's no timeout.

Teach LFS_ORPHAN_NEXTFREE about lfs64.

Dust off the orphan detection code and try to make it work.

Fix !DIAGNOSTIC compile

Fix userland references to LFS_ORPHAN_NEXTFREE.

Forgot to grep for these or do a full distribution build, oops!

Fix missing <sys/evcnt.h> by removing the evcnts instead.

Just wanted to confirm that a race might happen, and indeed it did.
These serve little diagnostic value otherwise.

OR into bp->b_cflags; don't overwrite.

CTASSERT lfs on-disk structure sizes.

Avoid misaligned access to lfs64 on-disk records in memory.
lfs64 directory entries are only 32-bit aligned in order to conserve
space in directory blocks, and we had a hack to stuff a 64-bit inode
in them.  This replaces the hack by __aligned(4) __packed, and goes
further:

1. It's not clear that all the other lfs64 data structures are 64-bit
   aligned on disk to begin with.  We can go through these later and
   upgrade them from
        struct foo64 {
                ...
        } __aligned(4) __packed;
        union foo {
                struct foo64 f64;
                ...
        };
   to
        struct foo64 {
                ...
        };
        union foo {
                struct foo64 f64 __aligned(8);
                ...
        } __aligned(4) __packed;
   if we really want to take advantage of 64-bit memory accesses.
   However, the __aligned(4) __packed must remain on the union
   because:
2. We access even the lfs32 data structures via a union that has
   lfs64 members, and it turns out that compilers will assume access
   through a union with 64-bit aligned members implies the whole
   union has 64-bit alignment, even if we're only accessing a 32-bit
   aligned member.

Fix clang build after packed lfs64 accessor change.

Suppress spurious address-of-packed error in rump lfs too.

Revision 1.379: download - view: text, markup, annotated - select for diffs
Tue Aug 4 03:00:47 2020 UTC (4 years, 4 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.378: preferred, colored
Changes since revision 1.378: +3 -2 lines
Mark lfs vnodes with VV_LOCKSWORK, same as ffs.

Revision 1.362.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:09:04 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.362.2.1: preferred, colored; branchpoint 1.362: preferred, colored; next MAIN 1.363: preferred, colored
Changes since revision 1.362.2.1: +105 -94 lines
Merge changes from current as of 20200406

Revision 1.378: download - view: text, markup, annotated - select for diffs
Sat Apr 4 20:49:31 2020 UTC (4 years, 8 months ago) by ad
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Diff to: previous 1.377: preferred, colored
Changes since revision 1.377: +3 -2 lines
Merge the remaining changes from the ad-namecache branch, affecting namei()
and getcwd():

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

Possible future enhancements:

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

Revision 1.377: download - view: text, markup, annotated - select for diffs
Mon Mar 16 21:20:13 2020 UTC (4 years, 8 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.376: preferred, colored
Changes since revision 1.376: +3 -8 lines
Use the module subsystem's ability to process SYSCTL_SETUP() entries to
automate installation of sysctl nodes.

Note that there are still a number of device and pseudo-device modules
that create entries tied to individual device units, rather than to the
module itself.  These are not changed.

Revision 1.376: download - view: text, markup, annotated - select for diffs
Sat Mar 14 20:23:51 2020 UTC (4 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.375: preferred, colored
Changes since revision 1.375: +2 -3 lines
Make page waits (WANTED vs BUSY) interlocked by pg->interlock.  Gets RW
locks out of the equation for sleep/wakeup, and allows observing+waiting
for busy pages when holding only a read lock.  Proposed on tech-kern.

Revision 1.375: download - view: text, markup, annotated - select for diffs
Sat Mar 14 15:35:35 2020 UTC (4 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.374: preferred, colored
Changes since revision 1.374: +3 -3 lines
OR into bp->b_cflags; don't overwrite.

Revision 1.367.2.3: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:11 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.367.2.2: preferred, colored; branchpoint 1.367: preferred, colored; next MAIN 1.368: preferred, colored
Changes since revision 1.367.2.2: +91 -76 lines
Sync with head.

Revision 1.374: download - view: text, markup, annotated - select for diffs
Sun Feb 23 15:46:42 2020 UTC (4 years, 9 months ago) by ad
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Diff to: previous 1.373: preferred, colored
Changes since revision 1.373: +4 -4 lines
UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.

Revision 1.373: download - view: text, markup, annotated - select for diffs
Sun Feb 23 08:49:46 2020 UTC (4 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.372: preferred, colored
Changes since revision 1.372: +9 -4 lines
Dust off the orphan detection code and try to make it work.

Revision 1.372: download - view: text, markup, annotated - select for diffs
Sun Feb 23 08:40:49 2020 UTC (4 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.371: preferred, colored
Changes since revision 1.371: +4 -9 lines
Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs.

Fixes reloading lfs.kmod.

Revision 1.371: download - view: text, markup, annotated - select for diffs
Sun Feb 23 08:39:18 2020 UTC (4 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.370: preferred, colored
Changes since revision 1.370: +79 -64 lines
Teach lfs to transition ro<->rw.

Revision 1.370: download - view: text, markup, annotated - select for diffs
Tue Feb 18 20:23:17 2020 UTC (4 years, 9 months ago) by chs
Branches: MAIN
Diff to: previous 1.369: preferred, colored
Changes since revision 1.369: +3 -3 lines
remove the aiodoned thread.  I originally added this to provide a thread context
for doing page cache iodone work, but since then biodone() has changed to
hand off all iodone work to a softint thread, so we no longer need the
special-purpose aiodoned thread.

Revision 1.367.2.2: download - view: text, markup, annotated - select for diffs
Sun Jan 19 21:21:55 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.367.2.1: preferred, colored; branchpoint 1.367: preferred, colored
Changes since revision 1.367.2.1: +3 -2 lines
Set IMNT_SHRLOOKUP and use it for the in-cache case.  Need to check what
more can be done with tmpfs though, it can probably do the whole lookup.

Revision 1.367.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:37 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.367: preferred, colored
Changes since revision 1.367: +9 -8 lines
Sync with head.

Revision 1.369: download - view: text, markup, annotated - select for diffs
Fri Jan 17 20:08:10 2020 UTC (4 years, 10 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1
Diff to: previous 1.368: preferred, colored
Changes since revision 1.368: +7 -7 lines
VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode.  Matches
FreeBSD.

Revision 1.368: download - view: text, markup, annotated - select for diffs
Wed Jan 15 17:55:44 2020 UTC (4 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.367: preferred, colored
Changes since revision 1.367: +4 -3 lines
Merge from yamt-pagecache (after much testing):

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

Revision 1.367: download - view: text, markup, annotated - select for diffs
Tue Dec 31 22:42:51 2019 UTC (4 years, 11 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.366: preferred, colored
Changes since revision 1.366: +6 -2 lines
- Add and use wrapper functions that take and acquire page interlocks, and pairs
  of page interlocks.  Require that the page interlock be held over calls to
  uvm_pageactivate(), uvm_pagewire() and similar.

- Solve the concurrency problem with page replacement state.  Rather than
  updating the global state synchronously, set an intended state on
  individual pages (active, inactive, enqueued, dequeued) while holding the
  page interlock.  After the interlock is released put the pages on a 128
  entry per-CPU queue for their state changes to be made real in batch.
  This results in in a ~400 fold decrease in contention on my test system.
  Proposed on tech-kern but modified to use the page interlock rather than
  atomics to synchronise as it's much easier to maintain that way, and
  cheaper.

Revision 1.366: download - view: text, markup, annotated - select for diffs
Fri Dec 13 20:10:22 2019 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.365: preferred, colored
Changes since revision 1.365: +2 -6 lines
Break the global uvm_pageqlock into a per-page identity lock and a private
lock for use of the pagedaemon policy code.  Discussed on tech-kern.

PR kern/54209: NetBSD 8 large memory performance extremely low
PR kern/54210: NetBSD-8 processes presumably not exiting
PR kern/54727: writing a large file causes unreasonable system behaviour

Revision 1.362.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:58 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.362: preferred, colored
Changes since revision 1.362: +4 -5 lines
Sync with HEAD

Revision 1.365: download - view: text, markup, annotated - select for diffs
Tue May 28 08:59:35 2019 UTC (5 years, 6 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.364: preferred, colored
Changes since revision 1.364: +3 -3 lines
s/recieve/receive/

Revision 1.361.2.3: download - view: text, markup, annotated - select for diffs
Fri Jan 18 08:50:59 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.361.2.2: preferred, colored; branchpoint 1.361: preferred, colored; next MAIN 1.362: preferred, colored
Changes since revision 1.361.2.2: +3 -3 lines
Synch with HEAD

Revision 1.364: download - view: text, markup, annotated - select for diffs
Tue Jan 1 10:06:55 2019 UTC (5 years, 11 months ago) by hannken
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, isaki-audio2-base, isaki-audio2
Diff to: previous 1.363: preferred, colored
Changes since revision 1.363: +3 -3 lines
Add "void *extra" argument to vcache_new() so a file system may
pass more information about the file to create.

Welcome to 8.99.30

Revision 1.361.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:02:08 2018 UTC (5 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.361.2.1: preferred, colored; branchpoint 1.361: preferred, colored
Changes since revision 1.361.2.1: +2 -3 lines
Sync with HEAD, resolve a few conflicts

Revision 1.363: download - view: text, markup, annotated - select for diffs
Mon Dec 10 14:46:25 2018 UTC (6 years ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-1226
Diff to: previous 1.362: preferred, colored
Changes since revision 1.362: +2 -3 lines
Remove unused mbuf.h includes.

Revision 1.361.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:26:08 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.361: preferred, colored
Changes since revision 1.361: +3 -2 lines
Sync with HEAD

Revision 1.362: download - view: text, markup, annotated - select for diffs
Mon May 28 21:04:38 2018 UTC (6 years, 6 months ago) by chs
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Diff to: previous 1.361: preferred, colored
Changes since revision 1.361: +3 -2 lines
add a genfs method to allow a file system to limit the range of pages
that are given to a single GOP_WRITE() call.  needed by ZFS.

Revision 1.296.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:22 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.296.2.3: preferred, colored; branchpoint 1.296: preferred, colored; next MAIN 1.297: preferred, colored
Changes since revision 1.296.2.3: +626 -400 lines
update from HEAD

Revision 1.359.4.2: download - view: text, markup, annotated - select for diffs
Thu Nov 2 21:29:52 2017 UTC (7 years, 1 month ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.359.4.1: preferred, colored; branchpoint 1.359: preferred, colored; next MAIN 1.360: preferred, colored
Changes since revision 1.359.4.1: +10 -10 lines
Pull up following revision(s) (requested by pgoyette in ticket #335):
	share/man/man9/kernhist.9: 1.5-1.8
	sys/arch/acorn26/acorn26/pmap.c: 1.39
	sys/arch/arm/arm32/fault.c: 1.105 via patch
	sys/arch/arm/arm32/pmap.c: 1.350, 1.359
	sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7
	sys/arch/arm/omap/if_cpsw.c: 1.20
	sys/arch/arm/omap/tiotg.c: 1.7
	sys/arch/evbarm/conf/RPI2_INSTALL: 1.3
	sys/dev/ic/sl811hs.c: 1.98
	sys/dev/usb/ehci.c: 1.256
	sys/dev/usb/if_axe.c: 1.83
	sys/dev/usb/motg.c: 1.18
	sys/dev/usb/ohci.c: 1.274
	sys/dev/usb/ucom.c: 1.119
	sys/dev/usb/uhci.c: 1.277
	sys/dev/usb/uhub.c: 1.137
	sys/dev/usb/umass.c: 1.160-1.162
	sys/dev/usb/umass_quirks.c: 1.100
	sys/dev/usb/umass_scsipi.c: 1.55
	sys/dev/usb/usb.c: 1.168
	sys/dev/usb/usb_mem.c: 1.70
	sys/dev/usb/usb_subr.c: 1.221
	sys/dev/usb/usbdi.c: 1.175
	sys/dev/usb/usbdi_util.c: 1.67-1.70
	sys/dev/usb/usbroothub.c: 1.3
	sys/dev/usb/xhci.c: 1.75
	sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34
	sys/kern/kern_history.c: 1.15
	sys/kern/kern_xxx.c: 1.74
	sys/kern/vfs_bio.c: 1.275-1.276
	sys/miscfs/genfs/genfs_io.c: 1.71
	sys/sys/kernhist.h: 1.21
	sys/ufs/ffs/ffs_balloc.c: 1.63
	sys/ufs/lfs/lfs_vfsops.c: 1.361
	sys/ufs/lfs/ulfs_inode.c: 1.21
	sys/ufs/lfs/ulfs_vnops.c: 1.52
	sys/ufs/ufs/ufs_inode.c: 1.102
	sys/ufs/ufs/ufs_vnops.c: 1.239
	sys/uvm/pmap/pmap.c: 1.37-1.39
	sys/uvm/pmap/pmap_tlb.c: 1.22
	sys/uvm/uvm_amap.c: 1.108
	sys/uvm/uvm_anon.c: 1.64
	sys/uvm/uvm_aobj.c: 1.126
	sys/uvm/uvm_bio.c: 1.91
	sys/uvm/uvm_device.c: 1.66
	sys/uvm/uvm_fault.c: 1.201
	sys/uvm/uvm_km.c: 1.144
	sys/uvm/uvm_loan.c: 1.85
	sys/uvm/uvm_map.c: 1.353
	sys/uvm/uvm_page.c: 1.194
	sys/uvm/uvm_pager.c: 1.111
	sys/uvm/uvm_pdaemon.c: 1.109
	sys/uvm/uvm_swap.c: 1.175
	sys/uvm/uvm_vnode.c: 1.103
	usr.bin/vmstat/vmstat.c: 1.219
Reorder to test for null before null deref in debug code
--
Reorder to test for null before null deref in debug code
--
KNF
--
No need for '\n' in UVMHIST_LOG
--
normalise a BIOHIST log message
--
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in
   the kernel and in the structures used for exporting the history data
   to userland via sysctl(9).  This avoids problems on some architectures
   where passing a 64-bit (or larger) value to printf(3) can cause it to
   process the value as multiple arguments.  (This can be particularly
   problematic when printf()'s format string is not a literal, since in
   that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to
   include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings
   updated.  Each format specifier now includes an explicit length
   modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings
   updated to replace uses of "%p" with "%#jx", and the pointer
   arguments are now cast to (uintptr_t) before being subsequently cast
   to (uintmax_t).  This is needed to avoid compiler warnings about
   casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or
   "%c" format strings replaced with numeric formats; several instances
   of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the
   history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with
   the -u option does not exist (previously, this condition was silently
   ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the
   data exported via sysctl(9) and exits if they do not match the values
   with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional
   requirements imposed on the format strings, along with several other
   minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example,
     uint64_t) for the history arguments.  But that would require another
     "rototill" of all the users in the future when we add support for an
     architecture that supports a larger size.  Also, the printf(3)
format
     specifiers for explicitly-sized values, such as "%"PRIu64, are much
     more verbose (and less aesthetically appealing, IMHO) than simply
     using "%ju".
[2] I've tried very hard to find "all [the] existing users of
kernhist(9)"
     but it is possible that I've missed some of them.  I would be glad
to
     update any stragglers that anyone identifies.
--
For some reason this single kernel seems to have outgrown its declared
size as a result of the kernhist(9) changes.  Bump the size.
XXX The amount of increase may be excessive - anyone with more detailed
XXX knowledge please feel free to further adjust the value
appropriately.
--
Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit
--
And yet another one.  :(
--
Use correct mark-up for NetBSD version.
--
More improvements in grammar and readability.
--
Remove a stray '"' (obvious typo) and add a couple of casts that are
probably needed.
--
And replace an instance of "%p" conversion with "%#jx"
--
Whitespace fix. Give Bl tag table a width. Fix Xr.

Revision 1.359.4.1: download - view: text, markup, annotated - select for diffs
Mon Oct 30 09:29:04 2017 UTC (7 years, 1 month ago) by snj
Branches: netbsd-8
Diff to: previous 1.359: preferred, colored
Changes since revision 1.359: +12 -2 lines
Pull up following revision(s) (requested by maya in ticket #330):
	sbin/fsck_lfs/inode.c: 1.69
	sbin/fsck_lfs/lfs.c: 1.73
	sbin/fsck_lfs/pass6.c: 1.50
	sbin/fsck_lfs/segwrite.c: 1.46
	sys/ufs/lfs/lfs.h: 1.202-1.203
	sys/ufs/lfs/lfs_accessors.h: 1.48
	sys/ufs/lfs/lfs_alloc.c: 1.136-1.137
	sys/ufs/lfs/lfs_balloc.c: 1.94
	sys/ufs/lfs/lfs_bio.c: 1.141
	sys/ufs/lfs/lfs_extern.h: 1.113
	sys/ufs/lfs/lfs_inode.c: 1.156-1.157
	sys/ufs/lfs/lfs_inode.h: 1.20, 1.21, 1.23
	sys/ufs/lfs/lfs_itimes.c: 1.20
	sys/ufs/lfs/lfs_pages.c: 1.13-1.15
	sys/ufs/lfs/lfs_rename.c: 1.22
	sys/ufs/lfs/lfs_segment.c: 1.270-1.275
	sys/ufs/lfs/lfs_subr.c: 1.94-1.97
	sys/ufs/lfs/lfs_syscalls.c: 1.175
	sys/ufs/lfs/lfs_vfsops.c: 1.360
	sys/ufs/lfs/lfs_vnops.c: 1.316-1.321
	sys/ufs/lfs/ulfs_inode.c: 1.20
	sys/ufs/lfs/ulfs_inode.h: 1.24
	sys/ufs/lfs/ulfs_lookup.c: 1.41
	sys/ufs/lfs/ulfs_quota2.c: 1.31
	sys/ufs/lfs/ulfs_readwrite.c: 1.24
	sys/ufs/lfs/ulfs_vnops.c: 1.49-1.50
Update inode member i_flag --> i_state to keep up with kernel changes
Move definition of IN_ALLMOD near the flag it's a mask for.
Now we can see that it doesn't match all the flags, but changing that will
require more careful thought.
Correct confusion between i_flag and i_flags
These will have to be renamed.
Spotted by Riastradh, thanks!
Add an XXX about the missing flags so it's not buried in a commit
message.
now the XXX count for LFS is 260
Rename i_flag to i_state.
The similarity to i_flags has previously caused errors.
Use continue to denote the no-op loop to match netbsd style
newline for extra clarity.
It isn't safe to drain dirops with seglock held, it'll deadlock if there
are any dirops. drain before grabbing seglock.
lfs_dirops == 0 is always true (as we already drained dirops), so omit
that part of the comparison.
Fixes a lot of LFS deadlocks. PR kern/52301
Many thanks to dholland for help analyzing coredumps
Ifdef out KDASSERT which fires on my machine.
Deduplicate sanity check that seglock is held on segunlock
Revert r1.272 fix to PR kern/52301, the performance hit is making things
unusable.
change lfs_nextsegsleep and lfs_allclean_wakeup to use condvar
XXX had to use lfs_lock in lfs_segwait, removed kernel_lock, is this
appropriate?
fix buffer overflow/KASSERT when cookies are supplied
lfs no longer uses the ffs-style struct direct, use the correct minimum
size
from dholland
XXX more wrong
Consistently use {,UN}MARK_VNODE macros rather than function calls.
Not much point doing anything after a panic call
Ask some question about the code in a XXX comment
XXX question our double-flushing of dirops
Fix typo in comment

Revision 1.361: download - view: text, markup, annotated - select for diffs
Sat Oct 28 00:37:13 2017 UTC (7 years, 1 month ago) by pgoyette
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.360: preferred, colored
Changes since revision 1.360: +10 -10 lines
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
  the kernel and in the structures used for exporting the history data
  to userland via sysctl(9).  This avoids problems on some architectures
  where passing a 64-bit (or larger) value to printf(3) can cause it to
  process the value as multiple arguments.  (This can be particularly
  problematic when printf()'s format string is not a literal, since in
  that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
  include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
  updated.  Each format specifier now includes an explicit length
  modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
  updated to replace uses of "%p" with "%#jx", and the pointer
  arguments are now cast to (uintptr_t) before being subsequently cast
  to (uintmax_t).  This is needed to avoid compiler warnings about
  casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
  "%c" format strings replaced with numeric formats; several instances
  of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
  history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
  the -u option does not exist (previously, this condition was silently
  ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
  data exported via sysctl(9) and exits if they do not match the values
  with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
  requirements imposed on the format strings, along with several other
  minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
    uint64_t) for the history arguments.  But that would require another
    "rototill" of all the users in the future when we add support for an
    architecture that supports a larger size.  Also, the printf(3) format
    specifiers for explicitly-sized values, such as "%"PRIu64, are much
    more verbose (and less aesthetically appealing, IMHO) than simply
    using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
    but it is possible that I've missed some of them.  I would be glad to
    update any stragglers that anyone identifies.

Revision 1.321.4.6: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:17 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.321.4.5: preferred, colored; branchpoint 1.321: preferred, colored; next MAIN 1.322: preferred, colored
Changes since revision 1.321.4.5: +43 -45 lines
Sync with HEAD

Revision 1.360: download - view: text, markup, annotated - select for diffs
Wed Jul 26 16:42:37 2017 UTC (7 years, 4 months ago) by maya
Branches: MAIN
CVS tags: nick-nhusb-base-20170825
Diff to: previous 1.359: preferred, colored
Changes since revision 1.359: +12 -2 lines
change lfs_nextsegsleep and lfs_allclean_wakeup to use condvar

XXX had to use lfs_lock in lfs_segwait, removed kernel_lock, is this
appropriate?

Revision 1.359.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 27 05:36:38 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.359: preferred, colored; next MAIN 1.360: preferred, colored
Changes since revision 1.359: +9 -3 lines
Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

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

Revision 1.351.2.3: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:31 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.351.2.2: preferred, colored; branchpoint 1.351: preferred, colored; next MAIN 1.352: preferred, colored
Changes since revision 1.351.2.2: +27 -33 lines
Sync with HEAD

Revision 1.351.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:09 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.351: preferred, colored; next MAIN 1.352: preferred, colored
Changes since revision 1.351: +32 -44 lines
Sync with HEAD

Revision 1.359: download - view: text, markup, annotated - select for diffs
Mon Apr 17 08:32:01 2017 UTC (7 years, 7 months ago) by hannken
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, bouyer-socketcan-base1
Branch point for: prg-localcount2, netbsd-8
Diff to: previous 1.358: preferred, colored
Changes since revision 1.358: +4 -4 lines
Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.

Revision 1.358: download - view: text, markup, annotated - select for diffs
Mon Apr 17 08:31:02 2017 UTC (7 years, 7 months ago) by hannken
Branches: MAIN
Diff to: previous 1.357: preferred, colored
Changes since revision 1.357: +3 -3 lines
Add vfs_ref(mp) and vfs_rele(mp) to add or remove a reference to
struct mount.  Rename vfs_destroy(mp) to vfs_rele(mp) and replace
incrementing mp->mnt_refcnt with vfs_ref(mp).

Revision 1.357: download - view: text, markup, annotated - select for diffs
Thu Apr 13 09:57:28 2017 UTC (7 years, 8 months ago) by hannken
Branches: MAIN
Diff to: previous 1.356: preferred, colored
Changes since revision 1.356: +9 -18 lines
Switch lfs_flush() and lfs_writerd() to mountlist iterator.

Revision 1.356: download - view: text, markup, annotated - select for diffs
Sat Apr 1 17:34:21 2017 UTC (7 years, 8 months ago) by maya
Branches: MAIN
CVS tags: jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +12 -12 lines
Switch lfs_writer_daemon to use condvar instead of mtsleep.
track thread existence with struct lwp instead of pid + lid,
it's more useful from ddb.

Revision 1.355: download - view: text, markup, annotated - select for diffs
Sat Apr 1 14:43:00 2017 UTC (7 years, 8 months ago) by maya
Branches: MAIN
Diff to: previous 1.354: preferred, colored
Changes since revision 1.354: +4 -2 lines
switch lfs_dirops to condvar (from mtsleep)

Revision 1.354: download - view: text, markup, annotated - select for diffs
Sat Apr 1 01:50:02 2017 UTC (7 years, 8 months ago) by maya
Branches: MAIN
Diff to: previous 1.353: preferred, colored
Changes since revision 1.353: +5 -4 lines
switch lfs_sleepers to condvar (from mtsleep)

Revision 1.351.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:54 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.351.2.1: preferred, colored; branchpoint 1.351: preferred, colored
Changes since revision 1.351.2.1: +7 -13 lines
Sync with HEAD

Revision 1.353: download - view: text, markup, annotated - select for diffs
Mon Mar 13 14:24:20 2017 UTC (7 years, 9 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.352: preferred, colored
Changes since revision 1.352: +6 -12 lines
#if DIAGNOSTIC panic ---> KASSERT

Replace some #if DEBUG by this too.  DEBUG is only for expensive
assertions; these are not.

Revision 1.352: download - view: text, markup, annotated - select for diffs
Fri Feb 17 08:31:26 2017 UTC (7 years, 9 months ago) by hannken
Branches: MAIN
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +3 -3 lines
Add generic genfs_suspendctl() and use it for all file systems.
Layered file systems need work.

Revision 1.351.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 20 23:47:57 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +11 -7 lines
Adapt machine-independant code to the new {b,c}devsw reference-counting
(using localcount(9)).  All callers of {b,c}devsw_lookup() now call
{b,c}devsw_lookup_acquire() which retains a reference on the 'struct
{b,c}devsw'.  This reference must be released by the caller once it is
finished with the structure's content (or other data that would disappear
if the 'struct {b,c}devsw' were to disappear).

Revision 1.321.4.5: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:25 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.321.4.4: preferred, colored; branchpoint 1.321: preferred, colored
Changes since revision 1.321.4.4: +3 -14 lines
Sync with HEAD

Revision 1.351: download - view: text, markup, annotated - select for diffs
Thu Jul 7 06:55:44 2016 UTC (8 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Diff to: previous 1.350: preferred, colored
Changes since revision 1.350: +3 -3 lines
KNF. Remove extra spaces. No functional change.

Revision 1.350: download - view: text, markup, annotated - select for diffs
Mon Jun 20 01:44:05 2016 UTC (8 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.349: preferred, colored
Changes since revision 1.349: +3 -14 lines
Merge -r1.44 of ufs_extattr.c and related change -r1.302 of ffs_vfops.c:
fix use-after-free on failed unmount with extended attributes enabled.

Revision 1.321.4.4: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:19 2015 UTC (8 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.321.4.3: preferred, colored; branchpoint 1.321: preferred, colored
Changes since revision 1.321.4.3: +172 -96 lines
Sync with HEAD (as of 26th Dec)

Revision 1.349: download - view: text, markup, annotated - select for diffs
Mon Oct 19 04:22:18 2015 UTC (9 years, 1 month ago) by dholland
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Diff to: previous 1.348: preferred, colored
Changes since revision 1.348: +3 -3 lines
Set the legacy ulfs fstype field to ULFS2 when mounting lfs64. Oops.

Revision 1.348: download - view: text, markup, annotated - select for diffs
Thu Oct 15 06:25:34 2015 UTC (9 years, 1 month ago) by dholland
Branches: MAIN
Diff to: previous 1.347: preferred, colored
Changes since revision 1.347: +141 -72 lines
Enable mounting lfs64 volumes.

Revision 1.347: download - view: text, markup, annotated - select for diffs
Thu Oct 15 06:15:48 2015 UTC (9 years, 1 month ago) by dholland
Branches: MAIN
Diff to: previous 1.346: preferred, colored
Changes since revision 1.346: +32 -22 lines
Move stuff from struct ulfsmount to struct lfs.

Revision 1.346: download - view: text, markup, annotated - select for diffs
Sat Oct 10 22:33:57 2015 UTC (9 years, 2 months ago) by dholland
Branches: MAIN
Diff to: previous 1.345: preferred, colored
Changes since revision 1.345: +2 -5 lines
Remove no longer needed explicit 32->64 sign extension.

This is the last 32-bit-on-disk item among those that were either
already tagged or readily discoverable.

Revision 1.321.4.3: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:17 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.321.4.2: preferred, colored; branchpoint 1.321: preferred, colored
Changes since revision 1.321.4.2: +206 -172 lines
Sync with HEAD

Revision 1.345: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:16:59 2015 UTC (9 years, 3 months ago) by dholland
Branches: MAIN
CVS tags: nick-nhusb-base-20150921
Diff to: previous 1.344: preferred, colored
Changes since revision 1.344: +5 -2 lines
Add new accessors for the d_type and d_namlen fields of struct lfs_direct.
Napalm the old byteswap access logic for these.

Revision 1.344: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:11:06 2015 UTC (9 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +5 -2 lines
Make the inode fields in the 64-bit superblock 64 bits wide.
Reasoning as before.

Note that I am not going through and checking for 64->32 truncations
in inode numbers; I'm sure there are quite a few, but that's a project
for later.

Revision 1.343: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:10:16 2015 UTC (9 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.342: preferred, colored
Changes since revision 1.342: +4 -3 lines
Add byteswapping to the dinode accessors.

This prevents regressions in the ulfs code when switching to the new
accessors. Note that while adding byteswapping to the other accessors
is straightforward, I haven't done it yet; and that also is not enough
to make LFS_EI work, because there are places lying around that bypass
the accessors for one reason and another and all of them need to be
updated. That is going to have to wait for a later day as LFS_EI is
not on the critical path right now.

Revision 1.342: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:08:37 2015 UTC (9 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.341: preferred, colored
Changes since revision 1.341: +22 -21 lines
Use the lfs dinode accessors in place of the ufs-derived ones.
(Mostly.)

The ufs-derived ones are fake structure member macros, which are gross
and not very safe. Also, it seems that a lot of places in the lfs code
were using the ffsv1 branch of them unconditionally, and this way it's
guaranteed all those places have been updated.

Found while doing this: for non-devices, have getattr produce NODEV
in the rdev field instead of leaking the address of the first direct
block.

Revision 1.341: download - view: text, markup, annotated - select for diffs
Wed Aug 19 20:33:29 2015 UTC (9 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +10 -23 lines
Part two of dinodes; use the same union everywhere.
(previously the ufs-derived code had things set up slightly different)

Remove a bunch of associated mess.

Revision 1.340: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:28:01 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.339: preferred, colored
Changes since revision 1.339: +46 -21 lines
Hack up dinode usage to be 64 vs. 32 as needed. Part 1.

(This part changes the native lfs code; the ufs-derived code already
has 64 vs. 32 logic, but as aspects of it are unsafe, and don't
entirely interoperate cleanly with the lfs 64/32 stuff, pass 2 will be
rehashing that.)

Revision 1.339: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:27:01 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.338: preferred, colored
Changes since revision 1.338: +3 -3 lines
Provide 32-bit and 64-bit versions of FINFO.

This also entailed sorting out part of struct segment, as that
contains a pointer into the current FINFO data.

Revision 1.338: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:26:27 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.337: preferred, colored
Changes since revision 1.337: +6 -4 lines
Make 32-bit and 64-bit versions of SEGSUM.
Also fix some of the FINFO handling as it's closely entangled.

Revision 1.337: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:25:52 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.336: preferred, colored
Changes since revision 1.336: +6 -6 lines
Add IFILE32 and IFILE64 structures for the on-disk ifile entries.
Add and use accessors. There are also a bunch of places that cast and
I hope I've found them all...

Revision 1.336: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:25:04 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +10 -8 lines
Make 32-bit and 64-bit versions of CLEANERINFO.

XXX: while this is written to disk, it seems like much of it would
XXX: be better set up as a commpage shared with the cleaner.

Revision 1.335: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:23:59 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.334: preferred, colored
Changes since revision 1.334: +4 -3 lines
Fix botched syscall_package. HI CHRISTOS

Revision 1.334: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:18:46 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.333: preferred, colored
Changes since revision 1.333: +4 -4 lines
Pass the fs object to LFS_MAX_DADDR so it can check lfs_is64.

Remove some hackish intentional 64->32 truncations next to the checks
using LFS_MAX_DADDR, and tackle the problem they handled in bmap
instead.

The problem: the magic block pointer value UNWRITTEN has magic value
-2, and if it's not handled specifically, uint32 -> uint64 promotion
turns it into 4294967294, which then causes consternation and
monkeyhouse downstream.

What's here is still kind of a hack, but it's a step forward.

Revision 1.333: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:18:10 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.332: preferred, colored
Changes since revision 1.332: +6 -10 lines
Add a (draft) 64-bit superblock. Make things build again.

Add pieces of support for using both superblock types where
convenient, and specifically to the superblock accessors, but don't
actually enable it anywhere.

First substantive step on PR 50000.

Revision 1.332: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:14:16 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +7 -7 lines
Use accessor functions for the version field of the lfs superblock.
I thought at first maybe the cases that test the version should be
rolled into the accessors, but on the whole I think the conclusion on
that is no.

Revision 1.331: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:10:08 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.330: preferred, colored
Changes since revision 1.330: +3 -3 lines
Second batch of 64 -> 32 truncations in lfs, along with more minor
tidyups and corrections in passing.

Revision 1.330: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:08:13 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +11 -2 lines
Fix assorted 64 -> 32 truncations in lfs. Also, some minor tidyups and
corrections in passing.

Revision 1.329: download - view: text, markup, annotated - select for diffs
Tue Jul 28 05:09:35 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.328: preferred, colored
Changes since revision 1.328: +3 -2 lines
Add a new lfs header file: lfs_accessors.h.

This contains all the accessor functions and macros out of lfs.h.
Add an include of lfs_accessors.h after all uses of lfs.h... except
for code that wants to define its own struct lfs-alike that the
accessors are supposed to play along with. For these, set STRUCT_LFS
and include lfs_accessors.h after the necessary structure has been
defined, so that lfs_accessors.h can emit functions in terms of it.

Revision 1.328: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:59:32 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +59 -57 lines
More lfs superblock accessors.
(This changes the rest of the code over; all the accessors were
already added.)

The difference between this commit and the previous one is arbitrary,
but the previous one passed the regression tests on its own so I'm
keeping it separate to help with any bisections that might be needed
in the future.

Revision 1.327: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:56:42 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.326: preferred, colored
Changes since revision 1.326: +57 -56 lines
Switch to accessor functions for elements of the LFS on-disk
superblock. This will allow switching between 32/64 bit forms on the
fly; it will also allow handling LFS_EI reasonably tidily. (That
currently doesn't work on the superblock.)

It also gets rid of cpp abuse in the form of fake structure member
macros.

Also, instead of doing sleep/wakeup on &lfs_avail and &lfs_nextseg
inside the on-disk superblock, add extra elements to the in-memory
struct lfs for this. (XXX: these should be changed to condvars, but
not right now)

XXX: this migrates a structure needed by the lfs code in libsa (struct
salfs) into lfs.h, where it doesn't belong, but for the time being
this is necessary in order to allow the accessors (and the various
lfs macros and other goop that relies on them) to compile.

Revision 1.326: download - view: text, markup, annotated - select for diffs
Thu Jul 16 08:31:45 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +8 -8 lines
Don't cast the return value of malloc.

Revision 1.325: download - view: text, markup, annotated - select for diffs
Sun Jun 7 13:39:48 2015 UTC (9 years, 6 months ago) by hannken
Branches: MAIN
Diff to: previous 1.324: preferred, colored
Changes since revision 1.324: +5 -5 lines
Fix copy and paste errors from last commits.
- Kernel i386/ALL and amd64/ALL compile again.
- Resolves CID 1304138 (DEADCODE) and 1304139 (IDENTICAL_BRANCHES).

Revision 1.321.4.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:30 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.321.4.1: preferred, colored; branchpoint 1.321: preferred, colored
Changes since revision 1.321.4.1: +245 -116 lines
Sync with HEAD

Revision 1.324: download - view: text, markup, annotated - select for diffs
Sun May 31 15:48:03 2015 UTC (9 years, 6 months ago) by hannken
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.323: preferred, colored
Changes since revision 1.323: +237 -106 lines
Change lfs from hash table to vcache.

- Change lfs_valloc() to return an inode number and version instead of
  a vnode and move lfs_ialloc() and lfs_vcreate() to new lfs_init_vnode().

- Add lfs_valloc_fixed() to allocate a known inode, used by kernel
  roll forward.

- Remove lfs_*ref(), these functions cannot coexist with vcache and
  their commented behaviour is far away from their implementation.

- Add the cleaner lwp and blockinfo to struct ulfsmount so lfs_loadvnode()
  may use hints from the cleaner.

- Remove vnode locks from ulfs_lookup() like we did with ufs_lookup().

Revision 1.323: download - view: text, markup, annotated - select for diffs
Sun May 31 15:44:31 2015 UTC (9 years, 6 months ago) by hannken
Branches: MAIN
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +4 -6 lines
Use VFS_PROTOS() for lfs.
Rename conflicting struct lfs field "lfs_start" to "lfs_s0addr".

No functional change.

Revision 1.321.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:33 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +10 -10 lines
Sync with HEAD

Revision 1.322: download - view: text, markup, annotated - select for diffs
Sat Mar 28 19:24:05 2015 UTC (9 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +10 -10 lines
Remove the 'cred' argument from bread(). Remove a now unused var in
ffs_snapshot.c. Update the man page accordingly.

ok hannken@

Revision 1.296.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:45 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.296.2.2: preferred, colored; branchpoint 1.296: preferred, colored
Changes since revision 1.296.2.2: +189 -67 lines
Rebase to HEAD as of a few days ago.

Revision 1.320.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:56:58 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.320: preferred, colored; next MAIN 1.321: preferred, colored
Changes since revision 1.320: +4 -2 lines
Rebase.

Revision 1.290.2.5: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:19 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.290.2.4: preferred, colored; branchpoint 1.290: preferred, colored; next MAIN 1.291: preferred, colored
Changes since revision 1.290.2.4: +288 -167 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.307.2.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:21 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.307.2.1: preferred, colored; branchpoint 1.307: preferred, colored; next MAIN 1.308: preferred, colored
Changes since revision 1.307.2.1: +36 -43 lines
sync with head

Revision 1.267.6.1.10.1: download - view: text, markup, annotated - select for diffs
Mon Apr 28 16:05:37 2014 UTC (10 years, 7 months ago) by sborrill
Branches: netbsd-5-2
CVS tags: netbsd-5-2-3-RELEASE
Diff to: previous 1.267.6.1: preferred, colored; next MAIN 1.267.6.2: preferred, colored
Changes since revision 1.267.6.1: +4 -2 lines
Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

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

Revision 1.267.6.1.6.1: download - view: text, markup, annotated - select for diffs
Mon Apr 28 16:03:16 2014 UTC (10 years, 7 months ago) by sborrill
Branches: netbsd-5-1
CVS tags: netbsd-5-1-5-RELEASE
Diff to: previous 1.267.6.1: preferred, colored; next MAIN 1.267.6.2: preferred, colored
Changes since revision 1.267.6.1: +4 -2 lines
Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

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

Revision 1.267.6.2: download - view: text, markup, annotated - select for diffs
Fri Apr 25 15:43:51 2014 UTC (10 years, 7 months ago) by sborrill
Branches: netbsd-5
Diff to: previous 1.267.6.1: preferred, colored; branchpoint 1.267: preferred, colored; next MAIN 1.268: preferred, colored
Changes since revision 1.267.6.1: +4 -2 lines
Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

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

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

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

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

Revision 1.321: download - view: text, markup, annotated - select for diffs
Wed Apr 16 18:55:19 2014 UTC (10 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Diff to: previous 1.320: preferred, colored
Changes since revision 1.320: +4 -2 lines
An (un)privileged user can easily make the kernel dereference a NULL
pointer.

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

ok christos@

Revision 1.320: download - view: text, markup, annotated - select for diffs
Mon Mar 24 13:42:40 2014 UTC (10 years, 8 months ago) by hannken
Branches: MAIN
CVS tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +7 -4 lines
- Make VI_XLOCK, VI_CLEAN and VI_LOCKSHARE private to kern/vfs_*.c.
- Make vwait() static.
- Add  vdead_check() to check a vnode for being or becoming dead.

Discussed on tech-kern.

Welcome to 6.99.38

Revision 1.319: download - view: text, markup, annotated - select for diffs
Sun Mar 23 15:21:17 2014 UTC (10 years, 8 months ago) by hannken
Branches: MAIN
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +25 -27 lines
Change all vfsops to use C99 designated initializers.

No functional changes intended.

Revision 1.318: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:30:13 2014 UTC (10 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: riastradh-drm2-base3
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +2 -7 lines
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

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

Revision 1.317: download - view: text, markup, annotated - select for diffs
Wed Nov 27 17:24:44 2013 UTC (11 years ago) by christos
Branches: MAIN
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +3 -4 lines
Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQ
anymore, all the macros expand to NULL anyway, so this improves readability.
Requested by rmind@

Revision 1.316: download - view: text, markup, annotated - select for diffs
Sat Nov 23 13:35:37 2013 UTC (11 years ago) by christos
Branches: MAIN
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +4 -6 lines
change the mountlist CIRCLEQ into a TAILQ

Revision 1.315: download - view: text, markup, annotated - select for diffs
Thu Oct 17 21:01:08 2013 UTC (11 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +2 -4 lines
- remove unused variables
- add debug ifdefs for debugging variables
- __USE() where appropriate.

Revision 1.314: download - view: text, markup, annotated - select for diffs
Mon Sep 30 18:58:00 2013 UTC (11 years, 2 months ago) by hannken
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +4 -4 lines
Replace macro v_specmountpoint with two functions spec_node_getmountedfs()
and spec_node_setmountedfs() to manage the file system mounted on a device.
Assert the device is a block device.

Welcome to 6.99.24

Discussed on tech-kern@ some time ago.

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

Revision 1.307.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 28 23:59:38 2013 UTC (11 years, 3 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +158 -29 lines
sync with head

Revision 1.313: download - view: text, markup, annotated - select for diffs
Sun Jul 28 01:26:13 2013 UTC (11 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +45 -3 lines
Merge in some of the stuff for supporting the extended attributes code.

Revision 1.312: download - view: text, markup, annotated - select for diffs
Sun Jul 28 01:25:06 2013 UTC (11 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +89 -2 lines
Add more of the bits for supporting quotas.

Revision 1.311: download - view: text, markup, annotated - select for diffs
Sun Jul 28 01:22:55 2013 UTC (11 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +10 -2 lines
Bring in a copy of ffs_quota2_mount() for reference.
Add stuff to struct lfs that it needs to initialize.
Clear these fields in mount as there's no on-disk support for quota2;
but this increases the chances of being able to add it (or something
like it) in the future.

Revision 1.310: download - view: text, markup, annotated - select for diffs
Sun Jul 28 01:10:49 2013 UTC (11 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +19 -17 lines
Migrate the miscellaneous ulfs-level info from struct ulfsmount to
struct lfs.

Put them inside #ifdef _KERNEL there. They are not the only such
members, gross as that is. Unfortunately, moving struct lfs to
lfs_kernel.h does not work.

Revision 1.309: download - view: text, markup, annotated - select for diffs
Sun Jul 28 01:05:52 2013 UTC (11 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +3 -2 lines
Add lfs_kernel.h for declarations that don't need to be exposed to userland.

lfs currently has the following headers:
   lfs.h - on-disk structures and stuff needed for userlevel tools
   lfs_inode.h - additional restricted materials for userlevel tools
                 that operate the fs (newfs_lfs, fsck_lfs, lfs_cleanerd)
   lfs_kernel.h - stuff needed only in the kernel

and the following legacy headers that are expected to be mopped up and
folded into one of the above:
   lfs_extern.h - function prototypes
   ulfs_bswap.h - endian-independent support
   ulfs_dinode.h - now contains very little
   ulfs_dirhash.h - dirhash support
   ulfs_extattr.h - extattr support
   ulfs_extern.h - more function prototypes
   ulfs_inode.h - assorted kernel-only declarations
   ulfs_quota.h - quota support
   ulfs_quota1.h - more quota support
   ulfs_quota2.h - more quota support
   ulfs_quotacommon.h - more quota support
   ulfsmount.h - legacy copy of ufsmount material

Revision 1.308: download - view: text, markup, annotated - select for diffs
Sun Jul 28 00:29:18 2013 UTC (11 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +2 -13 lines
Get rid of the ulfs_ops table as we only have one fs in here now.

Revision 1.296.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:39 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.296.2.1: preferred, colored; branchpoint 1.296: preferred, colored
Changes since revision 1.296.2.1: +108 -109 lines
resync from head

Revision 1.307: download - view: text, markup, annotated - select for diffs
Tue Jun 18 18:18:58 2013 UTC (11 years, 5 months ago) by christos
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +32 -33 lines
Prefix most of the cpp macros with lfs_ and LFS_ to avoid conflicts with ffs.
This was done so that boot blocks that want to compile both FFS and LFS in
the same file work.

Revision 1.306: download - view: text, markup, annotated - select for diffs
Mon Jun 17 15:46:04 2013 UTC (11 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +3 -3 lines
LFS module does not depend on FFS anymore. (NAKAJIMA Yoshihiro)

Revision 1.305: download - view: text, markup, annotated - select for diffs
Mon Jun 10 09:25:05 2013 UTC (11 years, 6 months ago) by hannken
Branches: MAIN
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +4 -4 lines
Make DEBUG kernel compile: di_u.inumber -> di_inumber

Revision 1.304: download - view: text, markup, annotated - select for diffs
Sat Jun 8 02:14:46 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +3 -3 lines
DIRBLKSIZ -> LFS_DIRBLKSIZ
DIRECTSIZ -> LFS_DIRECTSIZ
DIRSIZ -> LFS_DIRSIZ
OLDDIRFMT -> LFS_OLDDIRFMT
NEWDIRFMT -> LFS_NEWDIRFMT
IFTODT -> LFS_IFTODT
DTTOIF -> LFS_DTTOIF

Revision 1.303: download - view: text, markup, annotated - select for diffs
Sat Jun 8 02:11:11 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +3 -3 lines
Stick LFS_ in front of IFMT, IFIFO, IFREG, etc. so as not to conflict
with the UFS copies of these symbols. (Which themselves ought to have
UFS_ stuck on.)

Revision 1.302: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:49:28 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +4 -4 lines
Add lfs_ or ulfs_ in front of extern symbols lacking them, mostly
quota-related (and particularly quota2-related) stuff.

Revision 1.301: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:48:04 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +65 -65 lines
Split lfs from ufs step 4:

Massedit all ufs symbols to be "ulfs" instead, to make sure there are
no conflicts with ufs. Confirmed with grep.

(This required changing a few comments that maybe should have been
left alone to say "ulfs", but we'll survive that.)

Revision 1.300: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:46:40 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +4 -4 lines
Split lfs from ufs step 3: rearrange config stuff.
Add new options:
   LFS_EI
   LFS_DIRHASH
   LFS_EXTATTR
   LFS_EXTATTR_AUTOSTART
   LFS_QUOTA
   LFS_QUOTA2

and update code referring to the corresponding FFS and UFS config
symbols to use the LFS versions. Disable the one extant reference
to APPLE_UFS in the ulfs files. Use opt_lfs.h only, not opt_ffs.h.

Revision 1.299: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:44:40 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +6 -6 lines
Split lfs from ufs, part 2:

Change all <ufs/ufs/foo.h> includes to <ufs/lfs/ulfs_foo.h>.

Revision 1.296.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:30:17 2013 UTC (11 years, 9 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +9 -8 lines
resync with head

Revision 1.290.2.4: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:06:34 2013 UTC (11 years, 10 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.290.2.3: preferred, colored; branchpoint 1.290: preferred, colored
Changes since revision 1.290.2.3: +9 -8 lines
sync with head

Revision 1.298: download - view: text, markup, annotated - select for diffs
Tue Jan 22 09:39:18 2013 UTC (11 years, 10 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base8, khorben-n900, agc-symver-base, agc-symver
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +7 -7 lines
Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

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

No functional change intended.

Revision 1.297: download - view: text, markup, annotated - select for diffs
Thu Dec 20 08:03:45 2012 UTC (11 years, 11 months ago) by hannken
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +4 -3 lines
Change bread() and breadn() to never return a buffer on
error and modify all callers to not brelse() on error.

Welcome to 6.99.16

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

Revision 1.291.4.3: download - view: text, markup, annotated - select for diffs
Sat Jun 2 11:09:41 2012 UTC (12 years, 6 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.291.4.2: preferred, colored; branchpoint 1.291: preferred, colored; next MAIN 1.292: preferred, colored
Changes since revision 1.291.4.2: +8 -7 lines
sync to latest -current.

Revision 1.290.2.3: download - view: text, markup, annotated - select for diffs
Wed May 23 10:08:19 2012 UTC (12 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.290.2.2: preferred, colored; branchpoint 1.290: preferred, colored
Changes since revision 1.290.2.2: +10 -9 lines
sync with head.

Revision 1.296: download - view: text, markup, annotated - select for diffs
Mon Apr 30 22:51:28 2012 UTC (12 years, 7 months ago) by rmind
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +10 -9 lines
- Replace some malloc(9) uses with kmem(9).
- G/C M_IPMOPTS, M_IPMADDR and M_BWMETER.

Revision 1.290.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:56 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.290.2.1: preferred, colored; branchpoint 1.290: preferred, colored
Changes since revision 1.290.2.1: +166 -88 lines
sync with head

Revision 1.291.4.2: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:33:51 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.291.4.1: preferred, colored; branchpoint 1.291: preferred, colored
Changes since revision 1.291.4.1: +5 -3 lines
sync to latest -current.

Revision 1.293.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 17 17:40:07 2012 UTC (12 years, 8 months ago) by bouyer
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +2 -4 lines
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.295: download - view: text, markup, annotated - select for diffs
Tue Mar 13 18:41:13 2012 UTC (12 years, 9 months ago) by elad
Branches: MAIN
CVS tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +5 -3 lines
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.291.4.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:55 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +161 -87 lines
merge to -current.

Revision 1.294: download - view: text, markup, annotated - select for diffs
Thu Feb 16 02:47:55 2012 UTC (12 years, 9 months ago) by perseant
Branches: MAIN
CVS tags: jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +2 -4 lines
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.267.6.1.4.1: download - view: text, markup, annotated - select for diffs
Thu Feb 9 03:08:31 2012 UTC (12 years, 10 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.267.6.1: preferred, colored; next MAIN 1.267.6.2: preferred, colored
Changes since revision 1.267.6.1: +4 -4 lines
Change to use the updated uvm_pageout_* signature.

Revision 1.293: download - view: text, markup, annotated - select for diffs
Wed Jan 4 02:48:58 2012 UTC (12 years, 11 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-6-base
Branch point for: netbsd-6
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +5 -4 lines
lfs_writerd thread exits when no more LFSs are mounted.

Revision 1.292: download - view: text, markup, annotated - select for diffs
Mon Jan 2 22:10:45 2012 UTC (12 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +160 -85 lines

* 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.291: download - view: text, markup, annotated - select for diffs
Mon Nov 14 18:35:14 2011 UTC (13 years, 1 month ago) by hannken
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +4 -2 lines
VOP_OPEN() needs a locked vnode.  All these copy-and-pasted xxxfs_mount()
implementations need more review.

Revision 1.290.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 2 21:54:00 2011 UTC (13 years, 1 month ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +4 -3 lines
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.290: download - view: text, markup, annotated - select for diffs
Mon Jul 11 08:27:40 2011 UTC (13 years, 5 months ago) by hannken
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +7 -7 lines
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.288.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:32 2011 UTC (13 years, 5 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.288: preferred, colored; next MAIN 1.289: preferred, colored
Changes since revision 1.288: +12 -11 lines
Catchup with rmind-uvmplock merge.

Revision 1.289: download - view: text, markup, annotated - select for diffs
Sun Jun 12 03:36:01 2011 UTC (13 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +10 -9 lines
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.287.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:10:17 2011 UTC (13 years, 6 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.287: preferred, colored; next MAIN 1.288: preferred, colored
Changes since revision 1.287: +4 -17 lines
Sync with HEAD.

Revision 1.286.2.4: download - view: text, markup, annotated - select for diffs
Thu May 19 03:43:04 2011 UTC (13 years, 6 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.286.2.3: preferred, colored; branchpoint 1.286: preferred, colored; next MAIN 1.287: preferred, colored
Changes since revision 1.286.2.3: +4 -3 lines
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.286.2.3: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:42:20 2011 UTC (13 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.286.2.2: preferred, colored; branchpoint 1.286: preferred, colored
Changes since revision 1.286.2.2: +4 -17 lines
sync with head

Revision 1.288: download - view: text, markup, annotated - select for diffs
Sun Mar 6 17:08:39 2011 UTC (13 years, 9 months ago) by bouyer
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +4 -17 lines
merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

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

Revision 1.287.4.1: download - view: text, markup, annotated - select for diffs
Wed Feb 9 11:18:29 2011 UTC (13 years, 10 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.287: preferred, colored; next MAIN 1.288: preferred, colored
Changes since revision 1.287: +4 -17 lines
Various build fixes

Revision 1.282.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:48:12 2010 UTC (14 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.282.2.1: preferred, colored; branchpoint 1.282: preferred, colored; next MAIN 1.283: preferred, colored
Changes since revision 1.282.2.1: +4 -4 lines
Sync with HEAD.

Revision 1.255.10.8: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:55:14 2010 UTC (14 years, 4 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255.10.7: preferred, colored; branchpoint 1.255: preferred, colored; next MAIN 1.256: preferred, colored
Changes since revision 1.255.10.7: +6 -6 lines
sync with head.

Revision 1.286.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:20:05 2010 UTC (14 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.286.2.1: preferred, colored; branchpoint 1.286: preferred, colored
Changes since revision 1.286.2.1: +6 -6 lines
sync with head

Revision 1.287: download - view: text, markup, annotated - select for diffs
Thu Jun 24 13:03:19 2010 UTC (14 years, 5 months ago) by hannken
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +6 -6 lines
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.282.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:36 2010 UTC (14 years, 7 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +56 -28 lines
Sync with HEAD.

Revision 1.286.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 16 15:38:16 2010 UTC (14 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +10 -10 lines
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.255.10.7: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:45 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255.10.6: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.10.6: +89 -61 lines
sync with head

Revision 1.286: download - view: text, markup, annotated - select for diffs
Tue Mar 2 19:34:49 2010 UTC (14 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +20 -3 lines
load lfs syscalls in modload

Revision 1.285: download - view: text, markup, annotated - select for diffs
Tue Mar 2 19:30:34 2010 UTC (14 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +9 -2 lines
/*
 * XXX: Get extra reference to LFS vfsops.  This prevents unload,
 * but also prevents kernel panic due to text being unloaded
 * from below lfs_writerd.  When lfs_writerd can exit, remove
 * this!!!
 */

Revision 1.284: download - view: text, markup, annotated - select for diffs
Thu Feb 18 01:14:00 2010 UTC (14 years, 9 months ago) by eeh
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +17 -4 lines
Fix root filesystem support.

Revision 1.283: download - view: text, markup, annotated - select for diffs
Tue Feb 16 23:20:30 2010 UTC (14 years, 9 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +16 -25 lines
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.282: download - view: text, markup, annotated - select for diffs
Fri Jan 8 11:35:12 2010 UTC (14 years, 11 months ago) by pooka
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +4 -4 lines
The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change

Revision 1.281: download - view: text, markup, annotated - select for diffs
Mon Dec 7 04:12:10 2009 UTC (15 years ago) by eeh
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +11 -2 lines
Fix some more hangs and deadlocks.

Revision 1.280: download - view: text, markup, annotated - select for diffs
Tue Nov 17 17:08:57 2009 UTC (15 years ago) by pooka
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +17 -18 lines
Create unwind log in global variable instead of automatic variable.

memory leak spotted by njoly's valgrind run

Revision 1.279: download - view: text, markup, annotated - select for diffs
Thu Oct 29 18:20:11 2009 UTC (15 years, 1 month ago) by eeh
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +9 -17 lines
Fix up numoutput accounting.

Revision 1.255.10.6: download - view: text, markup, annotated - select for diffs
Wed Sep 16 13:38:07 2009 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255.10.5: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.10.5: +2 -4 lines
sync with head

Revision 1.278: download - view: text, markup, annotated - select for diffs
Sun Sep 13 05:17:37 2009 UTC (15 years, 3 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base8
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +2 -4 lines
Move declaration of ufs_hashlock into <ufs/ufs_extern.h> from each c source.

Revision 1.255.10.5: download - view: text, markup, annotated - select for diffs
Wed Aug 19 18:48:34 2009 UTC (15 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255.10.4: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.10.4: +20 -16 lines
sync with head.

Revision 1.277: download - view: text, markup, annotated - select for diffs
Wed Aug 5 15:39:57 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base7
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +11 -2 lines
Compensate v_numoutput & nestbuf for lfs's rather peculiar I/O habits.

Revision 1.276: download - view: text, markup, annotated - select for diffs
Wed Aug 5 14:37:01 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +3 -11 lines
remember to nestiobuf_done() too

Revision 1.275: download - view: text, markup, annotated - select for diffs
Wed Aug 5 14:09:26 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +10 -7 lines
Use nestiobuf instead of homerolled equivalent.

Revision 1.269.4.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:33:03 2009 UTC (15 years, 4 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.269.4.1: preferred, colored; branchpoint 1.269: preferred, colored; next MAIN 1.270: preferred, colored
Changes since revision 1.269.4.1: +5 -6 lines
Sync with HEAD.

Revision 1.255.10.4: download - view: text, markup, annotated - select for diffs
Sat Jul 18 14:53:27 2009 UTC (15 years, 4 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255.10.3: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.10.3: +5 -6 lines
sync with head.

Revision 1.274: download - view: text, markup, annotated - select for diffs
Mon Jun 29 05:08:18 2009 UTC (15 years, 5 months ago) by dholland
Branches: MAIN
CVS tags: yamt-nfs-mp-base6, jymxensuspend-base
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +5 -6 lines
Convert 67 namei call sites to use namei_simple, in these functions:

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

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

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

Revision 1.255.10.3: download - view: text, markup, annotated - select for diffs
Sat May 16 10:41:53 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255.10.2: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.10.2: +4 -5 lines
sync with head

Revision 1.269.4.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:23:07 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +11 -12 lines
Sync with HEAD.

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

Revision 1.273: download - view: text, markup, annotated - select for diffs
Thu May 7 20:32:23 2009 UTC (15 years, 7 months ago) by elad
Branches: MAIN
CVS tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, jym-xensuspend-base
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +4 -5 lines
Use genfs_can_mount().

Revision 1.255.10.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:14:38 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255.10.1: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.10.1: +198 -176 lines
sync with head.

Revision 1.267.4.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:57 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.267.4.2: preferred, colored; branchpoint 1.267: preferred, colored; next MAIN 1.268: preferred, colored
Changes since revision 1.267.4.2: +8 -8 lines
Sync with HEAD.

Revision 1.267.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 4 18:11:17 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-0-RELEASE, netbsd-5-0-RC4, 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
Branch point for: netbsd-5-2, netbsd-5-1, matt-nb5-mips64
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +4 -4 lines
Pull up following revision(s) (requested by ad in ticket #662):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.272
Turn up the volume on the warning message a bit.

Revision 1.272: download - view: text, markup, annotated - select for diffs
Sat Apr 4 10:33:59 2009 UTC (15 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +4 -4 lines
Turn up the volume on the warning message a bit.

Revision 1.271: download - view: text, markup, annotated - select for diffs
Sun Mar 15 21:30:57 2009 UTC (15 years, 9 months ago) by cegger
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +6 -6 lines
ansify function definitions

Revision 1.267.4.2: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:34:40 2009 UTC (15 years, 9 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.267.4.1: preferred, colored; branchpoint 1.267: preferred, colored
Changes since revision 1.267.4.1: +3 -3 lines
Sync with HEAD.

Revision 1.270: download - view: text, markup, annotated - select for diffs
Sun Feb 22 20:28:07 2009 UTC (15 years, 9 months ago) by ad
Branches: MAIN
CVS tags: nick-hppapmap-base2
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +3 -3 lines
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.267.4.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:20:35 2009 UTC (15 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +4 -3 lines
Sync with HEAD.

Revision 1.255.6.3: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:42 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.255.6.2: preferred, colored; branchpoint 1.255: preferred, colored; next MAIN 1.256: preferred, colored
Changes since revision 1.255.6.2: +2 -1 lines
Sync with HEAD.

Revision 1.267.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:41 2008 UTC (16 years ago) by haad
Branches: haad-dm
Diff to: previous 1.267: preferred, colored; next MAIN 1.268: preferred, colored
Changes since revision 1.267: +4 -3 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.269: download - view: text, markup, annotated - select for diffs
Thu Nov 13 11:10:41 2008 UTC (16 years, 1 month ago) by ad
Branches: MAIN
CVS tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +3 -3 lines
These depend on ffs.

Revision 1.268: download - view: text, markup, annotated - select for diffs
Thu Nov 13 11:09:45 2008 UTC (16 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +3 -2 lines
Remove #ifdef LFS from the ufs code.

Revision 1.260.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:37:06 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.260.2.1: preferred, colored; next MAIN 1.261: preferred, colored
Changes since revision 1.260.2.1: +177 -161 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.265.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 3 18:38:25 2008 UTC (16 years, 5 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.265: preferred, colored; next MAIN 1.266: preferred, colored
Changes since revision 1.265: +177 -161 lines
Sync with head.

Revision 1.255.6.2: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:21 2008 UTC (16 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.255.6.1: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.6.1: +175 -159 lines
Sync with HEAD.

Revision 1.267: download - view: text, markup, annotated - select for diffs
Sat Jun 28 15:50:20 2008 UTC (16 years, 5 months ago) by rumble
Branches: 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-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +18 -17 lines
Fix lkm fallout from previous sysctl changes. This largely duplicates
sysctl creation code, but lkms are going away soon(ish) anyway.

Spotted by Chris Gilbert.

Revision 1.266: download - view: text, markup, annotated - select for diffs
Sat Jun 28 01:34:05 2008 UTC (16 years, 5 months ago) by rumble
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +176 -161 lines
Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.

Revision 1.260.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:32:05 2008 UTC (16 years, 5 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +33 -12 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.255.8.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:53 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.255.8.1: preferred, colored; branchpoint 1.255: preferred, colored; next MAIN 1.256: preferred, colored
Changes since revision 1.255.8.1: +5 -2 lines
sync with head

Revision 1.255.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:36 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +38 -27 lines
Sync with HEAD.

Revision 1.265: download - view: text, markup, annotated - select for diffs
Sat May 24 18:14:24 2008 UTC (16 years, 6 months ago) by nakayama
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +3 -3 lines
s/log file system/log-structured file system/

Revision 1.264: download - view: text, markup, annotated - select for diffs
Tue May 20 16:26:04 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +5 -5 lines
Don't moan about LFS unless the mount succeeds.

Revision 1.263: download - view: text, markup, annotated - select for diffs
Sun May 18 13:56:12 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
CVS tags: hpcarm-cleanup-nbase
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +5 -2 lines
Until these get fixed or replaced:

WARNING: the foo file system is experimental and may be unstable

Revision 1.255.8.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:55 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +35 -27 lines
sync with head.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Fri May 16 09:22:01 2008 UTC (16 years, 7 months ago) by hannken
Branches: MAIN
CVS tags: yamt-pf42-base2
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +13 -11 lines
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.255.10.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:26:00 2008 UTC (16 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +24 -18 lines
sync with head.

Revision 1.261: download - view: text, markup, annotated - select for diffs
Sat May 10 02:26:10 2008 UTC (16 years, 7 months ago) by rumble
Branches: MAIN
CVS tags: yamt-nfs-mp-base2
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +19 -3 lines
Convert file systems to dynamically attach with the new module interface.
Make VFS hooks dynamic while we're here and say farewell to VFS_ATTACH and
VFS_HOOKS_ATTACH linksets.

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

Quick sanity check by ad@.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Tue May 6 18:43:45 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
Branch point for: wrstuden-revivesa
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +4 -7 lines
PR kern/38141 lookup/vfs_busy acquire rwlock recursively

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

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

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

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

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

Revision 1.259: download - view: text, markup, annotated - select for diffs
Wed Apr 30 12:49:17 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +7 -7 lines
PR kern/38135 vfs_busy/vfs_trybusy confusion

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

Revision 1.258: download - view: text, markup, annotated - select for diffs
Tue Apr 29 23:51:05 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +3 -4 lines
kern/38135 vfs_busy/vfs_trybusy confusion

The symptom was that sometimes file systems would occasionally not appear
in output from 'df' or 'mount' if the system was busy. Resolution:

- Make mount locks work somewhat like vm_map locks.
- vfs_trybusy() now only fails if the mount is gone, or if someone is
  unmounting the file system. Simple contention on mnt_lock doesn't
  cause it to fail.
- vfs_busy() will wait even if the file system is being unmounted.

Revision 1.257: download - view: text, markup, annotated - select for diffs
Tue Apr 29 18:18:09 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +3 -2 lines
PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

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

Revision 1.256: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:11 2008 UTC (16 years, 7 months ago) by martin
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.244.4.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:12 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.244.4.2: preferred, colored; branchpoint 1.244: preferred, colored; next MAIN 1.245: preferred, colored
Changes since revision 1.244.4.2: +10 -21 lines
sync with HEAD

Revision 1.246.4.4: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:07:29 2008 UTC (16 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.246.4.3: preferred, colored; branchpoint 1.246: preferred, colored; next MAIN 1.247: preferred, colored
Changes since revision 1.246.4.3: +84 -94 lines
Sync with HEAD.

Revision 1.183.2.9: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:25:06 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.8: preferred, colored; next MAIN 1.184: preferred, colored
Changes since revision 1.183.2.8: +10 -21 lines
sync with head.

Revision 1.255: download - view: text, markup, annotated - select for diffs
Wed Jan 30 11:47:04 2008 UTC (16 years, 10 months ago) by ad
Branches: 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
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +8 -8 lines
PR kern/37706 (forced unmount of file systems is unsafe):

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

Revision 1.254: download - view: text, markup, annotated - select for diffs
Mon Jan 28 14:31:20 2008 UTC (16 years, 10 months ago) by dholland
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +4 -2 lines
Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.

Revision 1.253: download - view: text, markup, annotated - select for diffs
Thu Jan 24 17:32:57 2008 UTC (16 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +2 -15 lines
specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

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

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

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

Revision 1.183.2.8: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:48:14 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.7: preferred, colored
Changes since revision 1.183.2.7: +79 -77 lines
sync with head

Revision 1.244.4.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:58:32 2008 UTC (16 years, 11 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.244.4.1: preferred, colored; branchpoint 1.244: preferred, colored
Changes since revision 1.244.4.1: +95 -93 lines
sync with HEAD

Revision 1.250.4.2: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:58:27 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.250.4.1: preferred, colored; branchpoint 1.250: preferred, colored; next MAIN 1.251: preferred, colored
Changes since revision 1.250.4.1: +74 -73 lines
Sync with HEAD

Revision 1.252: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:49:12 2008 UTC (16 years, 11 months ago) by ad
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +76 -75 lines
Merge vmlocking2 to head.

Revision 1.246.4.3: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:46:50 2007 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.246.4.2: preferred, colored; branchpoint 1.246: preferred, colored
Changes since revision 1.246.4.2: +5 -4 lines
Sync with HEAD.

Revision 1.249.2.5: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:40:02 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.249.2.4: preferred, colored; branchpoint 1.249: preferred, colored; next MAIN 1.250: preferred, colored
Changes since revision 1.249.2.4: +5 -4 lines
Sync with head.

Revision 1.249.2.4: download - view: text, markup, annotated - select for diffs
Wed Dec 19 21:27:18 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.249.2.3: preferred, colored; branchpoint 1.249: preferred, colored
Changes since revision 1.249.2.3: +28 -30 lines
Use a global lfs_lock.

Revision 1.249.2.3: download - view: text, markup, annotated - select for diffs
Wed Dec 19 19:16:45 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.249.2.2: preferred, colored; branchpoint 1.249: preferred, colored
Changes since revision 1.249.2.2: +3 -3 lines
Fix some more problems w/lfs on this branch.

Revision 1.249.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 19 00:02:02 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.249.2.1: preferred, colored; branchpoint 1.249: preferred, colored
Changes since revision 1.249.2.1: +19 -12 lines
Get lfs mostly working.

Revision 1.250.4.1: download - view: text, markup, annotated - select for diffs
Thu Dec 13 21:57:02 2007 UTC (17 years ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +3 -2 lines
Sync with HEAD

Revision 1.250.2.1: download - view: text, markup, annotated - select for diffs
Thu Dec 13 05:06:04 2007 UTC (17 years ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.250: preferred, colored; next MAIN 1.251: preferred, colored
Changes since revision 1.250: +3 -2 lines
sync with head.

Revision 1.251: download - view: text, markup, annotated - select for diffs
Wed Dec 12 02:56:04 2007 UTC (17 years ago) by lukem
Branches: MAIN
CVS tags: yamt-kmem-base3, vmlocking2-base3
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +3 -2 lines
defflag LFS_KERNEL_RFW (in opt_lfs.h).
Note: lfs_rfw.c doesn't compile if you define the option; locking API fallout?

Revision 1.244.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:54 2007 UTC (17 years ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.244.2.3: preferred, colored; branchpoint 1.244: preferred, colored; next MAIN 1.245: preferred, colored
Changes since revision 1.244.2.3: +4 -4 lines
Sync with HEAD.

Revision 1.250: download - view: text, markup, annotated - select for diffs
Sat Dec 8 19:29:56 2007 UTC (17 years ago) by pooka
Branches: MAIN
CVS tags: yamt-kmem-base2, yamt-kmem-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: yamt-kmem, bouyer-xeni386
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +4 -4 lines
Remove cn_lwp from struct componentname.  curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.

Revision 1.246.4.2: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:21:40 2007 UTC (17 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.246.4.1: preferred, colored; branchpoint 1.246: preferred, colored
Changes since revision 1.246.4.1: +17 -17 lines
Sync with HEAD.

Revision 1.183.2.7: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:35:21 2007 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.6: preferred, colored
Changes since revision 1.183.2.6: +17 -17 lines
sync with head

Revision 1.249.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 4 13:03:52 2007 UTC (17 years ago) by ad
Branches: vmlocking2
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +59 -63 lines
Pull the vmlocking changes into a new branch.

Revision 1.244.2.3: download - view: text, markup, annotated - select for diffs
Tue Nov 27 19:39:25 2007 UTC (17 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.244.2.2: preferred, colored; branchpoint 1.244: preferred, colored
Changes since revision 1.244.2.2: +17 -17 lines
Sync with HEAD. amd64 Xen support needs testing.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Mon Nov 26 19:02:31 2007 UTC (17 years ago) by pooka
Branches: MAIN
CVS tags: vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +16 -16 lines
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.246.2.2: download - view: text, markup, annotated - select for diffs
Thu Nov 22 15:18:27 2007 UTC (17 years ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.246.2.1: preferred, colored; branchpoint 1.246: preferred, colored; next MAIN 1.247: preferred, colored
Changes since revision 1.246.2.1: +3 -3 lines
Sync with HEAD

Revision 1.248: download - view: text, markup, annotated - select for diffs
Thu Nov 22 10:51:44 2007 UTC (17 years ago) by yamt
Branches: MAIN
CVS tags: bouyer-xenamd64-base
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +3 -3 lines
lfs_mountroot: use vfs_destroy.

Revision 1.246.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:49:37 2007 UTC (17 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +3 -3 lines
Sync with HEAD.

Revision 1.183.2.6: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:45:37 2007 UTC (17 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.5: preferred, colored
Changes since revision 1.183.2.5: +3 -3 lines
sync with head.

Revision 1.246.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:03:31 2007 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +3 -3 lines
Sync with HEAD

Revision 1.244.2.2: download - view: text, markup, annotated - select for diffs
Sun Nov 11 16:48:56 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.244.2.1: preferred, colored; branchpoint 1.244: preferred, colored
Changes since revision 1.244.2.1: +3 -3 lines
Sync with HEAD.

Revision 1.247: download - view: text, markup, annotated - select for diffs
Sat Nov 10 18:53:57 2007 UTC (17 years, 1 month ago) by rmind
Branches: MAIN
CVS tags: bouyer-xenamd64-base2
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +3 -3 lines
Use PRI_BIO for kthreads instead of PINOD.  Fixes a missed case of priority
inversion, which caused LFS to fire some assertions.

Reported by Kurt Schreiner on <current-users>.

Revision 1.244.4.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:35:20 2007 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +29 -29 lines
sync with HEAD

Revision 1.183.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:36:49 2007 UTC (17 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.4: preferred, colored
Changes since revision 1.183.2.4: +29 -29 lines
sync with head.

Revision 1.244.2.1: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:49:36 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +29 -29 lines
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.244.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:49:20 2007 UTC (17 years, 2 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.244: preferred, colored; next MAIN 1.245: preferred, colored
Changes since revision 1.244: +29 -29 lines
sync with head.

Revision 1.246: download - view: text, markup, annotated - select for diffs
Wed Oct 10 20:42:35 2007 UTC (17 years, 2 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +9 -9 lines
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.245: download - view: text, markup, annotated - select for diffs
Mon Oct 8 18:01:30 2007 UTC (17 years, 2 months ago) by ad
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +22 -22 lines
Merge ffs locking & brelse changes from the vmlocking branch.

Revision 1.231.4.13: download - view: text, markup, annotated - select for diffs
Sun Sep 16 19:02:48 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.12: preferred, colored; branchpoint 1.231: preferred, colored; next MAIN 1.232: preferred, colored
Changes since revision 1.231.4.12: +2 -3 lines
- 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.183.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:46:56 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.3: preferred, colored
Changes since revision 1.183.2.3: +57 -44 lines
sync with head.

Revision 1.224.4.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 07:05:21 2007 UTC (17 years, 3 months ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.224: preferred, colored; next MAIN 1.225: preferred, colored
Changes since revision 1.224: +20 -6 lines
Sync w/ NetBSD-4-RC_1

Revision 1.231.4.12: download - view: text, markup, annotated - select for diffs
Fri Aug 24 23:28:48 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.11: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.11: +9 -11 lines
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.231.4.11: download - view: text, markup, annotated - select for diffs
Tue Aug 21 22:32:27 2007 UTC (17 years, 3 months ago) by yamt
Branches: vmlocking
Diff to: previous 1.231.4.10: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.10: +4 -4 lines
fix some races around pagedaemon and uvm_wait.  ok'ed by Andrew Doran.

Revision 1.231.4.10: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:28:27 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.9: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.9: +14 -12 lines
Sync with HEAD.

Revision 1.231.4.9: download - view: text, markup, annotated - select for diffs
Sun Aug 19 19:25:01 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.8: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.8: +8 -9 lines
- Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).

Revision 1.240.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:51:15 2007 UTC (17 years, 4 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.240: preferred, colored; next MAIN 1.241: preferred, colored
Changes since revision 1.240: +11 -10 lines
Sync with HEAD.

Revision 1.244.8.2: download - view: text, markup, annotated - select for diffs
Tue Jul 31 21:14:21 2007 UTC (17 years, 4 months ago) by pooka
Branches: matt-mips64
Diff to: previous 1.244.8.1: preferred, colored; branchpoint 1.244: preferred, colored; next MAIN 1.245: preferred, colored
Changes since revision 1.244.8.1: +2101 -0 lines
* nuke the nameidata parameter from VFS_MOUNT().  Nobody on tech-kern
  knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods

Revision 1.244.8.1
Tue Jul 31 21:14:20 2007 UTC (17 years, 4 months ago) by pooka
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.244: +0 -2101 lines
file lfs_vfsops.c was added on branch matt-mips64 on 2007-07-31 21:14:21 +0000

Revision 1.244: download - view: text, markup, annotated - select for diffs
Tue Jul 31 21:14:20 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +7 -6 lines
* nuke the nameidata parameter from VFS_MOUNT().  Nobody on tech-kern
  knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods

Revision 1.243: download - view: text, markup, annotated - select for diffs
Sun Jul 29 13:31:15 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
CVS tags: hpcarm-cleanup
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +2 -3 lines
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.242: download - view: text, markup, annotated - select for diffs
Thu Jul 26 22:59:58 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +3 -3 lines
Use eopnotsupp() instead of vfs_stdsuspendctl() and retire the latter.

Revision 1.241: download - view: text, markup, annotated - select for diffs
Mon Jul 23 09:05:02 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +5 -4 lines
Workaround the ufs_haslock/ufs_ihash_lock deadlock. From a patch
posted by Blair Sadewitz.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Tue Jul 17 21:26:41 2007 UTC (17 years, 4 months ago) by christos
Branches: MAIN
CVS tags: nick-csl-alignment-base
Branch point for: nick-csl-alignment
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +4 -4 lines
Eliminate MFSNAMELEN

Revision 1.239: download - view: text, markup, annotated - select for diffs
Tue Jul 17 11:19:40 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +3 -3 lines
Make set_statvfs_info() take a parameter for the vfs name instead
of always retrieving it from mp->mnt_op->vfs_name

christos ok

Revision 1.231.4.8: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:28:18 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.7: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.7: +22 -26 lines
Sync with head.

Revision 1.238: download - view: text, markup, annotated - select for diffs
Thu Jul 12 19:35:36 2007 UTC (17 years, 5 months ago) by dsl
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +17 -14 lines
Change the VFS_MOUNT() interface so that the 'data' buffer passed to the
fs code is a kernel buffer, pass though the length of the buffer as well.
Since the length of the userspace buffer isn'it (yet) passed through the mount
system call, add a field to the vfsops structure containing the default length.
Split sys_mount() for calls from compat code.
Ride one of the recent kernel version changes - old fs LKMs will load, but
sys_mount() will reject any attempt to use them.

Revision 1.232.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:12:47 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.232: preferred, colored; next MAIN 1.233: preferred, colored
Changes since revision 1.232: +32 -23 lines
Sync with head.

Revision 1.237: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:11:34 2007 UTC (17 years, 5 months ago) by ad
Branches: MAIN
CVS tags: mjf-ufs-trans-base
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +4 -3 lines
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.236: download - view: text, markup, annotated - select for diffs
Sat Jun 30 09:37:54 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +8 -14 lines
Using POOL_INIT here makes no sense, since file systems always have
an init method.  So get rid of it and #ifdef _LKM and just always
init in the init method.  Give malloc types the same treatment.
Makes file systems nicer to work with in linksetless environments
and fixes a few LKM discrepancies.

Revision 1.231.4.7: download - view: text, markup, annotated - select for diffs
Sat Jun 23 18:06:06 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.6: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.6: +8 -12 lines
- 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.231.4.6: download - view: text, markup, annotated - select for diffs
Fri Jun 8 14:18:18 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.5: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.5: +20 -6 lines
Sync with head.

Revision 1.224.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 5 20:35:02 2007 UTC (17 years, 6 months ago) by bouyer
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.224: preferred, colored; next MAIN 1.225: preferred, colored
Changes since revision 1.224: +20 -6 lines
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.228.2.4: download - view: text, markup, annotated - select for diffs
Thu May 17 13:42:00 2007 UTC (17 years, 7 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.228.2.3: preferred, colored; next MAIN 1.229: preferred, colored
Changes since revision 1.228.2.3: +5 -5 lines
sync with head.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Wed May 16 19:11:38 2007 UTC (17 years, 7 months ago) by perseant
Branches: MAIN
CVS tags: yamt-idlelwp-base8
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +5 -5 lines
Change references to SEGM_W_DIROPS to SEGM_CKP, and replace the logic that
formerly used SEGM_W_DIROPS in lfs_segwrite() appropriately.  This prevents
a problem in which processes could get stuck in "buffers" sleep forever.

Revision 1.231.4.5: download - view: text, markup, annotated - select for diffs
Sun May 13 17:36:45 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.4: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.4: +27 -26 lines
- 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.228.2.3: download - view: text, markup, annotated - select for diffs
Mon May 7 10:56:17 2007 UTC (17 years, 7 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.228.2.2: preferred, colored
Changes since revision 1.228.2.2: +22 -8 lines
sync with head.

Revision 1.234: download - view: text, markup, annotated - select for diffs
Tue Apr 17 01:16:46 2007 UTC (17 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +22 -8 lines
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.231.4.4: download - view: text, markup, annotated - select for diffs
Tue Apr 10 12:07:14 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.3: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.3: +3 -3 lines
Nuke the deferred kthread creation stuff, as it's no longer needed.
Pointed out by thorpej@.

Revision 1.231.4.3: download - view: text, markup, annotated - select for diffs
Mon Apr 9 22:10:06 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.2: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.2: +4 -4 lines
- Add two new arguments to kthread_create1: pri_t pri, bool mpsafe.
- Fork kthreads off proc0 as new LWPs, not new processes.

Revision 1.228.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:56:17 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.228.2.1: preferred, colored
Changes since revision 1.228.2.1: +10 -10 lines
sync with head.

Revision 1.231.4.2: download - view: text, markup, annotated - select for diffs
Tue Mar 13 17:51:51 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231.4.1: preferred, colored; branchpoint 1.231: preferred, colored
Changes since revision 1.231.4.1: +56 -52 lines
Pull in the initial set of changes for the vmlocking branch.

Revision 1.231.4.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 16:52:07 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +10 -10 lines
Sync with head.

Revision 1.233: download - view: text, markup, annotated - select for diffs
Tue Mar 13 02:11:28 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
CVS tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +6 -6 lines
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.232: download - view: text, markup, annotated - select for diffs
Mon Mar 12 18:18:38 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Branch point for: mjf-ufs-trans
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +6 -6 lines
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.228.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:55:22 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +8 -8 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.183.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:12:21 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.2: preferred, colored
Changes since revision 1.183.2.2: +22 -19 lines
sync with head.

Revision 1.231: download - view: text, markup, annotated - select for diffs
Thu Feb 22 06:10:49 2007 UTC (17 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Branch point for: vmlocking
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +5 -5 lines
TRUE -> true, FALSE -> false

Revision 1.230: download - view: text, markup, annotated - select for diffs
Wed Feb 21 23:00:11 2007 UTC (17 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +4 -4 lines
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.229: download - view: text, markup, annotated - select for diffs
Sun Feb 18 14:26:52 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +3 -3 lines
Release ufs_hashlock before calling ungetnewvnode().

Revision 1.228: download - view: text, markup, annotated - select for diffs
Thu Feb 15 17:47:56 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +3 -2 lines
Destroy the fraglock on unmount.

Revision 1.227: download - view: text, markup, annotated - select for diffs
Thu Feb 15 15:40:54 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +13 -13 lines
Replace some uses of lockmgr() / simplelocks.

Revision 1.220.2.3: download - view: text, markup, annotated - select for diffs
Thu Feb 1 08:48:49 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.220.2.2: preferred, colored; branchpoint 1.220: preferred, colored; next MAIN 1.221: preferred, colored
Changes since revision 1.220.2.2: +3 -2 lines
Sync with head.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Fri Jan 19 14:49:12 2007 UTC (17 years, 10 months ago) by hannken
Branches: MAIN
CVS tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +3 -2 lines
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.220.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:25 2007 UTC (17 years, 11 months ago) by ad
Branches: newlock2
Diff to: previous 1.220.2.1: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.2.1: +4 -3 lines
Sync with head.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Thu Jan 4 16:55:30 2007 UTC (17 years, 11 months ago) by elad
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +4 -3 lines
Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.183.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:51:01 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183.2.1: preferred, colored
Changes since revision 1.183.2.1: +66 -531 lines
sync with head.

Revision 1.220.4.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:19:33 2006 UTC (18 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.220.4.1: preferred, colored; branchpoint 1.220: preferred, colored; next MAIN 1.221: preferred, colored
Changes since revision 1.220.4.1: +8 -8 lines
sync with head.

Revision 1.220.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:49 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +21 -13 lines
Sync with head.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:53 2006 UTC (18 years, 1 month ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +8 -8 lines
__unused removal on arguments; approved by core.

Revision 1.220.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:51 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +24 -16 lines
sync with head

Revision 1.223: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:32:51 2006 UTC (18 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +9 -7 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.222: download - view: text, markup, annotated - select for diffs
Wed Oct 4 15:56:46 2006 UTC (18 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +16 -11 lines
fix empty if

Revision 1.221: download - view: text, markup, annotated - select for diffs
Thu Sep 28 23:08:23 2006 UTC (18 years, 2 months ago) by perseant
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +3 -2 lines
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.192.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 03:00:01 2006 UTC (18 years, 3 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.192: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192: +128 -633 lines
sync with head

Revision 1.193.2.6: download - view: text, markup, annotated - select for diffs
Sun Sep 3 15:26:08 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.193.2.5: preferred, colored; branchpoint 1.193: preferred, colored; next MAIN 1.194: preferred, colored
Changes since revision 1.193.2.5: +7 -2 lines
sync with head.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Sat Sep 2 06:48:00 2006 UTC (18 years, 3 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +6 -2 lines
- add missing initializers
- comment out impossible code

Revision 1.219: download - view: text, markup, annotated - select for diffs
Fri Sep 1 19:41:28 2006 UTC (18 years, 3 months ago) by perseant
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +3 -2 lines
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.193.2.5: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:47:37 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.193.2.4: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.2.4: +42 -520 lines
sync with head

Revision 1.167.2.22: download - view: text, markup, annotated - select for diffs
Thu Aug 10 12:16:46 2006 UTC (18 years, 4 months ago) by tron
Branches: 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
Diff to: previous 1.167.2.21: preferred, colored; branchpoint 1.167: preferred, colored; next MAIN 1.168: preferred, colored
Changes since revision 1.167.2.21: +9 -26 lines
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.218: download - view: text, markup, annotated - select for diffs
Sun Jul 23 22:06:15 2006 UTC (18 years, 4 months ago) by ad
Branches: MAIN
CVS tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +8 -12 lines
Use the LWP cached credentials where sane.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Thu Jul 20 23:49:07 2006 UTC (18 years, 4 months ago) by perseant
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +10 -492 lines
Separate the (non-working) LFS kernel roll-forward code into its own file,
lfs_rfw.c.

Revision 1.213.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:50:13 2006 UTC (18 years, 5 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.213: preferred, colored; next MAIN 1.214: preferred, colored
Changes since revision 1.213: +28 -20 lines
Merge from HEAD.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Thu Jul 13 12:00:26 2006 UTC (18 years, 5 months ago) by martin
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +26 -17 lines
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.215: download - view: text, markup, annotated - select for diffs
Thu Jul 6 22:14:18 2006 UTC (18 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +3 -3 lines
Fix a typo that caused a "multiple free" panic on unmounting a resized lfs.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Thu Jun 29 19:28:21 2006 UTC (18 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +3 -4 lines
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.193.2.4: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:54:49 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.193.2.3: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.2.3: +3 -7 lines
sync with head.

Revision 1.183.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:12:39 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +146 -175 lines
sync with head.

Revision 1.212.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 04:11:44 2006 UTC (18 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.212: preferred, colored; next MAIN 1.213: preferred, colored
Changes since revision 1.212: +3 -7 lines
Sync with head.

Revision 1.192.4.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:39:43 2006 UTC (18 years, 6 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.192.4.1: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192.4.1: +51 -40 lines
Sync with head.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Wed May 24 21:08:00 2006 UTC (18 years, 6 months ago) by perseant
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +3 -7 lines
Read the inode version number fro a more reliable source, quelling a
diagnostic assertion panic.

Revision 1.193.6.3: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:48 2006 UTC (18 years, 6 months ago) by tron
Branches: peter-altq
Diff to: previous 1.193.6.2: preferred, colored; branchpoint 1.193: preferred, colored; next MAIN 1.194: preferred, colored
Changes since revision 1.193.6.2: +74 -125 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.193.2.3: download - view: text, markup, annotated - select for diffs
Wed May 24 10:59:25 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.193.2.2: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.2.2: +60 -42 lines
sync with head.

Revision 1.167.2.21: download - view: text, markup, annotated - select for diffs
Sat May 20 22:43:42 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.20: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.20: +13 -10 lines
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.167.2.20: download - view: text, markup, annotated - select for diffs
Sat May 20 22:42:50 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.19: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.19: +5 -2 lines
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.167.2.19: download - view: text, markup, annotated - select for diffs
Sat May 20 22:38:57 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.18: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.18: +20 -2 lines
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.167.2.18: download - view: text, markup, annotated - select for diffs
Sat May 20 22:31:44 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.17: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.17: +7 -5 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.205
Don't roll forward if we aren't given a process context.  Coverity CID 1076.

Revision 1.167.2.17: download - view: text, markup, annotated - select for diffs
Sat May 20 22:20:24 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.16: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.16: +3 -2 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.204 via patch
Coverity CID 2499: Fix uninitialize variable use.

Revision 1.167.2.16: download - view: text, markup, annotated - select for diffs
Sat May 20 22:15:20 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.15: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.15: +2 -81 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.203 via patch
Remove mostly useless BUFPAGES warning message from lfs_{un,}mount.

Revision 1.167.2.15: download - view: text, markup, annotated - select for diffs
Sat May 20 22:11:58 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.14: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.14: +3 -2 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs.h: revision 1.101
	sys/ufs/lfs/lfs_vfsops.c: revision 1.202
	sys/ufs/lfs/lfs_alloc.c: revision 1.88
Optimize the free list search a little more; in particular use words
instead of bytes for the index, and never search below fs->lfs_freehd.
Fix a bug in the previous version of the search (an erroneous assumption
that ino_t was signed).
Free the bitmap when we unmount the filesystem.

Revision 1.167.2.14: download - view: text, markup, annotated - select for diffs
Sat May 20 22:11:01 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.13: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.13: +4 -3 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.201
Correct a locking bug in the recent pager optimization.

Revision 1.167.2.13: download - view: text, markup, annotated - select for diffs
Sat May 20 22:10:29 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.12: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.12: +10 -5 lines
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.167.2.12: download - view: text, markup, annotated - select for diffs
Sat May 20 22:09:28 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.11: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.11: +5 -2 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_alloc.c: revision 1.87
	sys/ufs/lfs/lfs.h: revision 1.99
	sys/ufs/lfs/lfs_vfsops.c: revision 1.199
	sys/ufs/lfs/lfs_extern.h: revision 1.77 via patch
Keep the free list ordered.  This solves a problem first pointed out to me
by Michel Oey, in which an aged LFS writes up to an extra Ifile block for
every file created; and paves the way for the truncation of the Ifile when
many files are deleted.

Revision 1.167.2.11: download - view: text, markup, annotated - select for diffs
Sat May 20 22:02:06 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.10: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.10: +9 -3 lines
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.167.2.10: download - view: text, markup, annotated - select for diffs
Sat May 20 22:01:26 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.9: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.9: +5 -4 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.196
Double-checkpoint on unmount.  This ensures that vnodes belonging to removed
files are really freed, preventing occasional spurious EBUSY returns from
vflush().

Revision 1.167.2.9: download - view: text, markup, annotated - select for diffs
Sat May 20 21:59:47 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.8: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.8: +19 -3 lines
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.167.2.8: download - view: text, markup, annotated - select for diffs
Sat May 20 21:58:21 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.7: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.7: +3 -3 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_segment.c: revision 1.170
	sys/ufs/lfs/lfs.h: revision 1.96
	sys/ufs/lfs/lfs_vfsops.c: revision 1.194
	sys/ufs/lfs/lfs_syscalls.c: revision 1.109
From Konrad Schroeder, in response to strange df output on anoncvs.netbsd.org:
We were returning the wrong value for free space.  Now we're not.

Revision 1.167.2.7: download - view: text, markup, annotated - select for diffs
Sat May 20 21:55:43 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.6: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.6: +5 -4 lines
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.167.2.6: download - view: text, markup, annotated - select for diffs
Sat May 20 21:50:26 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.5: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.5: +14 -13 lines
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.167.2.5: download - view: text, markup, annotated - select for diffs
Sat May 20 21:18:49 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.4: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.4: +3 -2 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.180
	sys/ufs/lfs/lfs_syscalls.c: revision 1.106
	sys/ufs/lfs/lfs.h: revision 1.87
Keep track of the number of segments reclaimed, since the cleaner doesn't
do this anymore (it hasn't for quite some time).  Add a couple of conditional
debugging messages to indicate why segments are not cleaned, in the event
that lfs_segclean is used.
Make the LFCNSEGWAITALL fcntl work again.

Revision 1.167.2.4: download - view: text, markup, annotated - select for diffs
Sat May 20 21:15:45 2006 UTC (18 years, 6 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.167.2.3: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.3: +7 -3 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_vfsops.c: revision 1.179
Fill in the lfs_fsmnt field in the superblock when we mount the filesystem,
so fsck(8) can tell where it was last mounted.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Thu May 18 23:15:09 2006 UTC (18 years, 6 months ago) by perseant
Branches: MAIN
CVS tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +8 -20 lines
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.211: download - view: text, markup, annotated - select for diffs
Thu May 18 00:57:13 2006 UTC (18 years, 6 months ago) by perseant
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +2 -11 lines
Don't duplicate the LFS_STARVED_FOR_SEGS check (an oversight that came
in with rev 1.210).

Revision 1.210: download - view: text, markup, annotated - select for diffs
Sun May 14 21:32:45 2006 UTC (18 years, 7 months ago) by elad
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +21 -11 lines
integrate kauth.

Revision 1.209: download - view: text, markup, annotated - select for diffs
Fri May 12 23:36:11 2006 UTC (18 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +13 -10 lines
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.193.4.4: download - view: text, markup, annotated - select for diffs
Thu May 11 23:32:03 2006 UTC (18 years, 7 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.193.4.3: preferred, colored; branchpoint 1.193: preferred, colored; next MAIN 1.194: preferred, colored
Changes since revision 1.193.4.3: +30 -5 lines
sync with head

Revision 1.208: download - view: text, markup, annotated - select for diffs
Wed May 10 21:53:19 2006 UTC (18 years, 7 months ago) by mrg
Branches: MAIN
CVS tags: elad-kernelauth-base
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +4 -2 lines
quell GCC 4.1 uninitialised variable warnings.

XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..

Revision 1.193.4.3: download - view: text, markup, annotated - select for diffs
Sat May 6 23:32:58 2006 UTC (18 years, 7 months ago) by christos
Branches: elad-kernelauth
Diff to: previous 1.193.4.2: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.4.2: +3 -2 lines
- 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.207: download - view: text, markup, annotated - select for diffs
Thu May 4 04:22:57 2006 UTC (18 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +5 -2 lines
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.206: download - view: text, markup, annotated - select for diffs
Sun Apr 30 21:19:42 2006 UTC (18 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +20 -2 lines
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.192.4.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:40:26 2006 UTC (18 years, 7 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +52 -95 lines
Sync with head.

Revision 1.193.4.2: download - view: text, markup, annotated - select for diffs
Wed Apr 19 03:54:13 2006 UTC (18 years, 7 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.193.4.1: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.4.1: +46 -91 lines
sync with head.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Tue Apr 18 23:40:47 2006 UTC (18 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +7 -5 lines
Don't roll forward if we aren't given a process context.  Coverity CID 1076.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Sat Apr 15 05:19:08 2006 UTC (18 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +5 -4 lines
Coverity CID 2499: Fix uninitialize variable use.

Revision 1.193.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 11 11:55:59 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.193.2.1: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.2.1: +16 -85 lines
sync with head

Revision 1.203: download - view: text, markup, annotated - select for diffs
Mon Apr 10 23:51:50 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
CVS tags: yamt-pdpolicy-base4
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +2 -81 lines
Remove mostly useless BUFPAGES warning message from lfs_{un,}mount.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Mon Apr 10 21:20:19 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +3 -2 lines
Optimize the free list search a little more; in particular use words
instead of bytes for the index, and never search below fs->lfs_freehd.

Fix a bug in the previous version of the search (an erroneous assumption
that ino_t was signed).

Free the bitmap when we unmount the filesystem.

Revision 1.201: download - view: text, markup, annotated - select for diffs
Mon Apr 10 18:42:48 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +4 -3 lines
Correct a locking bug in the recent pager optimization.

Revision 1.200: download - view: text, markup, annotated - select for diffs
Sat Apr 8 00:26:34 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +10 -5 lines
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.199: download - view: text, markup, annotated - select for diffs
Sat Apr 8 00:16:56 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +5 -2 lines
Keep the free list ordered.  This solves a problem first pointed out to me
by Michel Oey, in which an aged LFS writes up to an extra Ifile block for
every file created; and paves the way for the truncation of the Ifile when
many files are deleted.

Revision 1.193.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 1 12:07:56 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +29 -6 lines
sync with head.

Revision 1.193.6.2: download - view: text, markup, annotated - select for diffs
Fri Mar 31 09:45:29 2006 UTC (18 years, 8 months ago) by tron
Branches: peter-altq
Diff to: previous 1.193.6.1: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.6.1: +13 -6 lines
Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.198: download - view: text, markup, annotated - select for diffs
Fri Mar 31 02:31:37 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
CVS tags: yamt-pdpolicy-base3
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +9 -3 lines
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.197: download - view: text, markup, annotated - select for diffs
Thu Mar 30 12:40:06 2006 UTC (18 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +3 -3 lines
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.196: download - view: text, markup, annotated - select for diffs
Tue Mar 28 23:57:41 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +5 -4 lines
Double-checkpoint on unmount.  This ensures that vnodes belonging to removed
files are really freed, preventing occasional spurious EBUSY returns from
vflush().

Revision 1.193.6.1: download - view: text, markup, annotated - select for diffs
Tue Mar 28 09:42:30 2006 UTC (18 years, 8 months ago) by tron
Branches: peter-altq
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +20 -4 lines
Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Mar 24 20:05:32 2006 UTC (18 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +19 -3 lines
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.194: download - view: text, markup, annotated - select for diffs
Fri Mar 17 23:21:01 2006 UTC (18 years, 9 months ago) by tls
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +3 -3 lines
From Konrad Schroeder, in response to strange df output on anoncvs.netbsd.org:
We were returning the wrong value for free space.  Now we're not.

Revision 1.193.4.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 01:39:12 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +11 -11 lines
Adapt to kernel authorization KPI.

Revision 1.190.2.2: download - view: text, markup, annotated - select for diffs
Wed Mar 1 09:28:51 2006 UTC (18 years, 9 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.190.2.1: preferred, colored; next MAIN 1.191: preferred, colored
Changes since revision 1.190.2.1: +3 -3 lines
sync with head.

Revision 1.193: download - view: text, markup, annotated - select for diffs
Tue Feb 21 04:32:39 2006 UTC (18 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +3 -3 lines
Use device_class() instead of accessing dv_class directly.

Revision 1.190.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 15 10:03:05 2006 UTC (18 years, 11 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +4 -11 lines
sync with head.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Sat Jan 14 17:41:17 2006 UTC (18 years, 11 months ago) by yamt
Branches: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +0 -1 lines
- unify ffs_blkatoff and lfs_blkatoff.
- remove ufs_ops::uo_blkatoff.
- add directory read-ahead code.  (disabled for now.)

Revision 1.191: download - view: text, markup, annotated - select for diffs
Wed Jan 4 10:13:06 2006 UTC (18 years, 11 months ago) by yamt
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +4 -10 lines
- add simple functions to allocate/free a buffer for i/o.
- make bufpool static.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:25:26 2005 UTC (19 years ago) by christos
Branches: MAIN
Branch point for: yamt-uio_vmspace
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +38 -34 lines
merge ktrace-lwp.

Revision 1.121.2.13: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:12:32 2005 UTC (19 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.12: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121.2.12: +338 -47 lines
Sync with HEAD. Here we go again...

Revision 1.189: download - view: text, markup, annotated - select for diffs
Wed Nov 2 12:39:14 2005 UTC (19 years, 1 month ago) by yamt
Branches: MAIN
CVS tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +12 -6 lines
merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.188.2.2: download - view: text, markup, annotated - select for diffs
Sat Oct 29 17:22:22 2005 UTC (19 years, 1 month ago) by yamt
Branches: yamt-vop
Diff to: previous 1.188.2.1: preferred, colored; branchpoint 1.188: preferred, colored; next MAIN 1.189: preferred, colored
Changes since revision 1.188.2.1: +6 -6 lines
use lfs_* directly rather than via ufs_ops.
suggested by Chuck Silvers.

Revision 1.188.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 20 03:00:30 2005 UTC (19 years, 1 month ago) by yamt
Branches: yamt-vop
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +12 -6 lines
adapt ufs.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Tue Sep 27 06:48:56 2005 UTC (19 years, 2 months ago) by yamt
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +7 -2 lines
introduce "ufs_ops" and use it for ITIMES.

Revision 1.187: download - view: text, markup, annotated - select for diffs
Fri Sep 23 12:10:34 2005 UTC (19 years, 2 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +4 -11 lines
Apply the NFS exports list rototill patch:

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

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

Revision 1.167.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 24 18:43:37 2005 UTC (19 years, 3 months ago) by riz
Branches: 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
Diff to: previous 1.167.2.2: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.2: +7 -6 lines
Pull up following revision(s) (requested by yamt in ticket #688):
	sys/miscfs/genfs/genfs_vnops.c: revision 1.98 via patch
	sys/ufs/ffs/ffs_vfsops.c: revision 1.165
	sys/ufs/lfs/lfs_extern.h: revision 1.69
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.20
	sys/nfs/nfs_node.c: revision 1.80
	sys/fs/smbfs/smbfs_node.c: revision 1.24
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.24
	sys/fs/msdosfs/msdosfs_denode.c: revision 1.8
	sys/miscfs/genfs/genfs_node.h: revision 1.6
	sys/ufs/lfs/lfs_vfsops.c: revision 1.183
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.86
	sys/fs/adosfs/advfsops.c: revision 1.23
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.31
- constify genfs_ops.
- use member designators.

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

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

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

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

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

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

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

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

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

Revision 1.186: download - view: text, markup, annotated - select for diffs
Tue Aug 23 08:05:13 2005 UTC (19 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +3 -3 lines
Don't overload MAXNAMLEN, use a separate constant for each filesystem type.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Fri Aug 19 02:04:09 2005 UTC (19 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +5 -4 lines
64 bit inode changes.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Sat Jul 23 12:18:41 2005 UTC (19 years, 4 months ago) by yamt
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +3 -2 lines
update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Tue Jun 28 09:30:38 2005 UTC (19 years, 5 months ago) by yamt
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +6 -6 lines
- constify genfs_ops.
- use member designators.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Thu Jun 9 02:19:59 2005 UTC (19 years, 6 months ago) by atatat
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +3 -4 lines
Properly fix the constipated lossage wrt -Wcast-qual and the sysctl
code.  I know it's not the prettiest code, but it seems to work rather
well in spite of itself.

Revision 1.181: download - view: text, markup, annotated - select for diffs
Sun May 29 21:25:24 2005 UTC (19 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +14 -13 lines
- sprinkle const
- avoid shadow variables.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Fri May 20 19:48:25 2005 UTC (19 years, 6 months ago) by perseant
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +3 -2 lines
Keep track of the number of segments reclaimed, since the cleaner doesn't
do this anymore (it hasn't for quite some time).  Add a couple of conditional
debugging messages to indicate why segments are not cleaned, in the event
that lfs_segclean is used.

Make the LFCNSEGWAITALL fcntl work again.

Revision 1.179: download - view: text, markup, annotated - select for diffs
Fri May 20 19:03:11 2005 UTC (19 years, 6 months ago) by perseant
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +7 -3 lines
Fill in the lfs_fsmnt field in the superblock when we mount the filesystem,
so fsck(8) can tell where it was last mounted.

Revision 1.167.2.2: download - view: text, markup, annotated - select for diffs
Wed May 18 04:00:42 2005 UTC (19 years, 6 months ago) by snj
Branches: netbsd-3
Diff to: previous 1.167.2.1: preferred, colored; branchpoint 1.167: preferred, colored
Changes since revision 1.167.2.1: +8 -3 lines
Pull up revision 1.178 (requested by perseant in ticket #311):
Don't let the pager_map deadlock avoidance code in lfs_putpages() write
segments containing zero-block FINFO records.  These records cause segments
to become uncleanable, which would eventually result in a "no clean segments"
panic.

Revision 1.146.2.1.2.1: download - view: text, markup, annotated - select for diffs
Tue May 10 05:08:58 2005 UTC (19 years, 7 months ago) by riz
Branches: 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
Diff to: previous 1.146.2.1: preferred, colored; next MAIN 1.147: preferred, colored
Changes since revision 1.146.2.1: +106 -43 lines
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.167.2.1: download - view: text, markup, annotated - select for diffs
Sat May 7 11:21:30 2005 UTC (19 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +296 -21 lines
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.178: download - view: text, markup, annotated - select for diffs
Wed May 4 04:58:22 2005 UTC (19 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +8 -3 lines
Don't let the pager_map deadlock avoidance code in lfs_putpages() write
segments containing zero-block FINFO records.  These records cause segments
to become uncleanable, which would eventually result in a "no clean segments"
panic.

Revision 1.162.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:39 2005 UTC (19 years, 7 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.162: preferred, colored; next MAIN 1.163: preferred, colored
Changes since revision 1.162: +652 -230 lines
sync with -current

Revision 1.177: download - view: text, markup, annotated - select for diffs
Sat Apr 23 19:47:51 2005 UTC (19 years, 7 months ago) by perseant
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +204 -4 lines
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.176: download - view: text, markup, annotated - select for diffs
Tue Apr 19 20:59:05 2005 UTC (19 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +9 -17 lines
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.175: download - view: text, markup, annotated - select for diffs
Sat Apr 16 18:10:12 2005 UTC (19 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +2 -3 lines
Remove left-over reference to "lfs_blist", for _LKM case.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Sat Apr 16 17:35:58 2005 UTC (19 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +4 -16 lines
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.173: download - view: text, markup, annotated - select for diffs
Thu Apr 14 00:44:17 2005 UTC (19 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +16 -2 lines
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.172: download - view: text, markup, annotated - select for diffs
Thu Apr 14 00:02:46 2005 UTC (19 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +5 -2 lines
Keep track of the highest block held by an LFS inode, so that we can
be assured that the last byte of a file is always allocated.  Previously
a file extension could cause the filesystem to be flushed, writing an
inconsistent inode to disk.  Although this condition would be corrected
the next time blocks were written to disk, an intervening crash would leave
the filesystem in an inconsistent state, leaving fsck_lfs to complain
of an inode "partially truncated".

Revision 1.171: download - view: text, markup, annotated - select for diffs
Fri Apr 8 00:08:42 2005 UTC (19 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +15 -18 lines
Clean up the handling of the pager_map deadlock in lfs_putpages, after
realizing that it is safe to sleep the second time through the loop.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Wed Apr 6 04:30:46 2005 UTC (19 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +65 -12 lines
Fix some locking issues that appeared with the simple_lock work.
Address a "pager_map" deadlock in lfs_putpages().

Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri Apr 1 21:59:46 2005 UTC (19 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +36 -7 lines
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.121.2.12: download - view: text, markup, annotated - select for diffs
Fri Apr 1 14:32:11 2005 UTC (19 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.11: preferred, colored
Changes since revision 1.121.2.11: +3 -2 lines
Sync with HEAD.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Tue Mar 29 02:41:06 2005 UTC (19 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +3 -2 lines
- Define a VFS_ATTACH() macro that places a reference to a vfsops structure
  into the "vfsops" link set.
- Use VFS_ATTACH() where vfsops are declared for individual file systems.
- In vfsinit(), traverse the "vfsops" link set, rather than vfs_list_initial[].

Revision 1.162.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:37:03 2005 UTC (19 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.162: preferred, colored; next MAIN 1.163: preferred, colored
Changes since revision 1.162: +364 -218 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.121.2.11: download - view: text, markup, annotated - select for diffs
Tue Mar 8 13:53:12 2005 UTC (19 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.10: preferred, colored
Changes since revision 1.121.2.10: +291 -209 lines
Sync with HEAD.

Revision 1.167: download - view: text, markup, annotated - select for diffs
Tue Mar 8 04:49:35 2005 UTC (19 years, 9 months ago) by simonb
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +58 -58 lines
Tab Police.

Revision 1.166: download - view: text, markup, annotated - select for diffs
Tue Mar 8 00:18:21 2005 UTC (19 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +196 -159 lines
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.165: download - view: text, markup, annotated - select for diffs
Fri Mar 4 22:19:05 2005 UTC (19 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +70 -25 lines
Move "ifile is too large for your NBUFS/BUFPAGES" messages into a function.
Use log(9) to warn the user instead of printf(9).  Since the theory is that
the Ifile is "always in cache", but the greater performance risk is
when the inode entries can't be held in cache, note these two cases
separately, at different log levels (notice and warning, respectively).

Revision 1.121.2.10: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:54:49 2005 UTC (19 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.9: preferred, colored
Changes since revision 1.121.2.9: +128 -64 lines
Sync with HEAD.

Hi Perry!

Revision 1.164: download - view: text, markup, annotated - select for diffs
Sat Feb 26 22:32:20 2005 UTC (19 years, 9 months ago) by perry
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +26 -26 lines
nuke trailing whitespace

Revision 1.163: download - view: text, markup, annotated - select for diffs
Sat Feb 26 05:40:42 2005 UTC (19 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +107 -43 lines
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.121.2.9: download - view: text, markup, annotated - select for diffs
Mon Jan 17 19:33:11 2005 UTC (19 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.8: preferred, colored
Changes since revision 1.121.2.8: +117 -81 lines
Sync with HEAD.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Tue Jan 11 00:19:36 2005 UTC (19 years, 11 months ago) by mycroft
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +16 -17 lines
Rearrange some code slightly to avoid uninitialized variable warnings.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Sun Jan 9 09:27:17 2005 UTC (19 years, 11 months ago) by mycroft
Branches: MAIN
CVS tags: kent-audio1-beforemerge
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +112 -68 lines
Whoops -- move the location of the VOP_OPEN()/VOP_CLOSE(), et al, from
foo_mountfs() to foo_mount(), to match the new mountroot API.
Also, for ext2fs and lfs, copy some restructuring from ffs to allow changing
file system parameters without specifying the device name.
(ntfs could use some more work.)

Revision 1.160: download - view: text, markup, annotated - select for diffs
Sun Jan 9 03:11:48 2005 UTC (19 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +2 -10 lines
Rework the mountroot interface so that vfs_mountroot() opens the root device
and just passes it on to the file system functions.  This avoids opening and
closing the device several times.

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

Revision 1.159: download - view: text, markup, annotated - select for diffs
Sun Jan 2 16:08:31 2005 UTC (19 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +3 -2 lines
Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.

Revision 1.121.2.8: download - view: text, markup, annotated - select for diffs
Wed Oct 27 06:24:02 2004 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.7: preferred, colored
Changes since revision 1.121.2.7: +3 -3 lines
Remove the struct lwp * arguments from qsync and ufs_checkpath that are
no longer (read: were never) required.

Revision 1.121.2.7: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:39:20 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.6: preferred, colored
Changes since revision 1.121.2.6: +39 -35 lines
Fix the sync with head I botched.

Revision 1.121.2.6: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:56:59 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.5: preferred, colored
Changes since revision 1.121.2.5: +35 -39 lines
Sync with HEAD.

Revision 1.121.2.5: download - view: text, markup, annotated - select for diffs
Wed Aug 25 06:59:14 2004 UTC (20 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.4: preferred, colored
Changes since revision 1.121.2.4: +9 -6 lines
Sync with HEAD.

Revision 1.121.2.4: download - view: text, markup, annotated - select for diffs
Tue Aug 24 17:57:53 2004 UTC (20 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.3: preferred, colored
Changes since revision 1.121.2.3: +8 -8 lines
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.158: download - view: text, markup, annotated - select for diffs
Mon Aug 16 12:49:55 2004 UTC (20 years, 4 months ago) by mycroft
Branches: MAIN
CVS tags: kent-audio1-base, kent-audio1
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +4 -2 lines
Make sure to set IMNT_DTYPE here...

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sun Aug 15 16:07:08 2004 UTC (20 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +3 -2 lines
Need to set um_dirblksiz here...

Revision 1.156: download - view: text, markup, annotated - select for diffs
Sun Aug 15 07:19:58 2004 UTC (20 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +5 -5 lines
Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Sat Aug 14 01:08:06 2004 UTC (20 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +3 -3 lines
Add a new flag, IN_MODIFY.  This is like IN_UPDATE|IN_CHANGE, but unlike
setting those flags, it does not cause the inode to be written in the periodic
sync.  This is used for writes to special files (devices and named pipes) and
FIFOs.

Do not preemptively sync updates to access times and modification times.  They
are now updated in the inode only opportunistically, or when the file or device
is closed.  (Really, it should be delayed beyond close, but this is enough to
help substantially with device nodes.)

And the most amusing part:
Trickle sync was broken on both FFS and ext2fs, in different ways.  In FFS, the
periodic call to VFS_SYNC(MNT_LAZY) was still causing all file data to be
synced.  In ext2fs, it was causing the metadata to *not* be synced.  We now
only call VOP_UPDATE() on the node if we're doing MNT_LAZY.  I've confirmed
that we do in fact trickle correctly now.

Revision 1.121.2.3: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:56:58 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.2: preferred, colored
Changes since revision 1.121.2.2: +183 -164 lines
Sync with HEAD

Revision 1.154: download - view: text, markup, annotated - select for diffs
Mon Jul 5 07:28:46 2004 UTC (20 years, 5 months ago) by pk
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +3 -3 lines
Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun May 30 20:45:44 2004 UTC (20 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +3 -4 lines
lfs_gop_write: assert that ifile never come here.

Revision 1.146.2.1: download - view: text, markup, annotated - select for diffs
Sat May 29 09:05:04 2004 UTC (20 years, 6 months ago) by tron
Branches: netbsd-2-0
CVS tags: netbsd-2-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
Branch point for: netbsd-2
Diff to: previous 1.146: preferred, colored; next MAIN 1.147: preferred, colored
Changes since revision 1.146: +7 -5 lines
Pull up revision 1.151 (requested by atatat in ticket #393):
Sysctl descriptions under vfs subtree

Revision 1.152: download - view: text, markup, annotated - select for diffs
Tue May 25 14:55:46 2004 UTC (20 years, 6 months ago) by hannken
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -2 lines
Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

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

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue May 25 04:44:44 2004 UTC (20 years, 6 months ago) by atatat
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +7 -5 lines
Sysctl descriptions under vfs subtree

Revision 1.150: download - view: text, markup, annotated - select for diffs
Thu May 20 05:39:35 2004 UTC (20 years, 6 months ago) by atatat
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +9 -3 lines
Explicitly call pool_init() (and pool_destroy()) when being built as
an _LKM.

This adds pools to the list of things that lkms must do manually
because they're set up with link sets.  Not that there's anything
wrong with link sets, but that we need to try harder to remember that
lkms are second class citizens.  Of a sort.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Sun Apr 25 16:42:44 2004 UTC (20 years, 7 months ago) by simonb
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +11 -14 lines
Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Thu Apr 22 10:45:56 2004 UTC (20 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -3 lines
lfs_statvfs: report f_frsize correctly.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Wed Apr 21 01:05:44 2004 UTC (20 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +21 -14 lines
Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Sat Mar 27 04:43:44 2004 UTC (20 years, 8 months ago) by atatat
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +8 -2 lines
Manually attach malloc types when being built as an lkm.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Wed Mar 24 15:34:56 2004 UTC (20 years, 8 months ago) by atatat
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +12 -7 lines
Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Thu Feb 26 22:56:55 2004 UTC (20 years, 9 months ago) by oster
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -2 lines
Add a missing:

 	pool_destroy(&lfs_dinode_pool);

to lfs_done().

Approved-by: yamt

Revision 1.143: download - view: text, markup, annotated - select for diffs
Wed Jan 28 20:57:15 2004 UTC (20 years, 10 months ago) by he
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +5 -5 lines
Let the cast to (long long) for using the result as a printf argument
apply to the whole expression, not just the first factor.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Wed Jan 28 10:54:23 2004 UTC (20 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +3 -3 lines
use bufmem instead of bufpages to make lfs a little less broken.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Thu Dec 4 19:38:25 2003 UTC (21 years ago) by atatat
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +46 -28 lines
Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Fri Nov 7 17:55:29 2003 UTC (21 years, 1 month ago) by yamt
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +19 -78 lines
- tweak lfs_update_single()'s prototype so that it can be used by
  roll-forward code.
- reduce code duplication using the above in update_meta()
  this also fixes fragment accounting.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Fri Nov 7 14:52:28 2003 UTC (21 years, 1 month ago) by yamt
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +7 -4 lines
fix spec vnode aliasing.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Fri Nov 7 14:50:18 2003 UTC (21 years, 1 month ago) by yamt
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +45 -15 lines
- tell filesize changes to vm when roll-forwarding data blocks.
- handle fragment extension better during roll-forward.
- related assertions.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Thu Oct 30 01:43:10 2003 UTC (21 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +5 -8 lines
Remove some assigned-to but otherwise unused variables.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sat Oct 25 18:26:46 2003 UTC (21 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +4 -4 lines
Fix uninitialized variable warnings.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Tue Oct 14 14:02:56 2003 UTC (21 years, 2 months ago) by dbj
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +3 -3 lines
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.134: download - view: text, markup, annotated - select for diffs
Tue Oct 14 13:51:51 2003 UTC (21 years, 2 months ago) by yamt
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +4 -2 lines
add a prototype of check_segsum().

Revision 1.133: download - view: text, markup, annotated - select for diffs
Tue Oct 14 13:46:30 2003 UTC (21 years, 2 months ago) by yamt
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +13 -12 lines
when roll-forwarding, check segment serial numbers correctly.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Tue Oct 14 12:52:28 2003 UTC (21 years, 2 months ago) by yamt
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +3 -3 lines
add a missing fsbtodb() to read a correct block for roll-forwarding.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Sun Sep 7 21:00:36 2003 UTC (21 years, 3 months ago) by yamt
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +9 -2 lines
comments on lfs_issequential_hole.

Revision 1.121.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 19 19:53:50 2003 UTC (21 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.121.2.1: preferred, colored
Changes since revision 1.121.2.1: +4 -4 lines
LWPify

Revision 1.130: download - view: text, markup, annotated - select for diffs
Thu Aug 7 16:34:39 2003 UTC (21 years, 4 months ago) by agc
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +3 -7 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

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

Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Jul 23 13:46:57 2003 UTC (21 years, 4 months ago) by yamt
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +6 -4 lines
add parenthesis missed in rev.1.127.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Jul 23 13:44:55 2003 UTC (21 years, 4 months ago) by yamt
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +3 -2 lines
whitespace

Revision 1.127: download - view: text, markup, annotated - select for diffs
Wed Jul 23 13:38:18 2003 UTC (21 years, 4 months ago) by yamt
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +5 -2 lines
add KASSERTs in lfs_issequential_hole.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Sat Jul 12 16:19:00 2003 UTC (21 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +5 -4 lines
more MP locks.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Sat Jul 12 16:17:08 2003 UTC (21 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +6 -9 lines
- protect global resource counts with lfs_subsys_lock.
- clean up scattered externs a little.

Revision 1.121.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:27:25 2003 UTC (21 years, 5 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +43 -39 lines
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.124: download - view: text, markup, annotated - select for diffs
Wed Jul 2 13:43:05 2003 UTC (21 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +5 -5 lines
use queue.h macros.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Wed Jul 2 13:41:38 2003 UTC (21 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +4 -4 lines
use VFSTOUFS macro.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Jul 2 13:40:53 2003 UTC (21 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +6 -10 lines
- add a new functions, lfs_writer_enter/leave, and use them instead of
  duplicated code fragments.
- add an assertion.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:32:41 2003 UTC (21 years, 5 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +35 -39 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Sun Jun 29 18:43:46 2003 UTC (21 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +8 -8 lines
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.119: download - view: text, markup, annotated - select for diffs
Sat Jun 28 22:53:35 2003 UTC (21 years, 5 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +4 -4 lines
Adapt for struct proc* -> struct lwp* changes.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:22:27 2003 UTC (21 years, 5 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +43 -39 lines
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.117: download - view: text, markup, annotated - select for diffs
Sun May 18 12:59:06 2003 UTC (21 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +33 -11 lines
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.116: download - view: text, markup, annotated - select for diffs
Tue Apr 29 17:45:11 2003 UTC (21 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +8 -4 lines
Restrict the run of cluster blocks to on-disk contiguous blocks (back out
part of rev 1.115), to avoid writing over holes.  This is the lesser of two
evils, to be replaced soon.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Apr 23 07:20:38 2003 UTC (21 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +41 -47 lines
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.114: download - view: text, markup, annotated - select for diffs
Wed Apr 16 21:44:27 2003 UTC (21 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +5 -15 lines
PR/1796: John Kohl: statfs misbehaves under chrooted environments.

- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Wed Apr 2 10:39:42 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +74 -47 lines
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.112: download - view: text, markup, annotated - select for diffs
Fri Mar 28 08:03:38 2003 UTC (21 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +14 -6 lines
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.111: download - view: text, markup, annotated - select for diffs
Fri Mar 21 23:11:30 2003 UTC (21 years, 8 months ago) by dsl
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +5 -5 lines
Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).

Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Mar 21 06:26:37 2003 UTC (21 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -3 lines
KNF (space after keywords).

Revision 1.109: download - view: text, markup, annotated - select for diffs
Fri Mar 21 06:16:55 2003 UTC (21 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +12 -11 lines
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.108: download - view: text, markup, annotated - select for diffs
Fri Mar 21 06:09:08 2003 UTC (21 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +6 -6 lines
make this compilable with DIAGNOSTIC and without DEBUG.
fix PR 20827 from FUKAUMI Naoki.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Thu Mar 20 14:11:47 2003 UTC (21 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +72 -30 lines
fix "more than one fragment" panics;
direct and indirect block pointers are not valid in the case of shortlinks.
while i'm here, move duplicated code in lfs_vget/fastvget into a new
function, lfs_vinit.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Tue Mar 18 07:53:56 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +3 -2 lines
Remember to destroy lfs_inoext_pool when closing up the LFS subsystem.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sat Mar 15 06:58:51 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +3 -2 lines
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.104: download - view: text, markup, annotated - select for diffs
Sat Mar 8 21:46:06 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -12 lines
Take away "#ifdef LFS_UBC".

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sat Mar 8 02:55:49 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +13 -7 lines
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.102: download - view: text, markup, annotated - select for diffs
Sun Mar 2 04:34:31 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +25 -14 lines
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.101: download - view: text, markup, annotated - select for diffs
Sat Mar 1 11:20:21 2003 UTC (21 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -3 lines
use pid_t for pid.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Sat Mar 1 05:07:52 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -3 lines
Be careful to always zero pages on truncation/fragment extension,
in the case where the filesystem block size is larger than PAGE_SIZE.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Feb 25 20:35:40 2003 UTC (21 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +4 -6 lines
Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
use it.  This fixes a few places where either b_dep or b_interlock were
not properly initialized.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue Feb 25 13:47:44 2003 UTC (21 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +2 -4 lines
fix simplelocks

Revision 1.97: download - view: text, markup, annotated - select for diffs
Sun Feb 23 00:22:34 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +17 -20 lines
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.96: download - view: text, markup, annotated - select for diffs
Thu Feb 20 04:27:25 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +24 -24 lines
Tabify, and fix some comment alignment problems.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Wed Feb 19 12:49:10 2003 UTC (21 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -3 lines
workaround for "another flush is..." infinity loop in writerd.
if we're writerd, sleep in lfs_flush until another writer goes away
instead of busy loop in writed.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Wed Feb 19 12:22:51 2003 UTC (21 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +8 -3 lines
wire the pages instead of just dequeue'ing them.
advised by Chuck Silvers.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Feb 19 12:18:59 2003 UTC (21 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -3 lines
init b_interlock.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Wed Feb 19 12:01:17 2003 UTC (21 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -2 lines
init b_interlock.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Mon Feb 17 23:48:21 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +415 -19 lines
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.90: download - view: text, markup, annotated - select for diffs
Wed Jan 29 13:14:36 2003 UTC (21 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +6 -7 lines
don't use daddr_t for segment summary since it's an on-disk structure.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Mon Jan 27 23:17:57 2003 UTC (21 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +24 -23 lines
make these compilable with lfs debug options.
(follow daddr_t change)

XXX maybe segment number should be 64bit.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sat Jan 25 23:00:09 2003 UTC (21 years, 10 months ago) by kleink
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +4 -3 lines
Fix further printf format warnings for DEBUG, in the wake of daddr_t
having changed.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sat Jan 25 18:12:33 2003 UTC (21 years, 10 months ago) by tron
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +3 -3 lines
Use PRId64 instead of hard coding "%lld" to fix build problems under
LP64 ports.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Sat Jan 25 12:58:23 2003 UTC (21 years, 10 months ago) by tron
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -3 lines
Fix printf() format strings problems caused by "daddr_t" change.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri Jan 24 21:55:29 2003 UTC (21 years, 10 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +24 -17 lines
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.64.2.15: download - view: text, markup, annotated - select for diffs
Wed Jan 15 18:59:04 2003 UTC (21 years, 11 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.64.2.14: preferred, colored; branchpoint 1.64: preferred, colored; next MAIN 1.65: preferred, colored
Changes since revision 1.64.2.14: +4 -5 lines
Sync with HEAD.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun Jan 12 13:04:52 2003 UTC (21 years, 11 months ago) by yamt
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -5 lines
- zerofill struct lfs when allocating it.
- use M_ZERO instead of memset after malloc.

Revision 1.64.2.14: download - view: text, markup, annotated - select for diffs
Wed Dec 11 06:51:45 2002 UTC (22 years ago) by thorpej
Branches: nathanw_sa
Diff to: previous 1.64.2.13: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.13: +1 -1 lines
Sync with HEAD.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Nov 24 08:37:43 2002 UTC (22 years ago) by yamt
Branches: MAIN
CVS tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -3 lines
lfs_sync should wait at lfs_writer, not lfs_dirops.
PR 18973.

Revision 1.64.2.13: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:45:53 2002 UTC (22 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.12: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.12: +10 -2 lines
Catch up to -current.

Revision 1.65.4.6: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:44:57 2002 UTC (22 years, 2 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.65.4.5: preferred, colored; branchpoint 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65.4.5: +14 -5 lines
sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Sep 27 15:38:07 2002 UTC (22 years, 2 months ago) by provos
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +4 -4 lines
remove trailing \n in panic().  approved perry.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sat Sep 21 18:14:50 2002 UTC (22 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +10 -2 lines
MNT_GETARGS support

Revision 1.64.2.12: download - view: text, markup, annotated - select for diffs
Tue Sep 17 21:24:00 2002 UTC (22 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.11: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.11: +2 -1 lines
Catch up to -current.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Fri Sep 6 13:18:43 2002 UTC (22 years, 3 months ago) by gehenna
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +4 -3 lines
Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.65.4.5: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:50:19 2002 UTC (22 years, 3 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.65.4.4: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.4.4: +14 -6 lines
sync kqueue branch with HEAD

Revision 1.74.2.5: download - view: text, markup, annotated - select for diffs
Thu Aug 29 00:57:04 2002 UTC (22 years, 3 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.74.2.4: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74.2.4: +5 -5 lines
catch up with -current.

Revision 1.64.2.11: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:47:05 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.10: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.10: +14 -6 lines
Catch up to -current.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Jul 30 07:40:16 2002 UTC (22 years, 4 months ago) by soren
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -5 lines
Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.

Revision 1.64.2.10: download - view: text, markup, annotated - select for diffs
Mon Jul 15 20:54:17 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.9: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.9: +3 -4 lines
Whitespace.

Revision 1.74.2.4: download - view: text, markup, annotated - select for diffs
Mon Jul 15 10:37:29 2002 UTC (22 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.74.2.3: preferred, colored
Changes since revision 1.74.2.3: +11 -3 lines
catch up with -current.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sat Jul 6 01:30:14 2002 UTC (22 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +11 -3 lines
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.64.2.9: download - view: text, markup, annotated - select for diffs
Mon Jun 24 22:12:37 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.8: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.8: +4 -4 lines
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.65.4.4: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:52:13 2002 UTC (22 years, 5 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.65.4.3: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.4.3: +90 -24 lines
catch up with -current on kqueue branch

Revision 1.74.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 20 15:53:12 2002 UTC (22 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.74.2.2: preferred, colored
Changes since revision 1.74.2.2: +3 -5 lines
catch up with -current.

Revision 1.76.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:52:11 2002 UTC (22 years, 5 months ago) by lukem
Branches: 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
Diff to: previous 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76: +3 -5 lines
Pull up revision 1.77 (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.64.2.8: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:50:34 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.7: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.7: +90 -24 lines
Catch up to -current.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sun Jun 16 00:13:16 2002 UTC (22 years, 6 months ago) by perseant
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -5 lines
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.74.2.2: download - view: text, markup, annotated - select for diffs
Thu May 30 13:52:43 2002 UTC (22 years, 6 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.74.2.1: preferred, colored
Changes since revision 1.74.2.1: +5 -4 lines
Catch up with -current.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri May 17 21:42:38 2002 UTC (22 years, 7 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3 lines
use macros from <sys/queue.h>

Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Thu May 16 03:48:08 2002 UTC (22 years, 7 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +4 -3 lines
Use devsw APIs for checking validity of major numbers.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Thu May 16 02:23:55 2002 UTC (22 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +4 -3 lines
Fix LP64 printf format warning.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue May 14 20:03:54 2002 UTC (22 years, 7 months ago) by perseant
Branches: MAIN
Branch point for: gehenna-devsw
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +87 -19 lines
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.73: download - view: text, markup, annotated - select for diffs
Sun May 12 23:06:29 2002 UTC (22 years, 7 months ago) by matt
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -3 lines
Eliminate commons.

Revision 1.64.2.7: download - view: text, markup, annotated - select for diffs
Mon Apr 1 07:49:17 2002 UTC (22 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.6: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.6: +3 -4 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.65.4.3: download - view: text, markup, annotated - select for diffs
Sat Mar 16 16:02:25 2002 UTC (22 years, 9 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.65.4.2: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.4.2: +3 -4 lines
Catch up with -current.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Mar 8 20:48:46 2002 UTC (22 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: newlock-base, newlock, eeh-devprop-base, eeh-devprop
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -4 lines
Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.65.4.2: download - view: text, markup, annotated - select for diffs
Thu Jan 10 20:05:16 2002 UTC (22 years, 11 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.65.4.1: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.4.1: +56 -43 lines
Sync kqueue branch with -current.

Revision 1.64.2.6: download - view: text, markup, annotated - select for diffs
Tue Jan 8 00:34:55 2002 UTC (22 years, 11 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.5: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.5: +45 -37 lines
Catch up to -current.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Dec 18 07:51:18 2001 UTC (22 years, 11 months ago) by chs
Branches: MAIN
CVS tags: ifpoll-base
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +10 -2 lines
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.70: download - view: text, markup, annotated - select for diffs
Fri Nov 23 21:44:28 2001 UTC (23 years ago) by chs
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +38 -38 lines
add spaces for KNF.  confirmed to produce identical objects.

Revision 1.64.2.5: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:19:00 2001 UTC (23 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.4: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.4: +4 -1 lines
Catch up to -current.

Revision 1.68.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 12 21:19:49 2001 UTC (23 years, 1 month ago) by thorpej
Branches: thorpej-mips-cache
Diff to: previous 1.68: preferred, colored; next MAIN 1.69: preferred, colored
Changes since revision 1.68: +4 -1 lines
Sync the thorpej-mips-cache branch with -current.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Nov 8 02:39:13 2001 UTC (23 years, 1 month ago) by lukem
Branches: MAIN
CVS tags: thorpej-mips-cache-base
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +4 -1 lines
add RCSID

Revision 1.66.2.3: download - view: text, markup, annotated - select for diffs
Mon Oct 1 12:48:29 2001 UTC (23 years, 2 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.66.2.2: preferred, colored; branchpoint 1.66: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66.2.2: +9 -7 lines
Catch up with -current.

Revision 1.66.2.2: download - view: text, markup, annotated - select for diffs
Wed Sep 26 15:28:27 2001 UTC (23 years, 2 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.66.2.1: preferred, colored; branchpoint 1.66: preferred, colored
Changes since revision 1.66.2.1: +18 -6 lines
* add a VCLONED vnode flag that indicates a vnode representing a cloned
  device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
  to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
  clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
  to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
  clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
  to the specinfo of a cloned vnode. could possibly redirect getattr to
  the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
  original device, and reassociates it with the specified dev_t. to be
  used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
  to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
  when debugging race conditions that still exist wrt. locking and
  revoking vnodes.
* make the locking state of a vnode consistent when passed to
  d_open and d_close (unlocked). locked would be better, but has
  some deadlock issues

Revision 1.64.2.4: download - view: text, markup, annotated - select for diffs
Fri Sep 21 22:37:07 2001 UTC (23 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.3: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.3: +9 -7 lines
Catch up to -current.

Revision 1.66.2.1: download - view: text, markup, annotated - select for diffs
Tue Sep 18 19:14:02 2001 UTC (23 years, 2 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -2 lines
Various changes to make cloning devices possible:

	* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
	  not NULL, specfs will create a cloned (aliased) vnode during
	  the call, and return it there. The caller should release and
	  unlock the original vnode if a new vnode was returned. The
	  new vnode is returned locked.

	* Add a flag field to the cdevsw and bdevsw structures.
	  DF_CLONING indicates that it wants a new vnode for each
	  open (XXX is there a better way? devprop?)

	* If a device is cloning, always call the close entry
	  point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Sep 15 20:36:43 2001 UTC (23 years, 3 months ago) by chs
Branches: MAIN
CVS tags: thorpej-devvp-base3, thorpej-devvp-base2, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +2 -7 lines
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.67: download - view: text, markup, annotated - select for diffs
Sat Sep 15 16:13:05 2001 UTC (23 years, 3 months ago) by chs
Branches: MAIN
CVS tags: pre-chs-ubcperf
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +8 -1 lines
add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

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

Revision 1.64.2.3: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:13:29 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.2: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.2: +294 -197 lines
Catch up with -current.

Revision 1.65.4.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:14:09 2001 UTC (23 years, 4 months ago) by lukem
Branches: kqueue
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +294 -197 lines
update to -current

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Jul 13 20:30:25 2001 UTC (23 years, 5 months ago) by perseant
Branches: MAIN
CVS tags: thorpej-devvp-base
Branch point for: thorpej-devvp
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +294 -197 lines
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.65.2.4: download - view: text, markup, annotated - select for diffs
Mon Jul 2 17:48:20 2001 UTC (23 years, 5 months ago) by perseant
Branches: perseant-lfsv2
Diff to: previous 1.65.2.3: preferred, colored; branchpoint 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65.2.3: +95 -65 lines
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.65.2.3: download - view: text, markup, annotated - select for diffs
Fri Jun 29 06:00:40 2001 UTC (23 years, 5 months ago) by perseant
Branches: perseant-lfsv2
Diff to: previous 1.65.2.2: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.2.2: +3 -4 lines
fix comment in light of roll_id

Revision 1.65.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 29 03:56:42 2001 UTC (23 years, 5 months ago) by perseant
Branches: perseant-lfsv2
Diff to: previous 1.65.2.1: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.2.1: +11 -44 lines
Get rid of __P(), protoizing where it had not already been done

Revision 1.65.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 27 03:49:40 2001 UTC (23 years, 5 months ago) by perseant
Branches: perseant-lfsv2
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +211 -110 lines
Import of what I've been calling "LFSv2", that is, LFS with some features
added that require changes to the on-disk data structures.  These include:

- 64-bit time in everything but inodes
- User-specified segment offset, and segment size no longer
  restricted to PO2.
- Serial number on segment summaries in addition to timestamp, and
  a new volume identifier, to make roll-forward feasible without
  fear of finding old data and thinking it was new.

Although I think this version works at least as well as what's on the trunk,
we're not done yet; hence this commit is going in on a branch and not on
the trunk.  Enhancements that are not here yet include fragment addressing,
like FFS does, instead of block addressing.

Revision 1.64.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 21 20:10:12 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64.2.1: preferred, colored; branchpoint 1.64: preferred, colored
Changes since revision 1.64.2.1: +2 -2 lines
Catch up to -current.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed May 30 11:57:19 2001 UTC (23 years, 6 months ago) by mrg
Branches: MAIN
CVS tags: perseant-lfsv2-base
Branch point for: perseant-lfsv2, kqueue
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +2 -2 lines
use _KERNEL_OPT

Revision 1.64.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 5 22:50:08 2001 UTC (23 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +4 -3 lines
Initial commit of scheduler activations and lightweight process support.

Revision 1.39.2.5: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:17:43 2001 UTC (23 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.39.2.4: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.4: +6 -5 lines
Sync with HEAD.

Revision 1.52.4.3: download - view: text, markup, annotated - select for diffs
Sat Feb 3 21:55:41 2001 UTC (23 years, 10 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Diff to: previous 1.52.4.2: preferred, colored; branchpoint 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52.4.2: +14 -2 lines
Pull up revision 1.59 (requested by perseant):
  o Initialize cleaner info from superblock, making fsck_lfs'
    accounting of lfs_nclean work.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Jan 26 07:59:23 2001 UTC (23 years, 10 months ago) by itohy
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +2 -1 lines
Call inittodr() from lfs_mountroot() so that the system time is set properly
when booted from LFS.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Mon Jan 22 12:17:43 2001 UTC (23 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +5 -5 lines
make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const

Revision 1.39.2.4: download - view: text, markup, annotated - select for diffs
Fri Dec 8 09:20:15 2000 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.39.2.3: preferred, colored
Changes since revision 1.39.2.3: +534 -5 lines
Sync with HEAD.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Dec 3 07:34:49 2000 UTC (24 years ago) by perseant
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -1 lines
Call uvm_vmp_setsize() in lfs_{fast,}vget to set initial vnode size.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Dec 3 05:27:51 2000 UTC (24 years ago) by chs
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -1 lines
don't forget to set um_lognindir (now required by ufs_bmaparray()).

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Nov 27 03:33:57 2000 UTC (24 years ago) by perseant
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +532 -6 lines
If LFS_DO_ROLLFORWARD is defined, roll forward from the older checkpoint
on mount, through the newer checkpoint and on through any newer
partial-segments that may have been written but not checkpointed because
of an intervening crash.

LFS_DO_ROLLFORWARD is not defined by default.

Revision 1.39.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:06:53 2000 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.39.2.2: preferred, colored
Changes since revision 1.39.2.2: +14 -2 lines
Sync with HEAD.

Revision 1.39.2.2: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:11:51 2000 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.39.2.1: preferred, colored
Changes since revision 1.39.2.1: +85 -81 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Nov 14 00:42:55 2000 UTC (24 years, 1 month ago) by perseant
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +14 -2 lines
Initialize the cleaner information in the Ifile from the same info from
the superblock at fs mount time, enabling the previous patch to fsck_lfs.
Patch from Jesse Off <joff@gci-net.com> (Closes PR #11470).

Revision 1.52.4.2: download - view: text, markup, annotated - select for diffs
Thu Sep 14 18:50:20 2000 UTC (24 years, 3 months ago) by perseant
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Diff to: previous 1.52.4.1: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.1: +17 -28 lines
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.58: download - view: text, markup, annotated - select for diffs
Sat Sep 9 04:49:55 2000 UTC (24 years, 3 months ago) by perseant
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +7 -8 lines
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.57: download - view: text, markup, annotated - select for diffs
Wed Jul 5 22:25:44 2000 UTC (24 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -1 lines
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.52.4.1: download - view: text, markup, annotated - select for diffs
Mon Jul 3 18:33:56 2000 UTC (24 years, 5 months ago) by fvdl
Branches: netbsd-1-5
CVS tags: netbsd-1-5-ALPHA2
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +14 -8 lines
pullup the fixes from the trunk to not hold ufs_hashlock across
getnewvnode()

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Jul 3 01:45:54 2000 UTC (24 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +7 -2 lines
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.55: download - view: text, markup, annotated - select for diffs
Fri Jun 30 20:45:40 2000 UTC (24 years, 5 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +14 -8 lines
Rearrange code around getnewvnode as was already done for ffs, to avoid
locking against oneself because getnewvnode recycles a softdep-using vnode.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Jun 28 14:11:35 2000 UTC (24 years, 5 months ago) by mrg
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -2 lines
<vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Jun 27 20:57:17 2000 UTC (24 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +6 -22 lines
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.52: download - view: text, markup, annotated - select for diffs
Sat May 27 00:19:53 2000 UTC (24 years, 6 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -1 lines
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.51: download - view: text, markup, annotated - select for diffs
Fri May 19 04:34:45 2000 UTC (24 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
NULL != 0

Revision 1.28.2.9: download - view: text, markup, annotated - select for diffs
Fri May 5 13:06:52 2000 UTC (24 years, 7 months ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003
Diff to: previous 1.28.2.8: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.8: +24 -14 lines
Pull up revision 1.50 (requested by perseant):
  Sanity check the superblock before trying to use it to find the
  alt superblock; sanity check the disk address of the alt superblock
  to avoid deadlocking when trying to read it with the primary
  superblock buffer still busy.  Fixes PR#10001.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Apr 29 00:23:00 2000 UTC (24 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +24 -14 lines
Test whether the filesystem is an LFS before trying to read the alternate
superblock (whose disk address is stored in the primary superblock).  Also,
refuse to mount a filesystem whose superblocks overlap or where the alt.
superblock has a lower disk address than the primary superblock.

Solves PR#10001.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Apr 23 21:10:27 2000 UTC (24 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -1 lines
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.48: download - view: text, markup, annotated - select for diffs
Thu Mar 30 12:41:13 2000 UTC (24 years, 8 months ago) by augustss
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +17 -17 lines
Remove register declarations.

Revision 1.28.2.8: download - view: text, markup, annotated - select for diffs
Wed Mar 29 20:51:33 2000 UTC (24 years, 8 months ago) by he
Branches: netbsd-1-4
Diff to: previous 1.28.2.7: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.7: +2 -1 lines
Pull up revision 1.38 (requested by simonb):
  Prevent lfs_mountroot() from attempting to use a network device
  as root.
(This revision is needed on some NetBSD platforms.)

Revision 1.28.2.7: download - view: text, markup, annotated - select for diffs
Wed Mar 29 20:22:02 2000 UTC (24 years, 8 months ago) by he
Branches: netbsd-1-4
Diff to: previous 1.28.2.6: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.6: +6 -1 lines
Pull up revision 1.37 (requested by pk):
  Prevent lfs_mountroot() from attempting to use a network device
  as root.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Mar 16 18:08:33 2000 UTC (24 years, 9 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +9 -1 lines
Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.

Revision 1.28.2.6: download - view: text, markup, annotated - select for diffs
Thu Jan 20 21:11:46 2000 UTC (24 years, 10 months ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH002
Diff to: previous 1.28.2.5: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.5: +3 -2 lines
Pull up revision 1.46 (via patch, requested by perseant):
  Files removed (through unlink, rmdir) are now really removed, though the
  removal is postponed until the dirop is complete to ensure validity of
  the filesystem through a crash.  Use a separate per-fs lock, instead of
  ufs_hashlock, to protect the inode free list.  Change calling semantics
  of lfs_ifind, to give better error reporting:  If fed a struct buf, it
  can report the block number of the offending inode block as well as the
  inode number.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed Jan 19 00:03:05 2000 UTC (24 years, 10 months ago) by perseant
Branches: MAIN
CVS tags: chs-ubc2-newbase
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -2 lines
Changes to stabilize LFS.  The first two of these should also apply to the
1.4 branch.

* Use a separate per-fs lock, instead of ufs_hashlock, to protect the Inode
  free list.  This seems to prevent the "lockmgr: %d, not exclusive lock holder
  %d, unlocking" message I was mis-attributing last night to an unlocked vnode
  being passed to vrele.

* Change calling semantics of lfs_ifind, to give better error reporting:
  If fed a struct buf, it can report the block number of the offending inode
  block as well as the inode number.

* Back out rev 1.10 of lfs_subr.c, since the replacement code was slightly
  uglier while being functionally identical.

* Make lfs_vunref use the same free list convention as vrele/vput, so that
  vget does not remove vnodes from a hash list they are not on.

Revision 1.28.2.5: download - view: text, markup, annotated - select for diffs
Sat Jan 15 17:52:06 2000 UTC (24 years, 11 months ago) by he
Branches: netbsd-1-4
Diff to: previous 1.28.2.4: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.4: +2 -2 lines
Pull up revision 1.36 (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.38.2.2: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:36:40 1999 UTC (24 years, 11 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.38.2.1: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38.2.1: +10 -18 lines
Pull up to last week's -current.

Revision 1.38.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 23:20:10 1999 UTC (24 years, 11 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +7 -3 lines
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.28.2.4: download - view: text, markup, annotated - select for diffs
Fri Dec 17 23:55:06 1999 UTC (25 years ago) by he
Branches: netbsd-1-4
Diff to: previous 1.28.2.3: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.3: +1 -14 lines
Pull up revision 1.41 (requested by perseant):
  Address locking protocol error for inode hash, and make the
  maximum number of active dirops a global quantity.

Revision 1.28.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 17 23:23:19 1999 UTC (25 years ago) by he
Branches: netbsd-1-4
Diff to: previous 1.28.2.2: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.2: +2 -1 lines
Pull up revision 1.34 (via patch, requested by perseant):
  Avoid flushing vnodes involved in a dirop, making lfs' promise
  of "no fsck needed, even in the event of a crash" closer to
  reality.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Nov 21 19:25:32 1999 UTC (25 years ago) by perseant
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -1 lines
Initialize i_ffs_effnlink, so every file doesn't look like it's already been
deleted for the purpose of dirops (particularly create and mkdir).  Addresses
PR#8815.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Nov 15 18:49:14 1999 UTC (25 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -4 lines
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.39.4.3: download - view: text, markup, annotated - select for diffs
Mon Nov 15 00:42:26 1999 UTC (25 years, 1 month ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.39.4.2: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.4.2: +3 -15 lines
Sync with -current

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Nov 12 16:56:48 1999 UTC (25 years, 1 month ago) by perseant
Branches: MAIN
CVS tags: fvdl-softdep-base
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +0 -28 lines
Back out my patch of the 8th (to address unreferenced inode problem).
Apparently this needs more thought.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Nov 9 02:21:06 1999 UTC (25 years, 1 month ago) by perseant
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +29 -1 lines
If ifile blocks were written before dirops were complete, and then the
system crashed, inodes could be allocated that were not referenced.  (Though
not a serious problem, it evidences itself in phase 4 of fsck_lfs.)  Fix
this by marking if_daddr with UNASSIGNED before the inodes are actually
written; at mount time the ifile is checked for UNASSIGNED entries and
any that are found are linked back into the free list.  (The latter
functionality should move into the roll-forward agent when it materializes.)

Revision 1.41.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 6 20:33:07 1999 UTC (25 years, 1 month ago) by perseant
Branches: comdex-fall-1999
Diff to: previous 1.41.2.1: preferred, colored; branchpoint 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.2.1: +838 -0 lines
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.41.2.1
Sat Nov 6 20:33:06 1999 UTC (25 years, 1 month ago) by perseant
Branches: comdex-fall-1999
FILE REMOVED
Changes since revision 1.41: +0 -838 lines
file lfs_vfsops.c was added on branch comdex-fall-1999 on 1999-11-06 20:33:07 +0000

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sat Nov 6 20:33:06 1999 UTC (25 years, 1 month ago) by perseant
Branches: MAIN
CVS tags: comdex-fall-1999-base
Branch point for: comdex-fall-1999
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -14 lines
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.39.4.2: download - view: text, markup, annotated - select for diffs
Wed Nov 3 23:40:32 1999 UTC (25 years, 1 month ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.39.4.1: preferred, colored
Changes since revision 1.39.4.1: +2 -2 lines
Give ufs_ihashget an extra argument: the flags passed to vget() for
locking. This way we can avoid locking against ourselves when
ufs_ihashget is called during the flushing of metadata. XXX

Also, comment out a VOP_FSYNC call that I think is now unneeded, and
put a diagnostic printf there to check if this still happens.

Revision 1.39.2.1: download - view: text, markup, annotated - select for diffs
Wed Oct 20 22:57:21 1999 UTC (25 years, 1 month ago) by thorpej
Branches: thorpej_scsipi
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -2 lines
Sync w/ trunk.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Oct 20 14:32:11 1999 UTC (25 years, 1 month ago) by enami
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -2 lines
Check if the type of device node isn't VBAD before touching v_specinfo.  If
the device vnode is revoked, the field is NULL and touching it causes null
pointer derefercence.

Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 19 16:34:04 1999 UTC (25 years, 1 month ago) by he
Branches: netbsd-1-4
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.1: +5 -2 lines
Pull up revision 1.39 (requested by wrstuden):
  Catch a few cases missed earlier where we need to lock the vnode before
  calling VOP_CLOSE().

Revision 1.39.4.1: download - view: text, markup, annotated - select for diffs
Tue Oct 19 12:50:44 1999 UTC (25 years, 1 month ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3 lines
Bring in Kirk McKusick's FFS softdep code on a branch.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Oct 18 19:52:25 1999 UTC (25 years, 2 months ago) by wrstuden
Branches: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -2 lines
Catch a few cases missed earlier where we need to lock the vnode before
calling VOP_CLOSE().

Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed Sep 8 08:29:45 1999 UTC (25 years, 3 months ago) by augustss
Branches: MAIN
Branch point for: wrstuden-devbsize
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +2 -1 lines
Add #include <sys/device.h> so this file compiles again.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Sep 8 03:45:22 1999 UTC (25 years, 3 months ago) by sommerfeld
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +6 -1 lines
Avoid dereferencing NULL rootvp if booting diskless.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Sep 3 22:48:51 1999 UTC (25 years, 3 months ago) by perseant
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
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.28.2.1.2.3: download - view: text, markup, annotated - select for diffs
Tue Aug 31 21:03:46 1999 UTC (25 years, 3 months ago) by perseant
Branches: chs-ubc2
Diff to: previous 1.28.2.1.2.2: preferred, colored; branchpoint 1.28.2.1: preferred, colored; next MAIN 1.28.2.2: preferred, colored
Changes since revision 1.28.2.1.2.2: +3 -1 lines
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.28.2.1.2.2: download - view: text, markup, annotated - select for diffs
Mon Aug 2 22:57:34 1999 UTC (25 years, 4 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.28.2.1.2.1: preferred, colored; branchpoint 1.28.2.1: preferred, colored
Changes since revision 1.28.2.1.2.1: +5 -2 lines
Update from trunk.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Jul 17 01:08:30 1999 UTC (25 years, 5 months ago) by wrstuden
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +5 -2 lines
Adjust mountroot routines to vrele rootvp in case of mount error. Closes
PR 7977 by Neil Carson, <neil@brini.com>.

Revision 1.28.2.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 01:31:12 1999 UTC (25 years, 5 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.28.2.1: preferred, colored
Changes since revision 1.28.2.1: +2 -1 lines
Sync w/ -current.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Jun 1 03:00:40 1999 UTC (25 years, 6 months ago) by perseant
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
Fixed lfs_update (and related functions) so that calls from lfs_fsync
will DTRT with vnodes marked VDIROP.  In particular, the message
"flushing VDIROP" will no longer appear, and the filesystem will remain
stable in the event of a crash.

This was particularly a problem with NFS-exported LFSes, since fsync
was called on every file close.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue May 4 00:35:37 1999 UTC (25 years, 7 months ago) by scottr
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -1 lines
Include opt_ddb.h so we will get the Debugger() prototype.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 13 21:33:57 1999 UTC (25 years, 8 months ago) by perseant
Branches: 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
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +25 -11 lines
Pull-up of changes made to the trunk on Sunday [1.30->1.32], 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.32: download - view: text, markup, annotated - select for diffs
Mon Apr 12 00:47:17 1999 UTC (25 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -1 lines
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.31: download - view: text, markup, annotated - select for diffs
Sun Apr 11 23:58:17 1999 UTC (25 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -3 lines
Fix inode reporting in lfs_statfs (the meaning of f_files and f_ffree was
reversed).

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Apr 11 23:31:09 1999 UTC (25 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +10 -1 lines
Mark the current segment with SEGUSE_ACTIVE at mount time, rather than waiting
for the first write.  If this is not done, the cleaner may try to clean the
current segment out from under the writer if the filesystem is mounted after
a crash (or any other time that the dirty:clean segment ration is high enough).

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Apr 4 09:56:44 1999 UTC (25 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +13 -9 lines
Fix obvious bugs:
* The MNT_UPDATE case had a null pointer dereference.  (This is a good example
  of why blindly adding bogus initializiers is a FUNDAMENTALLY BAD IDEA!)
* Make sure the whole ufsmount is zeroed, as the export code relies on this.
* If we decided to use the second/alternate superblock, make sure to copy the
  in-core version from the right buffer.
Also, reenable NFS exporting.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Mar 25 21:39:19 1999 UTC (25 years, 8 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -18 lines
clean up unused/required #ifdefs

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Mar 24 11:05:31 1999 UTC (25 years, 8 months ago) by tron
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +1 -2 lines
Don't include "opt_uvm.h" any more.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Mar 10 00:20:00 1999 UTC (25 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +178 -24 lines
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.25: download - view: text, markup, annotated - select for diffs
Fri Feb 26 23:44:49 1999 UTC (25 years, 9 months ago) by wrstuden
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +4 -8 lines
Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Sep 11 21:27:13 1998 UTC (26 years, 3 months ago) by pk
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +7 -5 lines
PR#6032: define fixed sized on-disk superblock structure.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Sep 1 03:26:05 1998 UTC (26 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +11 -1 lines
Use the pool allocator and the "nointr" pool page allocator for LFS inodes.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Jun 24 20:58:48 1998 UTC (26 years, 5 months ago) by sommerfe
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -7 lines
Always include fifos; "not an option any more".

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jun 22 22:01:10 1998 UTC (26 years, 5 months ago) by sommerfe
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -1 lines
defopt for options FIFO

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Jun 9 07:46:33 1998 UTC (26 years, 6 months ago) by scottr
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -1 lines
Protect various config(8)-generated files from inclusion while
building LKMs.  Fixes PR 5557.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Jun 8 04:27:51 1998 UTC (26 years, 6 months ago) by scottr
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -1 lines
Use the newly-defined opt_quota.h.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Mar 18 15:57:28 1998 UTC (26 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -1 lines
Add support for reading/writing FFS in non-native byte order, conditioned
to "options FFS_EI". The superblock and inodes (without blk addr) are
byteswapped at disk read/write time, other metadatas are byteswapped
when used (as they are acceeded directly in the buffer cache).
This required the addition of a "um_flags" field to struct ufsmount.
ffs_bswap.c contains superblock and inode byteswap routines also used
by userland utilities.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Mar 1 22:16:39 1998 UTC (26 years, 9 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -2 lines
Remove accidentally enabled lfs_mountroot from vfsops struct.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:23:25 1998 UTC (26 years, 9 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +73 -19 lines
Merge with Lite2 + local changes

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:14:11 1998 UTC (26 years, 9 months ago) by fvdl
Branches: netbsd, CSRG
CVS tags: lite-2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +102 -28 lines
Import 4.4BSD-Lite2

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:10:48 1998 UTC (26 years, 9 months ago) by fvdl
Branches: netbsd, CSRG
CVS tags: lite-1, date-03-may-96
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -8 lines
Import 4.4BSD-Lite for reference

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Feb 18 07:05:50 1998 UTC (26 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +18 -1 lines
Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Oct 16 18:29:20 1997 UTC (27 years, 2 months ago) by mjacob
Branches: MAIN
CVS tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -3 lines
In calculating the f_bavail field, don't take 32 bit quantities and
multiply them by 90 (to be divided by 100) and expect them to be sane
for very large values (I was getting a negative 'avail' count).

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Jun 11 10:10:04 1997 UTC (27 years, 6 months ago) by bouyer
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3 lines
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.12: download - view: text, markup, annotated - select for diffs
Sun Dec 22 10:10:43 1996 UTC (27 years, 11 months ago) by cgd
Branches: MAIN
CVS tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
Change the second and third args to struct vfsops' (*vfs_mount)() to
'const char *', and 'void *', respectively.  The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions.  The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Mar 25 12:53:35 1996 UTC (28 years, 8 months ago) by pk
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -2 lines
Appease gcc: unused variables if !QUOTA

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Feb 9 22:28:58 1996 UTC (28 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +33 -21 lines
lfs prototypes

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Jun 18 14:48:39 1995 UTC (29 years, 6 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -2 lines
don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Mar 9 12:06:10 1995 UTC (29 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
copy*str() should use size_t.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Mar 8 01:51:52 1995 UTC (29 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
size for copyinstr should be u_long

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Jan 18 09:44:36 1995 UTC (29 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -10 lines
Clean up the code to frob mnt_stat a bit.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Jan 18 06:19:53 1995 UTC (29 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -5 lines
Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Dec 15 19:51:06 1994 UTC (30 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -7 lines
Call foo_statfs() from a common place when mounting.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Dec 14 13:03:49 1994 UTC (30 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +39 -14 lines
Sync with CSRG.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:47:06 1994 UTC (30 years, 5 months ago) by cgd
Branches: 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
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -2 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Jun 8 11:42:48 1994 UTC (30 years, 6 months ago) by mycroft
Branches: MAIN
Update to 4.4-Lite fs code, with local changes.

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>