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
Current tag: MAIN


Revision 1.112 / (download) - annotate - [select for diffs], Sat Apr 9 23:38:33 2022 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
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 (23 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 (2 years 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 (2 years, 7 months 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.108 / (download) - annotate - [select for diffs], Sun Apr 12 17:02:52 2020 UTC (3 years, 11 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 (3 years, 11 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.106 / (download) - annotate - [select for diffs], Mon Mar 16 21:20:10 2020 UTC (4 years 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 (4 years 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 (4 years ago) by ad
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

Typo.

Revision 1.103 / (download) - annotate - [select for diffs], Mon Dec 10 21:19:33 2018 UTC (5 years, 3 months 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 (5 years, 3 months 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.101 / (download) - annotate - [select for diffs], Sat Dec 2 17:29:55 2017 UTC (6 years, 3 months 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 (6 years, 5 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 (6 years, 5 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 (6 years, 5 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.97 / (download) - annotate - [select for diffs], Thu Jun 8 01:23:01 2017 UTC (6 years, 9 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.96 / (download) - annotate - [select for diffs], Mon Apr 10 21:36:05 2017 UTC (6 years, 11 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 (6 years, 11 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 (6 years, 11 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 (6 years, 11 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.92 / (download) - annotate - [select for diffs], Fri Mar 17 03:19:46 2017 UTC (7 years 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 (7 years 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 (7 years 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 (7 years 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 (7 years 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 (7 years 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.86 / (download) - annotate - [select for diffs], Thu Nov 10 20:56:32 2016 UTC (7 years, 4 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.85 / (download) - annotate - [select for diffs], Fri Oct 28 20:38:12 2016 UTC (7 years, 5 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.84 / (download) - annotate - [select for diffs], Sun Oct 2 16:52:27 2016 UTC (7 years, 5 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 (7 years, 5 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 (7 years, 5 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 (7 years, 5 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 (7 years, 6 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 (7 years, 6 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.78 / (download) - annotate - [select for diffs], Thu May 19 18:32:29 2016 UTC (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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 (7 years, 10 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.64 / (download) - annotate - [select for diffs], Sun Nov 15 03:09:39 2015 UTC (8 years, 4 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 (8 years, 4 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.62 / (download) - annotate - [select for diffs], Sun Aug 9 07:40:59 2015 UTC (8 years, 7 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 (9 years, 5 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 (9 years, 6 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.59 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:11 2014 UTC (10 years, 1 month 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 (10 years, 6 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 (10 years, 6 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 (10 years, 6 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.55 / (download) - annotate - [select for diffs], Sat Feb 9 00:32:12 2013 UTC (11 years, 1 month 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.54 / (download) - annotate - [select for diffs], Sat Dec 8 07:24:42 2012 UTC (11 years, 3 months 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.53 / (download) - annotate - [select for diffs], Sat Nov 17 10:10:17 2012 UTC (11 years, 4 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 / (download) - annotate - [select for diffs], Sun Apr 29 22:55:11 2012 UTC (11 years, 11 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.51 / (download) - annotate - [select for diffs], Sat Jan 28 18:02:56 2012 UTC (12 years, 2 months 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 (12 years, 2 months 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 (12 years, 2 months 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 (12 years, 3 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 (12 years, 6 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 (12 years, 7 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.45 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:57 2011 UTC (12 years, 9 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.44 / (download) - annotate - [select for diffs], Thu May 26 04:51:57 2011 UTC (12 years, 10 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.43 / (download) - annotate - [select for diffs], Sun Feb 20 11:21:34 2011 UTC (13 years, 1 month 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 (13 years, 1 month 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.41 / (download) - annotate - [select for diffs], Wed Feb 16 19:43:05 2011 UTC (13 years, 1 month 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.40 / (download) - annotate - [select for diffs], Mon Feb 14 16:05:11 2011 UTC (13 years, 1 month 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 (13 years, 2 months 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.38 / (download) - annotate - [select for diffs], Tue Nov 9 16:30:26 2010 UTC (13 years, 4 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.37 / (download) - annotate - [select for diffs], Fri Sep 10 10:14:55 2010 UTC (13 years, 6 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.36 / (download) - annotate - [select for diffs], Wed Apr 21 19:50:57 2010 UTC (13 years, 11 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 (13 years, 11 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 / (download) - annotate - [select for diffs], Sat Feb 27 16:51:03 2010 UTC (14 years, 1 month 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 (14 years, 1 month 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 (14 years, 1 month 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 (14 years, 1 month 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 (14 years, 1 month 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 (14 years, 4 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 (14 years, 5 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 (14 years, 5 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.26 / (download) - annotate - [select for diffs], Tue Jul 14 20:59:00 2009 UTC (14 years, 8 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.25 / (download) - annotate - [select for diffs], Sun Apr 5 11:48:02 2009 UTC (14 years, 11 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 (15 years ago) by cegger
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

ansify function definitions

Revision 1.23 / (download) - annotate - [select for diffs], Sun Feb 22 20:10:25 2009 UTC (15 years, 1 month 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 (15 years, 1 month 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 (15 years, 1 month 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 (15 years, 1 month 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 (15 years, 1 month 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 (15 years, 1 month 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.17 / (download) - annotate - [select for diffs], Sat Jan 3 03:31:23 2009 UTC (15 years, 2 months 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.16 / (download) - annotate - [select for diffs], Mon Nov 24 16:05:21 2008 UTC (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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 (15 years, 4 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.3 / (download) - annotate - [select for diffs], Mon Aug 11 02:45:27 2008 UTC (15 years, 7 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 (15 years, 8 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, Tue Jun 10 14:51:22 2008 UTC (15 years, 9 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>