The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.157.10.1: download - view: text, markup, annotated - select for diffs
Mon Aug 17 10:30:22 2020 UTC (4 years, 6 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.157: preferred, colored; next MAIN 1.158: preferred, colored
Changes since revision 1.157: +15 -4 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.159.4.1: download - view: text, markup, annotated - select for diffs
Sat Apr 25 11:24:08 2020 UTC (4 years, 9 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.159: preferred, colored; next MAIN 1.160: preferred, colored
Changes since revision 1.159: +3 -3 lines
Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.160: download - view: text, markup, annotated - select for diffs
Thu Apr 23 21:47:09 2020 UTC (4 years, 9 months ago) by ad
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, 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, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +3 -3 lines
PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself)

- Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed
  somewhere.  Use it to decide whether to do direct-mapped copy, rather than
  poking around directly in the vnode in ubc_uiomove(), which is ugly and
  doesn't work for tmpfs.  It would be nicer to contain all this in UVM but
  the filesystem provides the needed locking here (VV_MAPPED) and to
  reinvent that would suck more.

- Rename UBC_UNMAP_FLAG() to UBC_VNODE_FLAGS().  Pass in UBC_ISMAPPED where
  appropriate.

Revision 1.157.6.1: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:09:04 2020 UTC (4 years, 10 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.157: preferred, colored; next MAIN 1.158: preferred, colored
Changes since revision 1.157: +18 -7 lines
Merge changes from current as of 20200406

Revision 1.157.12.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:11 2020 UTC (4 years, 11 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.157: preferred, colored; next MAIN 1.158: preferred, colored
Changes since revision 1.157: +18 -7 lines
Sync with head.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Sun Feb 23 15:46:42 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base1, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +5 -5 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.158: download - view: text, markup, annotated - select for diffs
Sun Feb 23 08:40:58 2020 UTC (4 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +15 -4 lines
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.

Revision 1.126.8.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:22 2017 UTC (7 years, 2 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.126.8.3: preferred, colored; branchpoint 1.126: preferred, colored; next MAIN 1.127: preferred, colored
Changes since revision 1.126.8.3: +163 -143 lines
update from HEAD

Revision 1.155.6.1: download - view: text, markup, annotated - select for diffs
Mon Oct 30 09:29:04 2017 UTC (7 years, 3 months 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.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155: +13 -13 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.136.6.2: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:17 2017 UTC (7 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.136.6.1: preferred, colored; branchpoint 1.136: preferred, colored; next MAIN 1.137: preferred, colored
Changes since revision 1.136.6.1: +53 -65 lines
Sync with HEAD

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sat Jun 10 05:29:36 2017 UTC (7 years, 8 months ago) by maya
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: phil-wifi, netbsd-9, ad-namecache
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +13 -13 lines
Rename i_flag to i_state.

The similarity to i_flags has previously caused errors.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Mon Jun 5 01:29:21 2017 UTC (7 years, 8 months ago) by maya
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +4 -4 lines
Correct confusion between i_flag and i_flags
These will have to be renamed.

Spotted by Riastradh, thanks!

Revision 1.147.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:31 2017 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.147.2.1: preferred, colored; branchpoint 1.147: preferred, colored; next MAIN 1.148: preferred, colored
Changes since revision 1.147.2.1: +15 -24 lines
Sync with HEAD

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

Revision 1.155: download - view: text, markup, annotated - select for diffs
Sat Apr 1 00:40:42 2017 UTC (7 years, 10 months ago) by maya
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +11 -12 lines
Simplify locking

Revision 1.154: download - view: text, markup, annotated - select for diffs
Fri Mar 31 23:00:21 2017 UTC (7 years, 10 months ago) by maya
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +4 -5 lines
stopgap fix- move lfs_lock to include calls to lfs_dino_{set,get}block

blocks new users that need seglock (need to take lfs_lock) that
setblock before the assert (truncate to 0 but 31 blks/31 effblks)

not proper, but lets me run firefox on lfs

Revision 1.153: download - view: text, markup, annotated - select for diffs
Tue Mar 21 09:53:00 2017 UTC (7 years, 10 months ago) by maya
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +4 -11 lines
Update mtime even if oip->i_size == length

PR kern/51762, LFS version.

Revision 1.147.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:54 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +29 -32 lines
Sync with HEAD

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sun Mar 19 22:48:00 2017 UTC (7 years, 11 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +4 -4 lines
Fix inadvertently reversed sense of comparisons.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Sat Mar 18 05:43:16 2017 UTC (7 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +13 -15 lines
#if DIAGNOSTIC panic ---> KASSERT

Revision 1.150: download - view: text, markup, annotated - select for diffs
Thu Mar 16 01:09:24 2017 UTC (7 years, 11 months ago) by maya
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +12 -12 lines
actually cast to unsigned long long and use %llu. certainly not use hex (oops)
suggested by dh

Revision 1.149: download - view: text, markup, annotated - select for diffs
Wed Mar 15 21:28:41 2017 UTC (7 years, 11 months ago) by maya
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +8 -8 lines
print inode number in an assert I keep hitting and the adjacent one.
use PRIx64 for printing inode number elsewhere.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Mon Mar 13 13:45:53 2017 UTC (7 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +14 -15 lines
#if DIAGNOSTIC panic ---> KASSERTMSG

Revision 1.136.6.1: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:17 2015 UTC (9 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +122 -90 lines
Sync with HEAD

Revision 1.147: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:13:09 2015 UTC (9 years, 5 months ago) by dholland
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, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +24 -16 lines
Fix up indirect block handling in truncate to be 32/64 clean.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:08:37 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +43 -27 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.145: download - view: text, markup, annotated - select for diffs
Wed Aug 19 20:33:29 2015 UTC (9 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +4 -5 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.144: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:28:01 2015 UTC (9 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +12 -9 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.143: download - view: text, markup, annotated - select for diffs
Sun Aug 2 20:23:21 2015 UTC (9 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +3 -3 lines
whoops, fix 32-bit build

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:12:41 2015 UTC (9 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +4 -4 lines
Make i_eff_nblks in the in-memory inode 64 bits wide.

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

Revision 1.140: download - view: text, markup, annotated - select for diffs
Tue Jul 28 05:09:34 2015 UTC (9 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +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.139: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:59:32 2015 UTC (9 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +10 -10 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.138: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:56:42 2015 UTC (9 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +33 -31 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.137: download - view: text, markup, annotated - select for diffs
Thu Jul 16 08:31:45 2015 UTC (9 years, 7 months ago) by dholland
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +3 -3 lines
Don't cast the return value of malloc.

Revision 1.126.8.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:44 2014 UTC (10 years, 6 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.126.8.2: preferred, colored; branchpoint 1.126: preferred, colored
Changes since revision 1.126.8.2: +7 -8 lines
Rebase to HEAD as of a few days ago.

Revision 1.125.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:19 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.125.2.2: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.2.2: +81 -82 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.132.2.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:21 2014 UTC (10 years, 9 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.132.2.1: preferred, colored; branchpoint 1.132: preferred, colored; next MAIN 1.133: preferred, colored
Changes since revision 1.132.2.1: +2 -4 lines
sync with head

Revision 1.136: download - view: text, markup, annotated - select for diffs
Thu Oct 17 21:01:08 2013 UTC (11 years, 4 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, nick-nhusb-base-20150606, nick-nhusb-base-20150406, 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.135: preferred, colored
Changes since revision 1.135: +2 -4 lines
- remove unused variables
- add debug ifdefs for debugging variables
- __USE() where appropriate.

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

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

Revision 1.134: download - view: text, markup, annotated - select for diffs
Sun Jul 28 01:10:49 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +7 -7 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.133: download - view: text, markup, annotated - select for diffs
Sun Jul 28 01:05:52 2013 UTC (11 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +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.126.8.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:39 2013 UTC (11 years, 7 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.126.8.1: preferred, colored; branchpoint 1.126: preferred, colored
Changes since revision 1.126.8.1: +76 -76 lines
resync from head

Revision 1.132: download - view: text, markup, annotated - select for diffs
Tue Jun 18 18:18:58 2013 UTC (11 years, 8 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.131: preferred, colored
Changes since revision 1.131: +52 -52 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.131: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:49:28 2013 UTC (11 years, 8 months ago) by dholland
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +3 -3 lines
Add lfs_ or ulfs_ in front of extern symbols lacking them, mostly
quota-related (and particularly quota2-related) stuff.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:48:04 2013 UTC (11 years, 8 months ago) by dholland
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +28 -28 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.129: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:46:40 2013 UTC (11 years, 8 months ago) by dholland
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +3 -3 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.128: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:44:40 2013 UTC (11 years, 8 months ago) by dholland
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +6 -6 lines
Split lfs from ufs, part 2:

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

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

Revision 1.125.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:06:34 2013 UTC (12 years ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.125.2.1: preferred, colored; branchpoint 1.125: preferred, colored
Changes since revision 1.125.2.1: +20 -20 lines
sync with head

Revision 1.127: download - view: text, markup, annotated - select for diffs
Tue Jan 22 09:39:17 2013 UTC (12 years ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base8, khorben-n900, agc-symver-base, agc-symver
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +20 -20 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.125.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:56 2012 UTC (12 years, 10 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +6 -3 lines
sync with head

Revision 1.120.10.2: download - view: text, markup, annotated - select for diffs
Wed Jan 25 18:18:46 2012 UTC (13 years ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Diff to: previous 1.120.10.1: preferred, colored; branchpoint 1.120: preferred, colored; next MAIN 1.121: preferred, colored
Changes since revision 1.120.10.1: +6 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #1702):
	sys/ufs/lfs/lfs_inode.c: revision 1.126
	sys/ufs/ffs/ffs_inode.c: revision 1.108
If ufs_balloc_range() fails, make sure to call ?fs_truncate() to
reset v_writesize to the right value.
If v_writesize is left larger than the allocated blocks, we may have
the same issue as the one described in
http://mail-index.netbsd.org/tech-kern/2010/02/02/msg007156.html

Revision 1.126: download - view: text, markup, annotated - select for diffs
Wed Nov 23 19:42:10 2011 UTC (13 years, 2 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp
Branch point for: tls-maxphys
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +6 -3 lines
If ufs_balloc_range() fails, make sure to call ?fs_truncate() to
reset v_writesize to the right value.
If v_writesize is left larger than the allocated blocks, we may have
the same issue as the one described in
http://mail-index.netbsd.org/tech-kern/2010/02/02/msg007156.html

Revision 1.125: download - view: text, markup, annotated - select for diffs
Mon Jul 11 08:27:40 2011 UTC (13 years, 7 months ago) by hannken
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +5 -5 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.122.8.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:31 2011 UTC (13 years, 7 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.122: preferred, colored; next MAIN 1.123: preferred, colored
Changes since revision 1.122: +10 -9 lines
Catchup with rmind-uvmplock merge.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Thu Jun 16 09:21:03 2011 UTC (13 years, 8 months ago) by hannken
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +4 -3 lines
Rename uvm_vnp_zerorange(struct vnode *, off_t, size_t) to
ubc_zerorange(struct uvm_object *, off_t, size_t, int) changing
the first argument to an uvm_object and adding a flags argument.

Modify tmpfs_reg_resize() to zero the backing store (aobj) instead
of the vnode.  Ubc_purge() no longer panics when unmounting tmpfs.

Keep uvm_vnp_zerorange() until the next kernel version bump.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Sun Jun 12 03:36:01 2011 UTC (13 years, 8 months ago) by rmind
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +8 -8 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.121.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:35 2010 UTC (14 years, 9 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.121: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121: +3 -2 lines
Sync with HEAD.

Revision 1.120.18.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:26 2010 UTC (14 years, 10 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.120: preferred, colored; next MAIN 1.121: preferred, colored
Changes since revision 1.120: +6 -3 lines
sync to netbsd-5

Revision 1.122.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 16 15:38:15 2010 UTC (14 years, 11 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.122: preferred, colored; next MAIN 1.123: preferred, colored
Changes since revision 1.122: +8 -8 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.119.4.2: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:45 2010 UTC (14 years, 11 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.119.4.1: preferred, colored; branchpoint 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119.4.1: +7 -3 lines
sync with head

Revision 1.120.10.1: download - view: text, markup, annotated - select for diffs
Mon Feb 22 04:43:46 2010 UTC (14 years, 11 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +6 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #1302):
	sys/ufs/ext2fs/ext2fs_inode.c: revision 1.71
	sys/ufs/ffs/ffs_inode.c: revision 1.104
	sys/ufs/lfs/lfs_inode.c: revision 1.121
	sys/ufs/ufs/ufs_inode.c: revision 1.79
- ufs_balloc_range(): on error, only PG_RELEASED the pages that were
  allocated to extend the file to the new size. Releasing all pages
  may release pages that contains previously-written data not yet flushed
  to disk. Should fix PR kern/35704
- {ffs,lfs,ext2fs}_truncate(): Even if the inode's size is the same as
  the new length, call uvm_vnp_setsize(). *_truncate() may have been
  called by *_write() in the error path (e.g. block allocation failure
  because of quota of file system full), and at this point v_writesize
  has been set to the desired size of the file and not reverted to the
  old size. Not adjusting v_writesize to the real size cause
  genfs_do_io() to write to disk past the real end of the file.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Tue Feb 16 23:20:30 2010 UTC (15 years ago) by mlelstv
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, cherry-xenmp
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +3 -2 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.121: download - view: text, markup, annotated - select for diffs
Sun Feb 7 17:12:40 2010 UTC (15 years ago) by bouyer
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +6 -3 lines
- ufs_balloc_range(): on error, only PG_RELEASED the pages that were
  allocated to extend the file to the new size. Releasing all pages
  may release pages that contains previously-written data not yet flushed
  to disk. Should fix PR kern/35704
- {ffs,lfs,ext2fs}_truncate(): Even if the inode's size is the same as
  the new length, call uvm_vnp_setsize(). *_truncate() may have been
  called by *_write() in the error path (e.g. block allocation failure
  because of quota of file system full), and at this point v_writesize
  has been set to the desired size of the file and not reverted to the
  old size. Not adjusting v_writesize to the real size cause
  genfs_do_io() to write to disk past the real end of the file.

Revision 1.118.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:36 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.118.6.1: preferred, colored; branchpoint 1.118: preferred, colored; next MAIN 1.119: preferred, colored
Changes since revision 1.118.6.1: +0 -7 lines
Sync with HEAD.

Revision 1.119.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:55 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119: +2 -9 lines
sync with head.

Revision 1.119.4.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:26:00 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +2 -9 lines
sync with head.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:11 2008 UTC (16 years, 9 months ago) by martin
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, nick-hppapmap, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, mjf-devfs2-base, matt-premerge-20091211, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: netbsd-5, matt-nb5-mips64
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.118.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:43:13 2008 UTC (16 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +3 -3 lines
Sync with HEAD.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Thu Mar 27 19:06:52 2008 UTC (16 years, 10 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +3 -3 lines
Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.

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

Revision 1.96.2.6: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:37:06 2008 UTC (16 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.96.2.5: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96.2.5: +5 -5 lines
sync with head.

Revision 1.114.4.1: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:07:28 2008 UTC (17 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.114: preferred, colored; next MAIN 1.115: preferred, colored
Changes since revision 1.114: +57 -65 lines
Sync with HEAD.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Fri Feb 15 13:46:05 2008 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +4 -4 lines
Give bbusy() an interlock argument. If the we need to wait for the buffer,
the interlock is dropped and reacquired when awoken. This allows for
busying buffers attached to a list that is not locked by bufcache_lock.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Fri Feb 15 13:30:56 2008 UTC (17 years ago) by ad
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +3 -3 lines
The buffer LOCKED flag need not be under the protection of bufcache_lock,
BUSY is enough.

Revision 1.96.2.5: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:48:11 2008 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.96.2.4: preferred, colored
Changes since revision 1.96.2.4: +65 -75 lines
sync with head

Revision 1.111.8.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:58:30 2008 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.111.8.1: preferred, colored; branchpoint 1.111: preferred, colored
Changes since revision 1.111.8.1: +65 -75 lines
sync with HEAD

Revision 1.115.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:58:24 2008 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.115: preferred, colored; next MAIN 1.116: preferred, colored
Changes since revision 1.115: +57 -65 lines
Sync with HEAD

Revision 1.116: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:49:11 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +57 -65 lines
Merge vmlocking2 to head.

Revision 1.114.6.5: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:40:01 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking2
Diff to: previous 1.114.6.4: preferred, colored; branchpoint 1.114: preferred, colored; next MAIN 1.115: preferred, colored
Changes since revision 1.114.6.4: +10 -12 lines
Sync with head.

Revision 1.114.6.4: download - view: text, markup, annotated - select for diffs
Wed Dec 19 21:27:15 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.114.6.3: preferred, colored; branchpoint 1.114: preferred, colored
Changes since revision 1.114.6.3: +11 -11 lines
Use a global lfs_lock.

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

Revision 1.114.6.2: download - view: text, markup, annotated - select for diffs
Wed Dec 19 00:02:00 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.114.6.1: preferred, colored; branchpoint 1.114: preferred, colored
Changes since revision 1.114.6.1: +3 -6 lines
Get lfs mostly working.

Revision 1.111.6.2: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:54 2007 UTC (17 years, 2 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.111.6.1: preferred, colored; branchpoint 1.111: preferred, colored; next MAIN 1.112: preferred, colored
Changes since revision 1.111.6.1: +10 -12 lines
Sync with HEAD.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Sat Dec 8 19:29:55 2007 UTC (17 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +10 -12 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.114.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 4 13:03:50 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +58 -62 lines
Pull the vmlocking changes into a new branch.

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

Revision 1.96.2.4: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:36:46 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.96.2.3: preferred, colored
Changes since revision 1.96.2.3: +10 -10 lines
sync with head.

Revision 1.111.6.1: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:49:33 2007 UTC (17 years, 3 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +10 -10 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.111.10.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:49:19 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.111: preferred, colored; next MAIN 1.112: preferred, colored
Changes since revision 1.111: +10 -10 lines
sync with head.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Wed Oct 10 22:38:00 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +3 -3 lines
Fix DEBUG builds.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Wed Oct 10 20:42:34 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +6 -5 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.112: download - view: text, markup, annotated - select for diffs
Mon Oct 8 18:01:30 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +6 -7 lines
Merge ffs locking & brelse changes from the vmlocking branch.

Revision 1.96.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:46:54 2007 UTC (17 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.96.2.2: preferred, colored
Changes since revision 1.96.2.2: +7 -10 lines
sync with head.

Revision 1.107.2.7: download - view: text, markup, annotated - select for diffs
Tue Aug 28 14:00:04 2007 UTC (17 years, 5 months ago) by yamt
Branches: vmlocking
Diff to: previous 1.107.2.6: preferred, colored; branchpoint 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107.2.6: +5 -3 lines
make this compilable with DEBUG.

Revision 1.107.2.6: download - view: text, markup, annotated - select for diffs
Fri Aug 24 23:28:47 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.5: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.5: +40 -45 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.107.2.5: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:28:17 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.4: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.4: +2 -6 lines
Sync with head.

Revision 1.107.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:12:46 2007 UTC (17 years, 7 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107: +4 -7 lines
Sync with head.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Tue Jul 10 09:50:08 2007 UTC (17 years, 7 months ago) by hannken
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-armv6, jmcneill-pm
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -6 lines
Move `struct dquot' and its supporting functions from quota.h to ufs_quota.c.

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

No objections on tech-kern@

Revision 1.107.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:32:12 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.3: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.3: +3 -3 lines
- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.107.2.3: download - view: text, markup, annotated - select for diffs
Sat Jun 9 23:58:20 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.2: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.2: +4 -3 lines
Sync with head.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Tue Jun 5 12:31:34 2007 UTC (17 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +4 -3 lines
improve post-ubc file overwrite performance in common cases.
ie. when it's safe, actually overwrite blocks rather than doing
read-modify-write.

also fixes PR/33152 and PR/36303.

Revision 1.106.4.3: download - view: text, markup, annotated - select for diffs
Thu May 17 13:41:58 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.106.4.2: preferred, colored; branchpoint 1.106: preferred, colored; next MAIN 1.107: preferred, colored
Changes since revision 1.106.4.2: +3 -3 lines
sync with head.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Wed May 16 19:11:37 2007 UTC (17 years, 9 months ago) by perseant
Branches: MAIN
CVS tags: yamt-idlelwp-base8
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -3 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.107.2.2: download - view: text, markup, annotated - select for diffs
Sun May 13 17:36:44 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.1: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.1: +6 -7 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.106.4.2: download - view: text, markup, annotated - select for diffs
Mon May 7 10:56:16 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.106.4.1: preferred, colored; branchpoint 1.106: preferred, colored
Changes since revision 1.106.4.1: +3 -3 lines
sync with head.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Apr 18 00:49:33 2007 UTC (17 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +3 -3 lines
Remember to write dirops when the vnode we are trying to flush is a dirop.

Revision 1.107.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 17:51:25 2007 UTC (17 years, 11 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +23 -23 lines
Pull in the initial set of changes for the vmlocking branch.

Revision 1.106.4.1: download - view: text, markup, annotated - select for diffs
Mon Mar 12 06:01:08 2007 UTC (17 years, 11 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +5 -5 lines
Sync with HEAD.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:45 2007 UTC (17 years, 11 months ago) by christos
Branches: MAIN
CVS tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +5 -5 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.96.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:51:01 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.96.2.1: preferred, colored
Changes since revision 1.96.2.1: +4 -5 lines
sync with head.

Revision 1.105.8.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:49 2006 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.105: preferred, colored; next MAIN 1.106: preferred, colored
Changes since revision 1.105: +4 -5 lines
Sync with head.

Revision 1.105.10.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:51 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.105: preferred, colored; next MAIN 1.106: preferred, colored
Changes since revision 1.105: +4 -5 lines
sync with head

Revision 1.106: download - view: text, markup, annotated - select for diffs
Sat Oct 14 09:17:26 2006 UTC (18 years, 4 months ago) by yamt
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +2 -3 lines
don't use g_glock directly.

Revision 1.100.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 03:00:00 2006 UTC (18 years, 5 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +85 -25 lines
sync with head

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

Revision 1.100.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:39:43 2006 UTC (18 years, 8 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.100.6.1: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.6.1: +69 -24 lines
Sync with head.

Revision 1.100.12.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:48 2006 UTC (18 years, 8 months ago) by tron
Branches: peter-altq
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +85 -25 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.100.8.2: download - view: text, markup, annotated - select for diffs
Wed May 24 10:59:25 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.100.8.1: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.8.1: +74 -25 lines
sync with head.

Revision 1.90.2.5: download - view: text, markup, annotated - select for diffs
Sat May 20 22:38:57 2006 UTC (18 years, 9 months ago) by riz
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.90.2.4: preferred, colored; branchpoint 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90.2.4: +66 -22 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.90.2.4: download - view: text, markup, annotated - select for diffs
Sat May 20 22:33:01 2006 UTC (18 years, 9 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.90.2.3: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.3: +7 -3 lines
Pull up following revision(s) (requested by perseant in ticket #1327):
	sys/ufs/lfs/lfs_inode.c: revision 1.102
Avoid a possible sign overflow condition in lfs_truncate, which would result
in a buffer overflow (underflow).  Coverity CID 1521.

Revision 1.90.2.3: download - view: text, markup, annotated - select for diffs
Sat May 20 22:10:29 2006 UTC (18 years, 9 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.90.2.2: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.2: +13 -2 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.90.2.2: download - view: text, markup, annotated - select for diffs
Sat May 20 21:50:26 2006 UTC (18 years, 9 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.90.2.1: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.1: +6 -6 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.105: download - view: text, markup, annotated - select for diffs
Sun May 14 21:32:45 2006 UTC (18 years, 9 months ago) by elad
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +4 -3 lines
integrate kauth.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Sun May 14 05:27:59 2006 UTC (18 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +3 -3 lines
Correct a bogus expression gcc4 found.

Revision 1.100.10.4: download - view: text, markup, annotated - select for diffs
Thu May 11 23:32:03 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.100.10.3: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.10.3: +71 -23 lines
sync with head

Revision 1.100.10.3: download - view: text, markup, annotated - select for diffs
Sat May 6 23:32:58 2006 UTC (18 years, 9 months ago) by christos
Branches: elad-kernelauth
Diff to: previous 1.100.10.2: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.10.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.103: download - view: text, markup, annotated - select for diffs
Sun Apr 30 21:19:42 2006 UTC (18 years, 9 months ago) by perseant
Branches: MAIN
CVS tags: elad-kernelauth-base
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +66 -22 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.100.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:40:25 2006 UTC (18 years, 10 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +18 -3 lines
Sync with head.

Revision 1.100.10.2: download - view: text, markup, annotated - select for diffs
Wed Apr 19 03:54:09 2006 UTC (18 years, 10 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.100.10.1: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.10.1: +13 -2 lines
sync with head.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Wed Apr 19 00:22:15 2006 UTC (18 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +7 -3 lines
Avoid a possible sign overflow condition in lfs_truncate, which would result
in a buffer overflow (underflow).  Coverity CID 1521.

Revision 1.100.8.1: download - view: text, markup, annotated - select for diffs
Tue Apr 11 11:55:58 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +13 -2 lines
sync with head

Revision 1.101: download - view: text, markup, annotated - select for diffs
Sat Apr 8 00:26:34 2006 UTC (18 years, 10 months ago) by perseant
Branches: MAIN
CVS tags: yamt-pdpolicy-base4
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +13 -2 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.100.10.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 01:39:12 2006 UTC (18 years, 11 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -3 lines
Adapt to kernel authorization KPI.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:25:26 2005 UTC (19 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +10 -10 lines
merge ktrace-lwp.

Revision 1.77.2.9: download - view: text, markup, annotated - select for diffs
Sun Dec 11 10:29:41 2005 UTC (19 years, 2 months ago) by christos
Branches: ktrace-lwp
Diff to: previous 1.77.2.8: preferred, colored; next MAIN 1.78: preferred, colored
Changes since revision 1.77.2.8: +8 -2 lines
Sync with head.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Fri Nov 11 15:50:57 2005 UTC (19 years, 3 months 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.98: preferred, colored
Changes since revision 1.98: +8 -2 lines
- ignore truncation for VCHR/VBLK/VFIFO as it used to be
  before yamt-vop merge.  PR/32049 from Atsushi Onoe.
- reject setattr which attempts to change size of VLNK/VSOCK.

Revision 1.77.2.8: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:12:32 2005 UTC (19 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.77.2.7: preferred, colored
Changes since revision 1.77.2.7: +61 -59 lines
Sync with HEAD. Here we go again...

Revision 1.98: download - view: text, markup, annotated - select for diffs
Wed Nov 2 12:39:14 2005 UTC (19 years, 3 months ago) by yamt
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +24 -41 lines
merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.97.2.2: download - view: text, markup, annotated - select for diffs
Sat Oct 29 17:22:22 2005 UTC (19 years, 3 months ago) by yamt
Branches: yamt-vop
Diff to: previous 1.97.2.1: preferred, colored; branchpoint 1.97: preferred, colored; next MAIN 1.98: preferred, colored
Changes since revision 1.97.2.1: +10 -10 lines
use lfs_* directly rather than via ufs_ops.
suggested by Chuck Silvers.

Revision 1.97.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 20 03:00:30 2005 UTC (19 years, 4 months ago) by yamt
Branches: yamt-vop
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +24 -41 lines
adapt ufs.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Mon Sep 12 16:24:41 2005 UTC (19 years, 5 months ago) by christos
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.96: preferred, colored
Changes since revision 1.96: +3 -7 lines
Use nanotime() to update the time fields in filesystems. Convert the code
from macros to real functions. Original patch and review from chuq.
Note: ext2fs only keeps seconds in the on-disk inode, and msdosfs does not
have enough precision for all fields, so this is not very useful for those
two.

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

Revision 1.90.2.1: download - view: text, markup, annotated - select for diffs
Sat May 7 11:21:30 2005 UTC (19 years, 9 months ago) by tron
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.90: preferred, colored
Changes since revision 1.90: +35 -12 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.88.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:39 2005 UTC (19 years, 9 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88: +45 -34 lines
sync with -current

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sat Apr 23 19:47:51 2005 UTC (19 years, 9 months ago) by perseant
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +6 -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.94: download - view: text, markup, annotated - select for diffs
Sat Apr 16 17:35:58 2005 UTC (19 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +6 -3 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.93: download - view: text, markup, annotated - select for diffs
Sat Apr 16 17:28:37 2005 UTC (19 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -5 lines
Use lfs_malloc() to manage the blkiov arrays that the cleaner functions use,
since the cleaner is likely to operate in a low-memory condition.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Thu Apr 14 00:02:46 2005 UTC (19 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +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.91: download - view: text, markup, annotated - select for diffs
Fri Apr 1 21:59:46 2005 UTC (19 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +22 -6 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.88.6.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:37:03 2005 UTC (19 years, 11 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88: +12 -24 lines
sync with head.  xen and whitespace.  xen part is not finished.

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

Revision 1.90: download - view: text, markup, annotated - select for diffs
Tue Mar 8 00:18:19 2005 UTC (19 years, 11 months ago) by perseant
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +9 -21 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.77.2.6: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:54:48 2005 UTC (19 years, 11 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.77.2.5: preferred, colored
Changes since revision 1.77.2.5: +6 -6 lines
Sync with HEAD.

Hi Perry!

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

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

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

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

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sun Aug 15 19:01:16 2004 UTC (20 years, 6 months ago) by mycroft
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +12 -10 lines
Don't write out the extra zero pages with PGO_SYNCIO.  We start an asynchronous
write anyway, and they will not be freed until that write is finished.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Aug 15 17:37:07 2004 UTC (20 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +19 -12 lines
Copy the current partial-truncate logic from FFS.  In the process, fix a
potential overrun when truncating a fragment.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Aug 15 16:17:37 2004 UTC (20 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +10 -11 lines
Minor simplification to some arithmetic.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Aug 15 07:19:56 2004 UTC (20 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +7 -7 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.84: download - view: text, markup, annotated - select for diffs
Sat Aug 14 01:08:04 2004 UTC (20 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +8 -4 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.77.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:56:57 2004 UTC (20 years, 6 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.77.2.1: preferred, colored
Changes since revision 1.77.2.1: +13 -15 lines
Sync with HEAD

Revision 1.82.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 9 23:09:10 2004 UTC (20 years, 10 months ago) by jmc
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Diff to: previous 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82: +6 -2 lines
Pullup rev 1.83 (requested by oster in ticket #112)

If we bail out due to an error, we need 'unreserve' the space that
we'd reserved earlier.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Mar 30 14:50:46 2004 UTC (20 years, 10 months ago) by oster
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +6 -2 lines
If we bail out due to an error, we need 'unreserve' the space that
we'd reserved earlier.

Approved by: yamt

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Jan 25 18:06:49 2004 UTC (21 years ago) by hannken
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -3 lines
Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.

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

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

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

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Dec 30 12:33:24 2003 UTC (21 years, 1 month ago) by pk
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +3 -3 lines
Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

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

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

Revision 1.80: download - view: text, markup, annotated - select for diffs
Fri Nov 7 14:48:28 2003 UTC (21 years, 3 months ago) by yamt
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +6 -5 lines
more assertion about file truncation to zero.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Thu Aug 7 16:34:36 2003 UTC (21 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +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.78: download - view: text, markup, annotated - select for diffs
Sat Jul 12 16:17:07 2003 UTC (21 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +2 -5 lines
- protect global resource counts with lfs_subsys_lock.
- clean up scattered externs a little.

Revision 1.77.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:27:23 2003 UTC (21 years, 7 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +10 -10 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.77: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:32:39 2003 UTC (21 years, 7 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +8 -8 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:22:26 2003 UTC (21 years, 7 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +10 -10 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.75: download - view: text, markup, annotated - select for diffs
Sun Apr 27 06:46:38 2003 UTC (21 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +4 -4 lines
fix b_interlock lock/unlock mismatches.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Wed Apr 23 07:20:37 2003 UTC (21 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +10 -6 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.73: download - view: text, markup, annotated - select for diffs
Thu Apr 10 04:15:38 2003 UTC (21 years, 10 months ago) by simonb
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +8 -3 lines
'#if 0' out a variable that is currently only used in other '#if 0'd out
code.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Wed Apr 2 10:39:41 2003 UTC (21 years, 10 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +33 -33 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.71: download - view: text, markup, annotated - select for diffs
Thu Mar 20 06:47:38 2003 UTC (21 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +12 -22 lines
Hold the segment lock during truncation to prevent indirect blocks from
being written by lfs_updatemeta while lfs_truncate is also writing them,
a bug pointed out by YAMAMOTO Takashi <yamt@netbsd.org>.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Mar 8 21:46:05 2003 UTC (21 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +17 -36 lines
Take away "#ifdef LFS_UBC".

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Mar 4 19:10:35 2003 UTC (21 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -3 lines
Don't force all truncations to be synchronous

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Mar 1 05:07:51 2003 UTC (21 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -4 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.67: download - view: text, markup, annotated - select for diffs
Fri Feb 28 07:37:56 2003 UTC (21 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +56 -17 lines
Make lfs_truncate handle file extension correctly, in the LFS_UBC case.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Feb 28 04:37:07 2003 UTC (21 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +7 -4 lines
Quell a hasty panic in lfs_truncate: on-inode disk addresses can be
different between the beginning and end of the call.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Feb 20 04:27:24 2003 UTC (22 years ago) by perseant
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +34 -34 lines
Tabify, and fix some comment alignment problems.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Mon Feb 17 23:48:18 2003 UTC (22 years ago) by perseant
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +81 -27 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.63: download - view: text, markup, annotated - select for diffs
Sat Jan 25 16:40:29 2003 UTC (22 years ago) by fvdl
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -3 lines
The oldblks and newblks arrays are used to store direct copies of
on-disk block pointers, so they should be int32_t. Error found
by Izumi Tsutsui.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Jan 24 21:55:27 2003 UTC (22 years ago) by fvdl
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +20 -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.50.2.9: download - view: text, markup, annotated - select for diffs
Sun Dec 29 20:57:19 2002 UTC (22 years, 1 month ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.50.2.8: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.2.8: +12 -7 lines
Sync with HEAD.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sat Dec 28 14:39:09 2002 UTC (22 years, 1 month ago) by yamt
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +12 -7 lines
- in lfs_reserve, vref vnodes that we're locking so that cleaner doesn't
  try to reclaim them.
  (workaround for deadlock noted in the comment in lfs_reserveavail)
- in lfs_rename, mark vnodes which are being moved as well as directry vnodes.

Revision 1.50.2.8: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:45:52 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.50.2.7: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.7: +1 -1 lines
Catch up to -current.

Revision 1.51.4.5: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:44:55 2002 UTC (22 years, 4 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.51.4.4: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.4.4: +3 -3 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.60: download - view: text, markup, annotated - select for diffs
Fri Sep 27 15:38:05 2002 UTC (22 years, 4 months ago) by provos
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3 lines
remove trailing \n in panic().  approved perry.

Revision 1.51.4.4: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:50:16 2002 UTC (22 years, 5 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.51.4.3: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.4.3: +34 -26 lines
sync kqueue branch with HEAD

Revision 1.50.2.7: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:47:04 2002 UTC (22 years, 6 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.50.2.6: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.6: +34 -26 lines
Catch up to -current.

Revision 1.57.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 15 10:37:26 2002 UTC (22 years, 7 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.57: preferred, colored; next MAIN 1.58: preferred, colored
Changes since revision 1.57: +34 -26 lines
catch up with -current.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Jul 6 01:30:12 2002 UTC (22 years, 7 months ago) by perseant
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +33 -25 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.58: download - view: text, markup, annotated - select for diffs
Tue Jul 2 19:07:03 2002 UTC (22 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -3 lines
fix printf format for DEBUG_LFS.

Revision 1.51.4.3: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:52:11 2002 UTC (22 years, 7 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.51.4.2: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.4.2: +23 -10 lines
catch up with -current on kqueue branch

Revision 1.50.2.6: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:50:30 2002 UTC (22 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.50.2.5: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.5: +23 -10 lines
Catch up to -current.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue May 14 20:03:54 2002 UTC (22 years, 9 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +23 -10 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.51.4.2: download - view: text, markup, annotated - select for diffs
Thu Jan 10 20:05:12 2002 UTC (23 years, 1 month ago) by thorpej
Branches: kqueue
Diff to: previous 1.51.4.1: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.4.1: +9 -9 lines
Sync kqueue branch with -current.

Revision 1.50.2.5: download - view: text, markup, annotated - select for diffs
Tue Jan 8 00:34:52 2002 UTC (23 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.50.2.4: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.4: +7 -7 lines
Catch up to -current.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri Nov 23 21:44:27 2001 UTC (23 years, 2 months ago) by chs
Branches: MAIN
CVS tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +7 -7 lines
add spaces for KNF.  confirmed to produce identical objects.

Revision 1.50.2.4: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:18:58 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.50.2.3: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.3: +4 -3 lines
Catch up to -current.

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

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

Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue Nov 6 07:11:29 2001 UTC (23 years, 3 months ago) by simonb
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +1 -3 lines
Remove some variables that are set but never used.

Revision 1.52.2.1: download - view: text, markup, annotated - select for diffs
Mon Oct 1 12:48:27 2001 UTC (23 years, 4 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52: +1 -2 lines
Catch up with -current.

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

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Sep 15 20:36:43 2001 UTC (23 years, 5 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.52: preferred, colored
Changes since revision 1.52: +1 -2 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.50.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:13:26 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.50.2.1: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.1: +44 -38 lines
Catch up with -current.

Revision 1.51.4.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:14:08 2001 UTC (23 years, 6 months ago) by lukem
Branches: kqueue
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +44 -38 lines
update to -current

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Jul 13 20:30:24 2001 UTC (23 years, 7 months ago) by perseant
Branches: MAIN
CVS tags: thorpej-devvp-base, pre-chs-ubcperf
Branch point for: thorpej-devvp
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +44 -38 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.51.2.3: download - view: text, markup, annotated - select for diffs
Mon Jul 2 17:48:19 2001 UTC (23 years, 7 months ago) by perseant
Branches: perseant-lfsv2
Diff to: previous 1.51.2.2: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.2: +28 -26 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.51.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 29 03:56:41 2001 UTC (23 years, 7 months ago) by perseant
Branches: perseant-lfsv2
Diff to: previous 1.51.2.1: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.1: +5 -13 lines
Get rid of __P(), protoizing where it had not already been done

Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 27 03:49:39 2001 UTC (23 years, 7 months ago) by perseant
Branches: perseant-lfsv2
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +19 -7 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.50.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 21 20:10:10 2001 UTC (23 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
Catch up to -current.

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

Revision 1.37.2.3: download - view: text, markup, annotated - select for diffs
Fri Mar 23 05:26:39 2001 UTC (23 years, 11 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.37.2.2: preferred, colored; branchpoint 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.2.2: +18 -11 lines
Pull up revisions 1.46-1.47 (via patch, requested by perseant):
  o Close up accounting holes in LFS' accounting of immediately-
    available-space, number of clean segments, and amount of dirty
    space taken up by metadata (PR#11468, PR#11470, PR#11534).
This one got left out when the rest was pulled up.  Sorry.

Revision 1.27.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 8 09:20:14 2000 UTC (24 years, 2 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.27.2.2: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.2.2: +7 -8 lines
Sync with HEAD.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Dec 3 05:56:27 2000 UTC (24 years, 2 months ago) by perseant
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +0 -0 lines
Get rid of some old unnecessary code that cleared B_NEEDCOMMIT from buffers in
lfs_writeseg (possibly after they had been freed).

If MALLOCLOG is defined, make lfs_newbuf and lfs_freebuf pass along the
caller's file and line to _malloc and _free.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Nov 27 08:39:56 2000 UTC (24 years, 2 months ago) by chs
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +1 -3 lines
Initial integration of the Unified Buffer Cache project.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Mon Nov 27 03:33:57 2000 UTC (24 years, 2 months ago) by perseant
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +8 -7 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.27.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:06:51 2000 UTC (24 years, 2 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.27.2.1: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.1: +18 -11 lines
Sync with HEAD.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Nov 21 00:00:31 2000 UTC (24 years, 3 months ago) by perseant
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +16 -1 lines
More locked_queue_* and lfs_avail accounting fixes from Jesse Off
<joff@gci-net.com>.  Remove a specious btodb() in lfs_fragextend, and
count blocks shrunk or removed by VOP_TRUNCATE in lfs_avail.

Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:11:49 2000 UTC (24 years, 3 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +510 -336 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Nov 17 19:14:41 2000 UTC (24 years, 3 months ago) by perseant
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -11 lines
Correct accounting of lfs_avail, locked_queue_count, and locked_queue_bytes.
(PR #11468).  In the case of fragment allocation, check to see if enough
space is available before extending a fragment already scheduled for writing.

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

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

Revision 1.37.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 1 03:56:53 2000 UTC (24 years, 3 months ago) by tv
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2
Diff to: previous 1.37.2.1: preferred, colored; branchpoint 1.37: preferred, colored
Changes since revision 1.37.2.1: +5 -10 lines
Pullup 1.45 [perseant, toshii]:
In lfs_truncate, don't overcount the real blocks removed from the inode,
when deallocating a fragment that has not made it to disk yet.

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

These two changes should close PR #11064.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Oct 14 23:22:14 2000 UTC (24 years, 4 months ago) by perseant
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +5 -10 lines
In lfs_truncate, don't overcount the real blocks removed from the inode,
when deallocating a fragment that has not made it to disk yet.

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

These two changes should close PR #11064.

Revision 1.37.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 14 18:50:18 2000 UTC (24 years, 5 months ago) by perseant
Branches: netbsd-1-5
CVS tags: netbsd-1-5-BETA
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +479 -335 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.44: download - view: text, markup, annotated - select for diffs
Sat Sep 9 04:49:55 2000 UTC (24 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +16 -6 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.43: download - view: text, markup, annotated - select for diffs
Sat Sep 9 03:47:05 2000 UTC (24 years, 5 months ago) by perseant
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +7 -3 lines
Make sure to unmark B_DELWRI on blocks freed due to truncation to a non-zero
file length.  Should fix PR #s 10551 and 10831.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Jul 5 22:25:43 2000 UTC (24 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -5 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.41: download - view: text, markup, annotated - select for diffs
Tue Jul 4 22:30:37 2000 UTC (24 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
Fix errors observed while trying to fill the filesystem with yesterday's
fixes:

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

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

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

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Jul 3 01:45:51 2000 UTC (24 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +33 -16 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.39: download - view: text, markup, annotated - select for diffs
Wed Jun 28 14:16:42 2000 UTC (24 years, 7 months ago) by mrg
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +1 -3 lines
remove include of <vm/vm.h> and <uvm/uvm_extern.h>

Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Jun 27 20:57:14 2000 UTC (24 years, 7 months ago) by perseant
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +444 -328 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.36.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 17:10:37 2000 UTC (24 years, 8 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +4 -4 lines
Sync w/ netbsd-1-5-base.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed May 31 01:40:02 2000 UTC (24 years, 8 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +4 -4 lines
update for IN_ACCESSED changes

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat May 13 23:43:15 2000 UTC (24 years, 9 months ago) by perseant
Branches: MAIN
CVS tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +6 -5 lines
Change the sementics of the last parameter from a boolean ("waitfor") to
a set of flags ("flags").  Two flags are defined, UPDATE_WAIT and
UPDATE_DIROP.

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

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

Closes PR#8996.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri May 5 20:59:21 2000 UTC (24 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +63 -57 lines
Change the way LFS does block accounting, from trying to infer from the
buffer cache flags, to marking the inode and/or indirect blocks with a
special disk address UNWRITTEN==-2 when a block is accounted for.  (This
address is never written to disk, but only used in-core.  This is essentially
the same method of block accounting as on the UBC branch, where the buffer
headers don't exist.)  Make sure that truncation is handled properly,
especially in the case of holey files.

Fixes PR#9994.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Apr 24 19:07:16 2000 UTC (24 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -3 lines
get rid of unused variable aflags

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

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Mar 12 01:45:01 2000 UTC (24 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -2 lines
lfs_truncate: handle synlinks with length > maxsymlink_len as regular files.
For symlinks > 60 chars we were bzero'ing part of (struct inode) past the
actual inode struct, corrupting memory following the current (struct inode)
resuling in a 'panic: pool_get(lfsinopl): free list modified' later.
This could also be the cause of random panics. With this fix LFS seems to be
useable for me now.

Revision 1.22.2.5: download - view: text, markup, annotated - select for diffs
Thu Jan 20 21:02:03 2000 UTC (25 years, 1 month ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002
Diff to: previous 1.22.2.4: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.2.4: +7 -4 lines
Pull up revisions 1.29-1.30 (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.30: download - view: text, markup, annotated - select for diffs
Wed Jan 19 00:03:04 2000 UTC (25 years, 1 month ago) by perseant
Branches: MAIN
CVS tags: chs-ubc2-newbase
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +6 -3 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.29: download - view: text, markup, annotated - select for diffs
Sun Jan 16 05:56:14 2000 UTC (25 years, 1 month ago) by perseant
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2 lines
Fix a problem in my changes of Dec 14th, that prevents removed vnodes
from being inactivated under some conditions.  Removed vnodes are now
inactivated when the VDIROP flag is cleared, and to prevent block
accounting problems this clearing has been postponed until
lfs_segunlock.

Revision 1.22.2.4: download - view: text, markup, annotated - select for diffs
Sat Jan 15 17:51:09 2000 UTC (25 years, 1 month ago) by he
Branches: netbsd-1-4
Diff to: previous 1.22.2.3: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.3: +2 -2 lines
Pull up revision 1.27 (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.27.8.2: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:36:40 1999 UTC (25 years, 1 month ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.27.8.1: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.8.1: +10 -6 lines
Pull up to last week's -current.

Revision 1.27.8.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 23:20:09 1999 UTC (25 years, 2 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -2 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.22.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 17 23:21:56 1999 UTC (25 years, 2 months ago) by he
Branches: netbsd-1-4
Diff to: previous 1.22.2.2: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.2: +21 -3 lines
Pull up revision 1.25 (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.22.2.1.4.1: download - view: text, markup, annotated - select for diffs
Tue Nov 30 13:36:23 1999 UTC (25 years, 2 months ago) by itojun
Branches: kame
CVS tags: kame_141_19991130
Diff to: previous 1.22.2.1: preferred, colored; next MAIN 1.22.2.2: preferred, colored
Changes since revision 1.22.2.1: +4 -3 lines
bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

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

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

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Nov 23 23:52:42 1999 UTC (25 years, 2 months ago) by fvdl
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +10 -6 lines
Be more careful to block bio interrupts for some data structures. There
were at least a few missed cases where vp->v_{clean,dirty}blkhd were
unprotected since the softdep/trickle sync merge.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Sep 3 22:48:51 1999 UTC (25 years, 5 months ago) by perseant
Branches: MAIN
CVS tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +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.22.2.1.2.3: download - view: text, markup, annotated - select for diffs
Tue Aug 31 21:03:46 1999 UTC (25 years, 5 months ago) by perseant
Branches: chs-ubc2
Diff to: previous 1.22.2.1.2.2: preferred, colored; branchpoint 1.22.2.1: preferred, colored; next MAIN 1.22.2.2: preferred, colored
Changes since revision 1.22.2.1.2.2: +15 -10 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.22.2.1.2.2: download - view: text, markup, annotated - select for diffs
Sun Jul 11 05:44:00 1999 UTC (25 years, 7 months ago) by chs
Branches: chs-ubc2
Diff to: previous 1.22.2.1.2.1: preferred, colored; branchpoint 1.22.2.1: preferred, colored
Changes since revision 1.22.2.1.2.1: +1 -2 lines
remove uvm_vnp_uncache(), it's no longer needed.

Revision 1.22.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 25 20:51:00 1999 UTC (25 years, 7 months ago) by perry
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH001
Diff to: previous 1.22.2.1: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.1: +4 -3 lines
pullup 1.25->1.26 (perseant)

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

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Jun 15 22:25:41 1999 UTC (25 years, 8 months ago) by perseant
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -3 lines
Minor changes to the segment live bytes calculation.  In particular, fixed
a bug in fragment extension that could run the count negative.  Also, don't
overcount for inodes, and don't count segment summaries.  Thus, for empty
segments the live bytes count should now be exactly zero.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Jun 1 03:00:40 1999 UTC (25 years, 8 months ago) by perseant
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +21 -3 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.22.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 13 21:33:55 1999 UTC (25 years, 10 months ago) by perseant
Branches: netbsd-1-4
CVS tags: netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: kame, chs-ubc2
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +10 -1 lines
Pull-up of changes made to the trunk on Sunday [1.22->1.24], 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.24: download - view: text, markup, annotated - select for diffs
Mon Apr 12 00:30:08 1999 UTC (25 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +7 -1 lines
Fix block counting during file truncation, if not truncating to zero.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Apr 12 00:25:13 1999 UTC (25 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -1 lines
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.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Apr 1 23:28:09 1999 UTC (25 years, 10 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +36 -19 lines
Fix buffer handling problems in lfs_vinvalbuf

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Mar 29 21:51:38 1999 UTC (25 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +65 -3 lines
lfs_truncate calls vinvalbuf to invalidate all currently-hald buffers, which
in turn forces a flush of the vnode, whether or not it is involved in a dirop.
(This can happen during a remove or rmdir, when the directory is shrunk.)
Because of the nature of dirops, however, flushing a vnode involved in a dirop
is disallowed (and was marked with a panic).  This patch has lfs_truncate
call a specialized vinvalbuf that only invalidates buffers following the new
end-of-file, and thus does not require a flush.  Also the panic is demoted,
in case I missed any other path to lfs_vflush.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Mar 25 21:39:18 1999 UTC (25 years, 10 months ago) by perseant
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +7 -5 lines
clean up unused/required #ifdefs

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Mar 24 05:51:31 1999 UTC (25 years, 11 months ago) by mrg
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -9 lines
completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Mar 10 00:20:00 1999 UTC (25 years, 11 months ago) by perseant
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +128 -45 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.17: download - view: text, markup, annotated - select for diffs
Fri Mar 5 21:09:50 1999 UTC (25 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -6 lines
Pass null pointers to VOP_UPDATE rather than having all the callers fetch the
current time themselves.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Mar 5 20:47:07 1999 UTC (25 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -2 lines
Permit the access and modify time pointers passed to VOP_UPDATE to be null,
meaning the current time.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Feb 10 13:14:09 1999 UTC (26 years ago) by bouyer
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -2 lines
Make sure a buffer optained from bread() is always bresle()'d in case of
error. Closes PR kern/1448 from Wolfgang Solfrank.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Jun 9 07:46:33 1998 UTC (26 years, 8 months ago) by scottr
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach, eeh-paddr_t-base, eeh-paddr_t, chs-ubc-base, chs-ubc
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -1 lines
Protect various config(8)-generated files from inclusion while
building LKMs.  Fixes PR 5557.

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

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:23:24 1998 UTC (26 years, 11 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +61 -56 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:12 1998 UTC (26 years, 11 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: +58 -49 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, 11 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: +1 -2 lines
Import 4.4BSD-Lite for reference

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Feb 7 17:29:07 1998 UTC (27 years ago) by chs
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +9 -1 lines
add UVM stuff.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jul 4 20:22:18 1997 UTC (27 years, 7 months ago) by drochner
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -2 lines
Don't cast 64bit (off_t) file sizes to vm_offset_t (32bit on many
architectures), truncate them intelligently instead.
The truncation is done centralized in vnode_pager.c.
This prevents from wrap-over effects when parts of large (>2^32 byte) files
are mmapped.
Don't allow to mmap above the numerical range of vm_offset_t.
This is considered a temporary solution until the vm system handles the
object sizes/offsets more cleanly.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jun 11 10:09:57 1997 UTC (27 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: bouyer-scsipi
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +21 -21 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.8: download - view: text, markup, annotated - select for diffs
Sat Oct 12 21:58:50 1996 UTC (28 years, 4 months ago) by christos
Branches: MAIN
CVS tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -4 lines
revert previous kprintf changes

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Oct 10 17:21:24 1996 UTC (28 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -4 lines
printf -> kprintf, sprintf -> ksprintf

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Sep 1 23:49:27 1996 UTC (28 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +12 -25 lines
Add a set of generic file system operations that most file systems use.
Also, fix some time stamp bogosities.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat May 11 18:27:35 1996 UTC (28 years, 9 months ago) by mycroft
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.4: preferred, colored
Changes since revision 1.4: +15 -10 lines
Change VOP_UPDATE() semantics:
* Make 2nd and 3rd args timespecs, not timevals.
* Consistently pass a Boolean as the 4th arg (except in LFS).
Also, fix ffs_update() and lfs_update() to actually change the nsec fields.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Feb 9 22:28:52 1996 UTC (29 years ago) by christos
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +15 -13 lines
lfs prototypes

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jun 15 23:22:44 1995 UTC (29 years, 8 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.2: preferred, colored
Changes since revision 1.2: +4 -4 lines
compensate for timeval/timespec/stat structure changes.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:46:57 1994 UTC (30 years, 7 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:35 1994 UTC (30 years, 8 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>