The NetBSD Project

CVS log for src/sys/kern/vfs_wapbl.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.112 / (download) - annotate - [select for diffs], Sat Apr 9 23:38:33 2022 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.111: +4 -4 lines
Diff to previous 1.111 (colored)

sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Apr 4 19:33:46 2022 UTC (9 months, 3 weeks ago) by andvar
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored)

fix various typos, mainly in comments.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Mar 12 15:32:32 2022 UTC (10 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.109: +4 -2 lines
Diff to previous 1.109 (colored)

sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

	  Thread A			  Thread B
	obj->foo = 42;			obj->baz = 73;
	mumble(&obj->bar);		grumble(&obj->quux);
	/* membar_exit(); */		/* membar_exit(); */
	atomic_dec -- not last		atomic_dec -- last
					/* membar_enter(); */
					KASSERT(invariant(obj->foo,
					    obj->bar));
					free_stuff(obj);

The memory barriers ensure that

	obj->foo = 42;
	mumble(&obj->bar);

in thread A happens before

	KASSERT(invariant(obj->foo, obj->bar));
	free_stuff(obj);

in thread B.  Without them, this ordering is not guaranteed.

So in general it is necessary to do

	membar_exit();
	if (atomic_dec_uint_nv(&obj->refcnt) != 0)
		return;
	membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting.  (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these.  Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that.  It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.

Revision 1.109 / (download) - annotate - [select for diffs], Tue Aug 3 20:25:43 2021 UTC (17 months, 3 weeks ago) by chs
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-futex2-base, thorpej-futex2
Changes since 1.108: +4 -2 lines
Diff to previous 1.108 (colored)

initialize wc_unused to 0, to avoid writing uninitialized memory to disk.
detected by KMSAN.

Revision 1.101.4.3 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.101.4.2: +16 -7 lines
Diff to previous 1.101.4.2 (colored) to branchpoint 1.101 (colored) next main 1.102 (colored)

Sync with HEAD

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:10 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.106: +18 -9 lines
Diff to previous 1.106 (colored) next main 1.107 (colored)

Sync with HEAD

Revision 1.108 / (download) - annotate - [select for diffs], Sun Apr 12 17:02:52 2020 UTC (2 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.107: +8 -4 lines
Diff to previous 1.107 (colored)

fix wapbl_discard() to actually discard the queued bufs properly - need
to set BC_INVAL for them, and also need to explicitly remove them
from the BQ_LOCKED queue

fixes DIAGNOSTIC panic when force unmounting unresponsive disk device
PR kern/51178 by Michael van Elst

Revision 1.107 / (download) - annotate - [select for diffs], Sun Apr 12 08:51:41 2020 UTC (2 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.106: +12 -7 lines
Diff to previous 1.106 (colored)

fix race between wapbl_discard() and wapbl_biodone() on forced
unmount on shutdown with slow I/O device

wapbl_discard() needs to hold both wl_mtx and bufcache_lock while
manipulating wl_entries - the rw lock is not enough, because
wapbl_biodone() only takes wl_mtx while removing the finished entry
from list

wapbl_biodone() must take bufcache_lock before reading we->we_wapbl,
so it's blocked until wapbl_discard() finishes, and takes !wl path
appropriately

this is supposed to fix panic on shutdown:
[ 67549.6304123] forcefully unmounting / (/dev/wd0a)...
...
[ 67549.7272030] panic: mutex_vector_enter,510: uninitialized lock (lock=0xffffa722a4f4f5b0, from=ffffffff80a884fa)
...
[ 67549.7272030] wapbl_biodone() at netbsd:wapbl_biodone+0x4d
[ 67549.7272030] biointr() at netbsd:biointr+0x7d
[ 67549.7272030] softint_dispatch() at netbsd:softint_dispatch+0x12c
[ 67549.7272030] Xsoftintr() at netbsd:Xsoftintr+0x4f

Revision 1.101.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:52 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.101.4.1: +17 -26 lines
Diff to previous 1.101.4.1 (colored) to branchpoint 1.101 (colored)

Merge changes from current as of 20200406

Revision 1.106 / (download) - annotate - [select for diffs], Mon Mar 16 21:20:10 2020 UTC (2 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.105: +14 -23 lines
Diff to previous 1.105 (colored)

Use the module subsystem's ability to process SYSCTL_SETUP() entries to
automate installation of sysctl nodes.

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

Revision 1.105 / (download) - annotate - [select for diffs], Sat Mar 14 15:32:51 2020 UTC (2 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

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

Revision 1.104 / (download) - annotate - [select for diffs], Sun Mar 8 18:26:59 2020 UTC (2 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

Typo.

Revision 1.101.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:04 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.101: +4 -3 lines
Diff to previous 1.101 (colored)

Sync with HEAD

Revision 1.101.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:04 2018 UTC (4 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.101: +4 -3 lines
Diff to previous 1.101 (colored) next main 1.102 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.103 / (download) - annotate - [select for diffs], Mon Dec 10 21:19:33 2018 UTC (4 years, 1 month ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored)

constify wapbl_ops

Revision 1.102 / (download) - annotate - [select for diffs], Mon Dec 10 21:03:48 2018 UTC (4 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.101: +3 -2 lines
Diff to previous 1.101 (colored)

add wo_wapbl_jlock_assert to wapbl_ops

Revision 1.52.2.5 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (5 years, 1 month ago) by jdolecek
Branch: tls-maxphys
Changes since 1.52.2.4: +802 -312 lines
Diff to previous 1.52.2.4 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored)

update from HEAD

Revision 1.101 / (download) - annotate - [select for diffs], Sat Dec 2 17:29:55 2017 UTC (5 years, 1 month ago) by jdolecek
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, 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
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.100: +27 -24 lines
Diff to previous 1.100 (colored)

according to benchmark extracting pkgsrc.tar, using FUA and hence waiting
for each transfer to write through to the medium is way slower than just
letting the drive use a cached write and doing DIOCCACHESYNC on the end

Results were (fs block 32KB / frag 4KB, partition aligned on 32KB boundary):
HDD at siisata(4):  no-FUA: 108 sec w/FUA: 294 sec
SSD at ahcisata(4): no-FUA:  73 sec w/FUA: 502 sec

change the flag so that FUA is only used for the commit block write;
for journal data write, only pass DPO, rely on the cache flush to get them
to media

Revision 1.100 / (download) - annotate - [select for diffs], Fri Oct 27 12:25:15 2017 UTC (5 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.99: +1 -1 lines
Diff to previous 1.99 (colored)

Revert printf return value change.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Oct 27 09:59:16 2017 UTC (5 years, 3 months ago) by utkarsh009
Branch: MAIN
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored)

[syzkaller] Cast all the printf's to (void *)
> as a result of new printf(9) declaration.

Revision 1.98 / (download) - annotate - [select for diffs], Mon Oct 23 19:03:40 2017 UTC (5 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.97: +5 -11 lines
Diff to previous 1.97 (colored)

remove counter for 'journal I/O bufs biowait' - it's (total - async), so
superfluous; adjust the description of the the other counters a bit to make
them more clear

Revision 1.61.2.6 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:08 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.61.2.5: +331 -72 lines
Diff to previous 1.61.2.5 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

Sync with HEAD

Revision 1.97 / (download) - annotate - [select for diffs], Thu Jun 8 01:23:01 2017 UTC (5 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.96: +3 -3 lines
Diff to previous 1.96 (colored)

move some buffer cache internals declarations from buf.h to vfs_bio.c.
this is needed to avoid name conflicts with ZFS and also
makes it clearer that other code shouldn't be messing with these.
remove the LFS debug code that poked around in bufqueues and
remove the BQ_EMPTY bufqueue since nothing uses it anymore.
provide a function to let LFS and wapbl read the value of nbuf for now.

Revision 1.78.2.4 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:27 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.78.2.3: +276 -71 lines
Diff to previous 1.78.2.3 (colored) to branchpoint 1.78 (colored) next main 1.79 (colored)

Sync with HEAD

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:03 2017 UTC (5 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.86: +336 -77 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

Sync with HEAD

Revision 1.96 / (download) - annotate - [select for diffs], Mon Apr 10 21:36:05 2017 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Changes since 1.95: +6 -6 lines
Diff to previous 1.95 (colored)

rename allow_fuadpo to allow_dpofua, so it's the same order as the SCSI flag

Revision 1.95 / (download) - annotate - [select for diffs], Mon Apr 10 21:34:37 2017 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.94: +195 -49 lines
Diff to previous 1.94 (colored)

improve performance of journal writes by parallelizing the I/O - use 4 bufs
by default, add sysctl vfs.wapbl.journal_iobufs to control it

this also removes need to allocate iobuf during commit, so it
might help to avoid deadlock during memory shortages like PR kern/47030

Revision 1.94 / (download) - annotate - [select for diffs], Mon Apr 10 19:52:38 2017 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.93: +18 -20 lines
Diff to previous 1.93 (colored)

change b_wapbllist to TAILQ, to preserve the LRU order

Revision 1.93 / (download) - annotate - [select for diffs], Wed Apr 5 20:38:53 2017 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.92: +70 -9 lines
Diff to previous 1.92 (colored)

optionally use FUA instead of full cache sync, and DPO for journal writes,
when supported by disk device; controlled by sysctl vfs.wapbl.allow_fuadpo,
default off for now

discussed on tech-kern

Revision 1.78.2.3 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:48 2017 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.78.2.2: +64 -10 lines
Diff to previous 1.78.2.2 (colored) to branchpoint 1.78 (colored)

Sync with HEAD

Revision 1.92 / (download) - annotate - [select for diffs], Fri Mar 17 03:19:46 2017 UTC (5 years, 10 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.91: +2 -4 lines
Diff to previous 1.91 (colored)

Back out part of previous: missed a caller of wapbl_write_inodes.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Mar 17 03:17:07 2017 UTC (5 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.90: +9 -9 lines
Diff to previous 1.90 (colored)

Nix trailing whitespace.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Mar 17 03:16:29 2017 UTC (5 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored)

Sort includes.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Mar 17 03:06:17 2017 UTC (5 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.88: +6 -2 lines
Diff to previous 1.88 (colored)

Assert write lock in wapbl_write_revocations, wapbl_write_inodes.

Only one call site, so trivial to prove correct.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Mar 5 20:45:49 2017 UTC (5 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.87: +3 -2 lines
Diff to previous 1.87 (colored)

add missing sys/evcnt.h include.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Mar 5 13:57:29 2017 UTC (5 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.86: +54 -3 lines
Diff to previous 1.86 (colored)

add some event counters, for commits, writes, cache flush

Revision 1.78.2.2 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:49 2017 UTC (6 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.78.2.1: +51 -23 lines
Diff to previous 1.78.2.1 (colored) to branchpoint 1.78 (colored)

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

Revision 1.61.2.5 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:26 2016 UTC (6 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.61.2.4: +79 -33 lines
Diff to previous 1.61.2.4 (colored) to branchpoint 1.61 (colored)

Sync with HEAD

Revision 1.86 / (download) - annotate - [select for diffs], Thu Nov 10 20:56:32 2016 UTC (6 years, 2 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20170204, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.85: +51 -23 lines
Diff to previous 1.85 (colored)

during truncate with wapbl, register deallocation for upper indirect block
before recursing into lower blocks, to make sure that it will be removed after
all its referenced blocks are removed

fixes 'ffs_blkfree_common: freeing free block' panic triggered by
ufs_truncate_retry() when just the upper indirect block registration failed,
code tried to free the lower blocks again after wapbl flush

problem found by hannken@, thank you

Revision 1.78.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:17 2016 UTC (6 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.78: +100 -70 lines
Diff to previous 1.78 (colored)

Sync with HEAD

Revision 1.85 / (download) - annotate - [select for diffs], Fri Oct 28 20:38:12 2016 UTC (6 years, 3 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.84: +31 -13 lines
Diff to previous 1.84 (colored)

reorganize ffs_truncate()/ffs_indirtrunc() to be able to partially
succeed; change wapbl_register_deallocation() to return EAGAIN
rather than panic when code hits the limit

callers changed to either loop calling ffs_truncate() using new
utility ufs_truncate_retry() if their semantics requires it, or
just ignore the failure; remove ufs_wapbl_truncate()

this fixes possible user-triggerable panic during truncate, and
resolves WAPBL performance issue with truncates of large files

PR kern/47146 and kern/49175

Revision 1.61.2.4 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:03 2016 UTC (6 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.61.2.3: +77 -65 lines
Diff to previous 1.61.2.3 (colored) to branchpoint 1.61 (colored)

Sync with HEAD

Revision 1.84 / (download) - annotate - [select for diffs], Sun Oct 2 16:52:27 2016 UTC (6 years, 3 months ago) by jdolecek
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004
Changes since 1.83: +7 -4 lines
Diff to previous 1.83 (colored)

drop wl_mtx mutex during call to pool_get() with PR_WAITOK

pointed out by riastradh

Revision 1.83 / (download) - annotate - [select for diffs], Sun Oct 2 16:44:02 2016 UTC (6 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.82: +4 -4 lines
Diff to previous 1.82 (colored)

fix off-by-one in wapbl_write_revocations() - when exiting the write loop,
wd gets set to next unwritten record, not last written one as code assumed;
'lost head!' KASSERT is not triggered any more

Revision 1.82 / (download) - annotate - [select for diffs], Sun Oct 2 14:38:46 2016 UTC (6 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.81: +3 -4 lines
Diff to previous 1.81 (colored)

wapbl_write_revocations(): fix use-after-free when writing more then one
block worth of revocations, introduced in previous commit; discovered by
Brad Harder on current-users

Revision 1.81 / (download) - annotate - [select for diffs], Sat Oct 1 13:15:45 2016 UTC (6 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.80: +55 -40 lines
Diff to previous 1.80 (colored)

allocate wapbl dealloc registration structures via pool, so that there is more
flexibility with limit handling

Revision 1.80 / (download) - annotate - [select for diffs], Thu Sep 22 16:22:29 2016 UTC (6 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

misplaced comment

Revision 1.79 / (download) - annotate - [select for diffs], Thu Sep 22 16:20:56 2016 UTC (6 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.78: +17 -22 lines
Diff to previous 1.78 (colored)

store the number of block records per block into wl as wl_brperjblock,
so that it's visible it's same value everywhere; no functional change

Revision 1.61.2.3 / (download) - annotate - [select for diffs], Sun May 29 08:44:37 2016 UTC (6 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.61.2.2: +289 -132 lines
Diff to previous 1.61.2.2 (colored) to branchpoint 1.61 (colored)

Sync with HEAD

Revision 1.78 / (download) - annotate - [select for diffs], Thu May 19 18:32:29 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.77: +6 -32 lines
Diff to previous 1.77 (colored)

Replace deprecated disabled code by comment

describing what it intends to do, and why it won't work yet

From coypu.

Revision 1.77 / (download) - annotate - [select for diffs], Sat May 7 22:12:29 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.76: +6 -4 lines
Diff to previous 1.76 (colored)

Tweak comment on wapbl_flush.

Revision 1.76 / (download) - annotate - [select for diffs], Sat May 7 21:15:38 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.75: +4 -4 lines
Diff to previous 1.75 (colored)

Use %jx and a cast to uintmax_t, not %x, to print a dev_t.

Revision 1.75 / (download) - annotate - [select for diffs], Sat May 7 21:11:51 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.74: +11 -4 lines
Diff to previous 1.74 (colored)

Clarify comment about early exit from wapbl_flush.

Note possible bug.  Requires further analysis.

Revision 1.74 / (download) - annotate - [select for diffs], Sat May 7 20:59:46 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

Omit unused parameter to wapbl_fini.

Revision 1.73 / (download) - annotate - [select for diffs], Sat May 7 20:39:33 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.72: +14 -26 lines
Diff to previous 1.72 (colored)

Delete debugging option wapbl_lazy_truncate.  Simplify.

Likely nobody has used this in the past decade -- you would have to
enter ddb and write 1 to it in order to enable it anyway.

Patch prepared by coypu.

Revision 1.72 / (download) - annotate - [select for diffs], Sat May 7 20:18:44 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.71: +8 -12 lines
Diff to previous 1.71 (colored)

Turn WAPBL_DEBUG panic or KASSERT into KASSERTMSG

From coypu.

Revision 1.71 / (download) - annotate - [select for diffs], Sat May 7 20:16:38 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.70: +222 -27 lines
Diff to previous 1.70 (colored)

Document log layout and internal subroutines of vfs_wapbl.c.

Revision 1.70 / (download) - annotate - [select for diffs], Sat May 7 17:47:34 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

KASSERT(A); KASSERT(B) instead of KASSERT(A && B).

Revision 1.69 / (download) - annotate - [select for diffs], Sat May 7 17:12:22 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.68: +10 -10 lines
Diff to previous 1.68 (colored)

Rename labels to make wapbl_flush a little easier to follow.

out ---> wait_out
out2 ---> out

From coypu.

Revision 1.68 / (download) - annotate - [select for diffs], Sat May 7 06:38:47 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.67: +17 -19 lines
Diff to previous 1.67 (colored)

Sort and deduplicate includes.

Revision 1.67 / (download) - annotate - [select for diffs], Tue May 3 19:43:45 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Fix non-DIAGNOSTIC build.

Revision 1.66 / (download) - annotate - [select for diffs], Tue May 3 19:17:16 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.65: +5 -5 lines
Diff to previous 1.65 (colored)

panic takes no \n.

From coypu.

Revision 1.65 / (download) - annotate - [select for diffs], Tue May 3 19:15:29 2016 UTC (6 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.64: +9 -12 lines
Diff to previous 1.64 (colored)

#ifdef DIAGNOSTIC panic ---> KASSERTMSG

From coypu.

Revision 1.61.2.2 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.61.2.1: +5 -13 lines
Diff to previous 1.61.2.1 (colored) to branchpoint 1.61 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.64 / (download) - annotate - [select for diffs], Sun Nov 15 03:09:39 2015 UTC (7 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.63: +3 -11 lines
Diff to previous 1.63 (colored)

Enable the module's MODULE_CMD_FINI action.  It actually works as
intended.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Nov 14 03:25:53 2015 UTC (7 years, 2 months ago) by pgoyette
Branch: MAIN
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Fix obvious typo - even though it is inside a #ifdef notyet ... #endif

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.61: +32 -6 lines
Diff to previous 1.61 (colored)

Sync with HEAD

Revision 1.59.4.1 / (download) - annotate - [select for diffs], Sun Aug 9 10:15:15 2015 UTC (7 years, 5 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.59: +32 -6 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #943):
	sys/kern/vfs_wapbl.c: revision 1.62
Refactor disk address calculation from physical block numbers in
the journal into a function. Make that function work correctly with
sector sizes != DEV_BSIZE when compiled outside the kernel (i.e.
fsck_ffs).
Fixes PR bin/45933

Revision 1.62 / (download) - annotate - [select for diffs], Sun Aug 9 07:40:59 2015 UTC (7 years, 5 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.61: +32 -6 lines
Diff to previous 1.61 (colored)

Refactor disk address calculation from physical block numbers in
the journal into a function. Make that function work correctly with
sector sizes != DEV_BSIZE when compiled outside the kernel (i.e.
fsck_ffs).
Fixes PR bin/45933

Revision 1.61 / (download) - annotate - [select for diffs], Sat Oct 18 08:33:29 2014 UTC (8 years, 3 months ago) by snj
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

src is too big these days to tolerate superfluous apostrophes.  It's
"its", people!

Revision 1.60 / (download) - annotate - [select for diffs], Fri Sep 5 05:57:21 2014 UTC (8 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.59: +19 -18 lines
Diff to previous 1.59 (colored)

Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

Revision 1.52.2.4 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.52.2.3: +17 -28 lines
Diff to previous 1.52.2.3 (colored) to branchpoint 1.52 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.47.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:41:04 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.47.2.3: +18 -29 lines
Diff to previous 1.47.2.3 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored)

sync with head.

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

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

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:08 2014 UTC (8 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.55: +17 -28 lines
Diff to previous 1.55 (colored) next main 1.56 (colored)

sync with head

Revision 1.59 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:11 2014 UTC (8 years, 11 months ago) by pooka
Branch: 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, netbsd-7-base, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: netbsd-7
Changes since 1.58: +3 -11 lines
Diff to previous 1.58 (colored)

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

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

Revision 1.58 / (download) - annotate - [select for diffs], Sun Sep 15 15:59:37 2013 UTC (9 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.57: +2 -5 lines
Diff to previous 1.57 (colored)

Remove unused variable

Revision 1.57 / (download) - annotate - [select for diffs], Sun Sep 15 08:11:33 2013 UTC (9 years, 4 months ago) by joerg
Branch: MAIN
Changes since 1.56: +4 -2 lines
Diff to previous 1.56 (colored)

Provide a prototype for wapbl_space_free under _KERNEL.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Sep 14 13:19:50 2013 UTC (9 years, 4 months ago) by joerg
Branch: MAIN
Changes since 1.55: +14 -16 lines
Diff to previous 1.55 (colored)

wapbl_advance and friends are only used in the kernel

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:58 2013 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.52.2.2: +96 -6 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored)

resync with head

Revision 1.55 / (download) - annotate - [select for diffs], Sat Feb 9 00:32:12 2013 UTC (9 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored)

why didn't gcc find the formatting error?

Revision 1.47.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:45 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.47.2.2: +111 -12 lines
Diff to previous 1.47.2.2 (colored) to branchpoint 1.47 (colored)

sync with (a bit old) head

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Wed Jan 2 23:23:15 2013 UTC (10 years ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-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
Changes since 1.51.2.1: +111 -12 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored)

Pull up following revision(s) (requested by hannken in ticket #758):
	sys/kern/vfs_wapbl.c: revision 1.53
	sys/kern/vfs_wapbl.c: revision 1.54
wapbl_biodone: Release the buffer before reclaiming the log.
   wapbl_flush() may wait for the log to become empty and
   all buffers should be unbusy before it returns.
Try to coalesce writes to the journal in MAXPHYS sized and aligned blocks.
Speeds up wapbl_flush() on raid5 by a factor of 3-4.
Discussed on tech-kern.
Needs pullup to NetBSD-6.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Dec 8 07:24:42 2012 UTC (10 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7
Changes since 1.53: +95 -5 lines
Diff to previous 1.53 (colored)

Try to coalesce writes to the journal in MAXPHYS sized and aligned blocks.
Speeds up wapbl_flush() on raid5 by a factor of 3-4.

Discussed on tech-kern.

Needs pullup to NetBSD-6.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:45 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.52.2.1: +18 -9 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored)

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

Revision 1.53 / (download) - annotate - [select for diffs], Sat Nov 17 10:10:17 2012 UTC (10 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.52: +18 -9 lines
Diff to previous 1.52 (colored)

wapbl_biodone: Release the buffer before reclaiming the log.
    wapbl_flush() may wait for the log to become empty and
    all buffers should be unbusy before it returns.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Wed Sep 12 06:15:34 2012 UTC (10 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.52: +6 -4 lines
Diff to previous 1.52 (colored)

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

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

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:35 2012 UTC (10 years, 7 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.48.2.1: +3 -2 lines
Diff to previous 1.48.2.1 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

sync to latest -current.

Revision 1.47.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:13 2012 UTC (10 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.47.2.1: +3 -2 lines
Diff to previous 1.47.2.1 (colored) to branchpoint 1.47 (colored)

sync with head.

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Mon May 7 03:01:13 2012 UTC (10 years, 8 months ago) by riz
Branch: netbsd-6
CVS Tags: 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, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored)

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

Revision 1.52 / (download) - annotate - [select for diffs], Sun Apr 29 22:55:11 2012 UTC (10 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base6, yamt-pagecache-base5, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored)

mark all wapbl I/O as BPRIO_TIMECRITICAL.
this is the second part of addressing PR 46325.

Revision 1.47.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:32 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.47: +82 -49 lines
Diff to previous 1.47 (colored)

sync with head

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:35 2012 UTC (10 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.48: +41 -29 lines
Diff to previous 1.48 (colored)

merge to -current.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jan 28 18:02:56 2012 UTC (11 years ago) by para
Branch: MAIN
CVS Tags: yamt-pagecache-base4, netbsd-6-base, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.50: +31 -30 lines
Diff to previous 1.50 (colored)

replacing malloc(9) with kmem(9)
wapbl_entries get there own pool, they are freed from softint context

ok: rmind@

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:40 2012 UTC (11 years ago) by para
Branch: MAIN
Changes since 1.49: +6 -6 lines
Diff to previous 1.49 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.49 / (download) - annotate - [select for diffs], Wed Jan 11 00:11:32 2012 UTC (11 years ago) by yamt
Branch: MAIN
Changes since 1.48: +14 -3 lines
Diff to previous 1.48 (colored)

comments

Revision 1.48 / (download) - annotate - [select for diffs], Fri Dec 2 12:38:59 2011 UTC (11 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.47: +44 -23 lines
Diff to previous 1.47 (colored)

- move disk cache flushing code into a separate function.
- more verbose output if vfs.wapbl.verbose_commit >= 2.
  namely, time taken for each DIOCCACHESYNC calls.
	wapbl_flush: 1322826000.785245900 this transaction = 546304 bytes
	wapbl_cache_sync: 1: dev 0x0 0.017572724
	wapbl_cache_sync: 2: dev 0x0 0.007199825
	wapbl_flush: 1322826011.860771302 this transaction = 431104 bytes
	wapbl_cache_sync: 1: dev 0x0 0.019469753
	wapbl_cache_sync: 2: dev 0x0 0.009473410
	wapbl_flush: 1322829266.489154342 this transaction = 187904 bytes
	wapbl_cache_sync: 1: dev 0x4 0.022270180
	wapbl_cache_sync: 2: dev 0x4 0.030749402
- fix a comment.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Sep 1 09:03:43 2011 UTC (11 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.46: +4 -2 lines
Diff to previous 1.46 (colored)

add a couple of asserts

Revision 1.46 / (download) - annotate - [select for diffs], Sun Aug 14 12:37:09 2011 UTC (11 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.45: +7 -7 lines
Diff to previous 1.45 (colored)

fix sign-compare warnings

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:22 2011 UTC (11 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.3.8.6 / (download) - annotate - [select for diffs], Sat Jun 18 17:00:25 2011 UTC (11 years, 7 months ago) by bouyer
Branch: 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
Changes since 1.3.8.5: +4 -5 lines
Diff to previous 1.3.8.5 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Pull up following revision(s) (requested by hannken in ticket #1627):
	sys/kern/vfs_wapbl.c: revisions			1.41-1.42
	sbin/dump/snapshot.c: revisions			1.6 (patch)
	share/man/man4/fss.4: revisions			1.15 (patch)
	sys/dev/fss.c: revisions			1.73 (patch)
	sys/dev/fssvar.h: revisions			1.25
	usr.sbin/fssconfig/fssconfig.c: revisions	1.7
	sys/ufs/ffs/ffs_balloc.c: revisions		1.54
	sys/ufs/ffs/ffs_snapshot.c: revisions		1.90, 1.98, 1.100-1.101, 1.103-1.110, 1.111, 1.112-1.115 (patch)

- Try to keep snapshot indirect blocks contiguous.  This speeds up snapshot
  creation by a factor of ~3 and reduces the file system suspension time by
  a factor of ~5.

- Refine the scope of WAPBL transactions and the limit for deallocations in
  one transaction so we should no longer get a "wapbl_flush: current
  transaction too big to flush" panic when creating or removing snapshots
  on larger logging disks.

- fss(4): Allow FSSIOCSET to set the initial flags.  Add a new flag
  "FSS_UNLINK_ON_CREATE" to unlink the backing store before the snapshot
  gets created.  With this change dump(8) no longer dumps the zero-sized,
  but named snapshot it is working on.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:57 2011 UTC (11 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

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

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

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

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

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

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

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:41 2011 UTC (11 years, 7 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.39: +22 -11 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

Sync with HEAD.

Revision 1.34.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:04 2011 UTC (11 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.34.2.3: +5 -5 lines
Diff to previous 1.34.2.3 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

sync with head

Revision 1.44 / (download) - annotate - [select for diffs], Thu May 26 04:51:57 2011 UTC (11 years, 8 months ago) by uebayasi
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.43: +7 -7 lines
Diff to previous 1.43 (colored)

Catch up with B_* flag name changes in debug code.

Revision 1.3.8.1.4.1 / (download) - annotate - [select for diffs], Fri May 20 08:11:27 2011 UTC (11 years, 8 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.3.8.1: +3 -3 lines
Diff to previous 1.3.8.1 (colored) next main 1.3.8.2 (colored)

bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).

Revision 1.3.8.2.2.2 / (download) - annotate - [select for diffs], Mon Mar 7 04:09:55 2011 UTC (11 years, 10 months ago) by riz
Branch: netbsd-5-1
CVS Tags: 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
Changes since 1.3.8.2.2.1: +17 -7 lines
Diff to previous 1.3.8.2.2.1 (colored) to branchpoint 1.3.8.2 (colored) next main 1.3.8.3 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1543):
	sys/kern/vfs_wapbl.c: revision 1.27
	sys/kern/vfs_wapbl.c: revision 1.28
Turn a KASSERT into a panic.  I don't want us to be randomly
overwriting memory on non-DIAGNOSTIC kernels if resource estimation
fails.
Add dealloccnt to list of things to be considered in the stetson-harrison
decision making algorithm for flushing a wapbl transation.

Revision 1.3.8.5 / (download) - annotate - [select for diffs], Mon Mar 7 04:09:28 2011 UTC (11 years, 10 months ago) by riz
Branch: netbsd-5
Changes since 1.3.8.4: +17 -7 lines
Diff to previous 1.3.8.4 (colored) to branchpoint 1.3 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1543):
	sys/kern/vfs_wapbl.c: revision 1.27
	sys/kern/vfs_wapbl.c: revision 1.28
Turn a KASSERT into a panic.  I don't want us to be randomly
overwriting memory on non-DIAGNOSTIC kernels if resource estimation
fails.
Add dealloccnt to list of things to be considered in the stetson-harrison
decision making algorithm for flushing a wapbl transation.

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:27 2011 UTC (11 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.34.2.2: +120 -25 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored)

sync with head

Revision 1.39.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 15:10:41 2011 UTC (11 years, 10 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.39.4.1: +4 -5 lines
Diff to previous 1.39.4.1 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

Sync with HEAD

Revision 1.43 / (download) - annotate - [select for diffs], Sun Feb 20 11:21:34 2011 UTC (11 years, 11 months ago) by nakayama
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

Fix digit number of nanosecond.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Feb 18 13:24:40 2011 UTC (11 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.41: +3 -4 lines
Diff to previous 1.41 (colored)

Adjust previous: set the dealloc soft limit to half hard limit.

Revision 1.39.4.1 / (download) - annotate - [select for diffs], Thu Feb 17 12:00:44 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.39: +15 -3 lines
Diff to previous 1.39 (colored)

Sync with HEAD

Revision 1.41 / (download) - annotate - [select for diffs], Wed Feb 16 19:43:05 2011 UTC (11 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: bouyer-quota2-base
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

Set the limit for deallocations in one transaction to a more realistic
(and much lower) value.  When flushing the log these deallocations will
produce new blocks and that may execeed the journal size resulting in
a "wapbl_flush: current transaction too big to flush" panic.
Seen when removing a large snapshot.

Adresses PR #44568 (WAPBL doens't play nice with snapshots).

Revision 1.3.8.4 / (download) - annotate - [select for diffs], Wed Feb 16 19:31:44 2011 UTC (11 years, 11 months ago) by bouyer
Branch: netbsd-5
Changes since 1.3.8.3: +68 -13 lines
Diff to previous 1.3.8.3 (colored) to branchpoint 1.3 (colored)

Pull up following revision(s) (requested by tron in ticket #1535):
	sys/kern/vfs_wapbl.c: revision 1.39 via patch
Add two sysctls one that does verbose transaction logging and a second one
that disables flushing the disk cache (which is fast but dangerous for
data integrity). From simon a long while back.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Feb 14 16:05:11 2011 UTC (11 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.39: +14 -2 lines
Diff to previous 1.39 (colored)

if DIAGNOSTIC, check the size of the transaction in wapbl_end().
Hopefully this will point us to the place which generaed the large
transaction, before an asynchronous panic() in wabl_end()

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jan 8 20:37:05 2011 UTC (12 years ago) by christos
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.38: +98 -17 lines
Diff to previous 1.38 (colored)

Add two sysctls one that does verbose transaction logging and a second one
that disables flushing the disk cache (which is fast but dangerous for
data integrity). From simon a long while back.

Revision 1.3.8.2.2.1 / (download) - annotate - [select for diffs], Mon Nov 22 02:53:19 2010 UTC (12 years, 2 months ago) by riz
Branch: netbsd-5-1
Changes since 1.3.8.2: +8 -5 lines
Diff to previous 1.3.8.2 (colored)

Pull up following revision(s) (requested by hannken in ticket #1477):
	sys/kern/vfs_wapbl.c: revision 1.38
Wapbl_register_deallocation(): the taken reader lock is not sufficient to
protect wl_dealloc* members.  Take the mutex here and change the lock
requirements of these fields to "writer lock or mutex".
This error lead to file system corruption and "freeing free block" panics.

Revision 1.3.8.3 / (download) - annotate - [select for diffs], Mon Nov 22 02:52:29 2010 UTC (12 years, 2 months ago) by riz
Branch: netbsd-5
CVS Tags: matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.3.8.2: +8 -5 lines
Diff to previous 1.3.8.2 (colored) to branchpoint 1.3 (colored)

Pull up following revision(s) (requested by hannken in ticket #1477):
	sys/kern/vfs_wapbl.c: revision 1.38
Wapbl_register_deallocation(): the taken reader lock is not sufficient to
protect wl_dealloc* members.  Take the mutex here and change the lock
requirements of these fields to "writer lock or mutex".
This error lead to file system corruption and "freeing free block" panics.

Revision 1.3.8.1.2.1 / (download) - annotate - [select for diffs], Mon Nov 22 02:49:47 2010 UTC (12 years, 2 months ago) by riz
Branch: netbsd-5-0
Changes since 1.3.8.1: +8 -5 lines
Diff to previous 1.3.8.1 (colored) next main 1.3.8.2 (colored)

Pull up following revision(s) (requested by hannken in ticket #1477):
	sys/kern/vfs_wapbl.c: revision 1.38
Wapbl_register_deallocation(): the taken reader lock is not sufficient to
protect wl_dealloc* members.  Take the mutex here and change the lock
requirements of these fields to "writer lock or mutex".
This error lead to file system corruption and "freeing free block" panics.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Nov 9 16:30:26 2010 UTC (12 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.37: +8 -5 lines
Diff to previous 1.37 (colored)

Wapbl_register_deallocation(): the taken reader lock is not sufficient to
protect wl_dealloc* members.  Take the mutex here and change the lock
requirements of these fields to "writer lock or mutex".

This error lead to file system corruption and "freeing free block" panics.

Revision 1.30.2.2 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:32 2010 UTC (12 years, 3 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.30.2.1: +2 -2 lines
Diff to previous 1.30.2.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

Sync with HEAD (-D20101022).

Revision 1.25.2.6 / (download) - annotate - [select for diffs], Sat Oct 9 03:32:33 2010 UTC (12 years, 3 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.2.5: +4 -4 lines
Diff to previous 1.25.2.5 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

sync with head

Revision 1.3.8.2 / (download) - annotate - [select for diffs], Mon Sep 13 19:52:49 2010 UTC (12 years, 4 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4
Branch point for: netbsd-5-1
Changes since 1.3.8.1: +3 -3 lines
Diff to previous 1.3.8.1 (colored) to branchpoint 1.3 (colored)

Apply patch (requested by drochner in ticket #1454):
Fix inconsistencies in the wapbl replay process which can lead to a
premature abort of the fsck run and possibly leave a corrupted
filesystem.  Addresses PR bin/43336.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Sep 10 10:14:55 2010 UTC (12 years, 4 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

fix two bugs reported by Ryo Shimizu:
-wrong initialization reported in a followup to PR bin/43336
 (looks harmless because it applies to zero-initialized memory, so
 LIST_INIT() is a no-op)
-wrong loop count in reply misses a hash bucket (PR kern/43827)
 (this was introduced by a post-netbsd-5 change, so it isn't related
 to the PR above)

Revision 1.25.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:45 2010 UTC (12 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.2.4: +26 -9 lines
Diff to previous 1.25.2.4 (colored) to branchpoint 1.25 (colored)

sync with head.

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Sun May 30 05:17:58 2010 UTC (12 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.34.2.1: +26 -9 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored)

sync with head

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:14 2010 UTC (12 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.30: +68 -26 lines
Diff to previous 1.30 (colored)

Sync with HEAD.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Apr 21 19:50:57 2010 UTC (12 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored)

dumdidumdum, need _KERNEL in previous for fsck.  noticed by moof

Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 21 16:51:24 2010 UTC (12 years, 9 months ago) by pooka
Branch: MAIN
Changes since 1.34: +24 -9 lines
Diff to previous 1.34 (colored)

Reduce #ifdef spew by attaching wapbl as a module.
(no, it's still too ifdef-ridden to be able to actually do anything
useful and module-like like load into any kernel)

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Tue Mar 16 15:38:10 2010 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

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

Revision 1.25.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:21 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.2.3: +76 -42 lines
Diff to previous 1.25.2.3 (colored) to branchpoint 1.25 (colored)

sync with head

Revision 1.34 / (download) - annotate - [select for diffs], Sat Feb 27 16:51:03 2010 UTC (12 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.33: +43 -28 lines
Diff to previous 1.33 (colored)

Move block number computations to callers of wapl_read/wapl_write and
conditionally build DEV_BSIZE adjustments for kernel. fsck_ffs shares
the same code but accesses physical blocks.

Also compute correct block numbers for each physical sector.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Feb 27 12:04:19 2010 UTC (12 years, 11 months ago) by mlelstv
Branch: MAIN
Changes since 1.32: +13 -4 lines
Diff to previous 1.32 (colored)

Store physical block numbers in superblock that point to the journal.
Calculate position of both commit headers correctly for disks with
large sectors.
Correct calculation of circular buffer size.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Feb 26 22:24:07 2010 UTC (12 years, 11 months ago) by mlelstv
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

mnt_fs_bshift is the filesystem block size, not the fragment size.

Revert to physical block size. This is fine as long as filesystem
and log stay on a similar physical medium.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Feb 23 20:51:25 2010 UTC (12 years, 11 months ago) by mlelstv
Branch: MAIN
Changes since 1.30: +8 -7 lines
Diff to previous 1.30 (colored)

Use correct offset to block number calculations.

Also change access to filesystem blocks to be done by fragment instead
of by physical block. Fragments are the fundamental blocks of the
filesystem.

For a theoretical filesystem that accesses the disk in smaller units
than stored in mp->mnt_fs_bshift, the assumption might be wrong. But
this will also break other subsystems. The value mp->mnt_dev_bshift
which formerly represents the physical sector size is currently only
virtual in NetBSD (always DEV_BSIZE).

Revision 1.30 / (download) - annotate - [select for diffs], Sat Feb 6 12:10:59 2010 UTC (12 years, 11 months ago) by uebayasi
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.29: +11 -11 lines
Diff to previous 1.29 (colored)

__inline -> inline

Revision 1.29 / (download) - annotate - [select for diffs], Wed Nov 25 14:43:31 2009 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.28: +8 -9 lines
Diff to previous 1.28 (colored)

make WAPBL_DEBUG_PRINT compile

Revision 1.28 / (download) - annotate - [select for diffs], Thu Oct 1 12:28:34 2009 UTC (13 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.27: +9 -5 lines
Diff to previous 1.27 (colored)

Add dealloccnt to list of things to be considered in the stetson-harrison
decision making algorithm for flushing a wapbl transation.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 1 07:42:45 2009 UTC (13 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.26: +10 -4 lines
Diff to previous 1.26 (colored)

Turn a KASSERT into a panic.  I don't want us to be randomly
overwriting memory on non-DIAGNOSTIC kernels if resource estimation
fails.

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:36 2009 UTC (13 years, 6 months ago) by jym
Branch: jym-xensuspend
Changes since 1.20.2.1: +8 -6 lines
Diff to previous 1.20.2.1 (colored) next main 1.21 (colored)

Sync with HEAD.

Revision 1.25.2.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:23 2009 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.2.2: +8 -6 lines
Diff to previous 1.25.2.2 (colored) to branchpoint 1.25 (colored)

sync with head.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 14 20:59:00 2009 UTC (13 years, 6 months ago) by apb
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.25: +8 -6 lines
Diff to previous 1.25 (colored)

Convert free text inside #ifdef to a proper comment.
Inspired by PR 41255 from Kurt Lidl.

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:58 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.20: +12 -37 lines
Diff to previous 1.20 (colored)

Sync with HEAD.

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

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:49 2009 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25.2.1: +2678 -0 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored)

sync with head.

Revision 1.3.6.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:01 2009 UTC (13 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.3.6.2: +5 -6 lines
Diff to previous 1.3.6.2 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync with HEAD.

Revision 1.25.2.1, Sun Apr 5 11:48:02 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.25: +0 -2678 lines
FILE REMOVED

file vfs_wapbl.c was added on branch yamt-nfs-mp on 2009-05-04 08:13:49 +0000

Revision 1.25 / (download) - annotate - [select for diffs], Sun Apr 5 11:48:02 2009 UTC (13 years, 9 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Branch point for: yamt-nfs-mp
Changes since 1.24: +4 -5 lines
Diff to previous 1.24 (colored)

fix sign-compare issues

Revision 1.24 / (download) - annotate - [select for diffs], Sun Mar 15 17:14:40 2009 UTC (13 years, 10 months ago) by cegger
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

ansify function definitions

Revision 1.3.6.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:57 2009 UTC (13 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.3.6.1: +63 -122 lines
Diff to previous 1.3.6.1 (colored) to branchpoint 1.3 (colored)

Sync with HEAD.

Revision 1.3.8.1 / (download) - annotate - [select for diffs], Tue Feb 24 04:13:35 2009 UTC (13 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-0, matt-nb5-mips64
Changes since 1.3: +7 -31 lines
Diff to previous 1.3 (colored)

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

Revision 1.23 / (download) - annotate - [select for diffs], Sun Feb 22 20:10:25 2009 UTC (13 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.22: +7 -31 lines
Diff to previous 1.22 (colored)

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

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

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

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

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

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

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

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 18 13:22:10 2009 UTC (13 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

redo rev.1.19 correctly.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Feb 18 13:12:00 2009 UTC (13 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

whitespace

Revision 1.20 / (download) - annotate - [select for diffs], Mon Feb 2 00:10:18 2009 UTC (13 years, 11 months ago) by yamt
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

remove a non-ascii comment.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Feb 2 00:07:06 2009 UTC (13 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.18: +10 -3 lines
Diff to previous 1.18 (colored)

back to malloc for now as wapbl_biodone is called by softint.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jan 31 09:33:36 2009 UTC (14 years ago) by yamt
Branch: MAIN
Changes since 1.17: +54 -96 lines
Diff to previous 1.17 (colored)

- malloc -> kmem_alloc
- kill WAPBL_UVM_ALLOC.
- kill wapbl_blk_pool to reduce #ifdef.

Revision 1.3.6.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:40 2009 UTC (14 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.3: +229 -274 lines
Diff to previous 1.3 (colored)

Sync with HEAD.

Revision 1.3.4.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:21 2009 UTC (14 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.3.4.2: +227 -272 lines
Diff to previous 1.3.4.2 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync with HEAD.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jan 3 03:31:23 2009 UTC (14 years ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

remove extra semicolons.

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:10 2008 UTC (14 years, 1 month ago) by haad
Branch: haad-dm
Changes since 1.1.4.1: +228 -273 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

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

Revision 1.16 / (download) - annotate - [select for diffs], Mon Nov 24 16:05:21 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.15: +4 -2 lines
Diff to previous 1.15 (colored)

Move the specification of the on-disk journal format into a separate
header.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Nov 20 00:17:08 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.14: +48 -39 lines
Diff to previous 1.14 (colored)

Push functionality to deal with existing inode records into a separate
function.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Nov 18 22:21:48 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.13: +46 -54 lines
Diff to previous 1.13 (colored)

Decouple journal operation from replay header by copying the interesting
fields into wapbl_replay as opposed to embedding wapbl_wc_header.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Nov 18 19:31:35 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

#if 0 wapbl_replay_verify.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Nov 18 18:54:39 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.11: +6 -4 lines
Diff to previous 1.11 (colored)

Check for NULL before calling free as the kernel free doesn't handle it.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 18 13:29:34 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.10: +6 -5 lines
Diff to previous 1.10 (colored)

Rename wapbl_replay_prescan to wapbl_replay_process.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Nov 18 11:37:37 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.9: +74 -127 lines
Diff to previous 1.9 (colored)

Refact wapbl_replay_prescan to use a function for each WAPBL record.
Merge wapbl_replay_get_inodes into wapbl_replay_prescan. Change the
logic to determine the head: It doesn't make sense to update it if the
last inode record seen was not the beginning of the journal, as the
beginning of the journal might not be 0, so always update inodeshead.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Nov 17 22:08:09 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.8: +20 -69 lines
Diff to previous 1.8 (colored)

In wapbl_replay_write just iterate over the hash table and not the
transactions. The initial prescan has already sorted out what blocks are
in the journal and removed any revoced blocks, so the hash table is
authorative.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Nov 17 19:36:11 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.7: +2 -3 lines
Diff to previous 1.7 (colored)

Remove debug printf.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 17 19:31:47 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.6: +23 -4 lines
Diff to previous 1.6 (colored)

Ensure that block records are correctly padded.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Nov 11 08:29:58 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.5: +21 -2 lines
Diff to previous 1.5 (colored)

Move WAPL replay handling from bread() into ufs_strategy.
This changes the order of hook processing as the copy-on-write handlers
are called after the journal processing. This makes more sense as the
journal overwrite is logically part of the disk IO.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Nov 10 20:30:31 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

Define wapbl_flush_fn_t only for the kernel.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 10 20:12:13 2008 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.3: +16 -4 lines
Diff to previous 1.3 (colored)

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

Revision 1.1.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:29 2008 UTC (14 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.1: +2783 -0 lines
Diff to previous 1.1 (colored)

Sync with HEAD.

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:54 2008 UTC (14 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.3.4.1: +2783 -0 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored)

Sync with HEAD.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:45 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.3.2.1: +2783 -0 lines
Diff to previous 1.3.2.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.3.4.1, Mon Aug 11 02:45:27 2008 UTC (14 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.3: +0 -2783 lines
FILE REMOVED

file vfs_wapbl.c was added on branch mjf-devfs2 on 2008-09-28 10:40:54 +0000

Revision 1.3.2.1, Mon Aug 11 02:45:27 2008 UTC (14 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.3: +0 -2783 lines
FILE REMOVED

file vfs_wapbl.c was added on branch wrstuden-revivesa on 2008-09-18 04:31:45 +0000

Revision 1.3 / (download) - annotate - [select for diffs], Mon Aug 11 02:45:27 2008 UTC (14 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: wrstuden-revivesa, nick-hppapmap, netbsd-5, mjf-devfs2
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

fix a comment.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jul 31 05:38:05 2008 UTC (14 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.1: +2783 -0 lines
Diff to previous 1.1 (colored)

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

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

OK'd by core@, releng@.

Revision 1.1.2.11 / (download) - annotate - [select for diffs], Mon Jul 28 04:04:32 2008 UTC (14 years, 6 months ago) by oster
Branch: simonb-wapbl
Changes since 1.1.2.10: +13 -2 lines
Diff to previous 1.1.2.10 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Turn on WAPBL_DEBUG_SERIALIZE in order to use RW_WRITER locks instead
of RW_READER locks in wapbl_begin().  Include the following comment as
well:

	XXX: The original code calls for the use of a RW_READER lock
	here, but it turns out there are performance issues with high
	metadata-rate workloads (e.g. multiple simultaneous tar
	extractions).  For now, we force the lock to be RW_WRITER,
	since that currently has the best performance characteristics
	(even for a single tar-file extraction).

Approved by: simonb

Revision 1.1.2.10 / (download) - annotate - [select for diffs], Fri Jul 25 14:23:01 2008 UTC (14 years, 6 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.1.2.9: +3 -3 lines
Diff to previous 1.1.2.9 (colored) to branchpoint 1.1 (colored)

Remove an XXX comment that doesn't apply.

Revision 1.1.2.9 / (download) - annotate - [select for diffs], Tue Jul 1 00:05:56 2008 UTC (14 years, 7 months ago) by matt
Branch: simonb-wapbl
Changes since 1.1.2.8: +3 -2 lines
Diff to previous 1.1.2.8 (colored) to branchpoint 1.1 (colored)

#include <sys/atomic.h> to make rump happy.

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Mon Jun 30 01:31:53 2008 UTC (14 years, 7 months ago) by oster
Branch: simonb-wapbl
Changes since 1.1.2.7: +4 -2 lines
Diff to previous 1.1.2.7 (colored) to branchpoint 1.1 (colored)

Protect v_numoutput with v_interlock.

Approved by: simonb

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Thu Jun 19 03:27:23 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.1.2.6: +4 -4 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored)

Fix reference counting for pool initialisation - atomic_inc_uint_nv()
will return 1 (not 0!) for the first time a value is incremented.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Wed Jun 18 17:53:21 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.1.2.5: +6 -2 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored)

In wapbl_stop(), destroy the condvars/mutexes/locks created in
wapbl_start().  Fixes a LOCKDEBUG panic.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Wed Jun 18 17:04:09 2008 UTC (14 years, 7 months ago) by rmind
Branch: simonb-wapbl
Changes since 1.1.2.4: +24 -40 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

- Remove wapbl_global_mtx, use atomic-ops for reference counting;
- Move few pool_put() calls out of the locked code area;

OK by <simonb>.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Thu Jun 12 08:39:21 2008 UTC (14 years, 7 months ago) by martin
Branch: simonb-wapbl
Changes since 1.1.2.3: +2 -9 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

License police

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Wed Jun 11 12:30:47 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.1.2.2: +6 -5 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Fix some whitespace and long line niggles.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Wed Jun 11 12:09:59 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.1.2.1: +3 -3 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

Fix a couple of typos.  From wizd.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Tue Jun 10 14:51:22 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.1: +2787 -0 lines
Diff to previous 1.1 (colored)

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

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

Revision 1.1, Tue Jun 10 14:51:22 2008 UTC (14 years, 7 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-pf42-base4, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: simonb-wapbl, haad-dm
FILE REMOVED

file vfs_wapbl.c was initially added on branch simonb-wapbl.

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




CVSweb <webmaster@jp.NetBSD.org>