fvdl
a3ff3a3038
Bump daddr_t to 64 bits. Replace it with int32_t in all places where
...
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
thorpej
b78f59b443
Merge the nathanw_sa branch.
2003-01-18 08:51:40 +00:00
yamt
03e1a46833
- zerofill struct lfs when allocating it.
...
- use M_ZERO instead of memset after malloc.
2003-01-12 13:04:52 +00:00
yamt
5f254d46cc
backout wrong assertions that i added.
2003-01-08 17:16:52 +00:00
yamt
99d625b53c
for lfs_remove/lfs_rmdir, keep removed vnodes marked VDIROP.
...
(backout parts of rev.1.40)
otherwise, directory structures can be corrupted because checkpoints can
occur via eg. lfs_vflush before parent directory is written.
2003-01-08 17:14:58 +00:00
yamt
69f1c0cb29
in set_dirop/endop, use normal vref/vrele instead of lfs versions
...
so that we don't miss lfs_inactivate.
2003-01-08 15:43:29 +00:00
yamt
ee36fccabb
add assertions.
2003-01-08 15:40:54 +00:00
yamt
49d2b56b43
use lfs_unmark_vnode instead of duplicated code fragments.
2003-01-08 15:40:04 +00:00
wiz
1035faff1d
writable, not writeable.
2003-01-06 20:30:28 +00:00
chs
822a8f2c0f
several bugs:
...
- move calls to softdep_setup_pagecache() (which can sleep to allocate
memory) outside the softdep lock.
- replace the softdep_flush_indir() hack (which tries to find another
vnode to fsync when we are holding lots of buffer-cache buffers locked
for long periods of time) with softdep_trackbufs() (which just kicks
the syncer and sleeps under the same circumstances). the former method
had a lock-ordering problem which would occasionally deadlock.
- relax the assertion in softdep_sync_metadata() which says that we should
never see D_ALLOCDIRECT deps for VREG vnodes. it's ok to see those
attached to indirect blocks.
also, there's no need to splbio() while allocating the buffer headers
to which pagecache dependencies are attached, so remove that.
fixes all the problems in PR 19288.
2003-01-01 23:08:56 +00:00
yamt
a5bf83bbfc
don't set vnode type to VNON in error case of ufs_makeinode.
...
(backout rev.1.74)
it seems that there's no need to do it (anymore?) and LFS has trouble with it.
(VNON vnodes marked VDIROP will never reclaimed)
ok'ed by Frank van der Linden.
2002-12-31 15:00:18 +00:00
yamt
140a8e56ca
write ifile only when it has dirty buffers.
2002-12-31 14:54:32 +00:00
yamt
cb9613feef
comment and assertions
2002-12-30 05:34:17 +00:00
yamt
6fc496c67a
move check of lfs_unlockvp from lfs_reserveavail to lfs_reserve
...
because lfs_reservebuf needs same check as well.
2002-12-30 05:31:53 +00:00
yamt
a05fbf74c0
fix vref/vunref mismatch.
2002-12-29 14:08:12 +00:00
yamt
88ae33f9e0
backout assertions in lfs_inactive.
...
they can be false when unmounting forcibly.
2002-12-29 07:05:55 +00:00
christos
ae2bf40b7e
fix compile problem.
2002-12-28 20:08:36 +00:00
yamt
d840722863
avoid warnings without DIAGNOSTIC.
...
pointed by Andreas Wrede.
2002-12-28 17:22:47 +00:00
yamt
a428d8a5af
dirop inode can't be passed to lfs_inactivate.
2002-12-28 15:12:26 +00:00
yamt
59be5399b7
- in lfs_reserve, vref vnodes that we're locking so that cleaner doesn't
...
try to reclaim them.
(workaround for deadlock noted in the comment in lfs_reserveavail)
- in lfs_rename, mark vnodes which are being moved as well as directry vnodes.
2002-12-28 14:39:08 +00:00
hannken
c122326822
Clear IN_SPACECOUNTED on (re-)used inodes.
...
This cures the "unmount pending error:" on softdep umounts.
Approved by: Frank van der Linden <fvdl@netbsd.org>
2002-12-27 16:07:13 +00:00
yamt
4b9c604ba7
- in lfs_reserve, reserve locked buffer count as well.
...
- don't wait for locking buf in lfs_bwrite_ext to avoid deadlocks.
- skip lfs_reserve when we're doing dirop.
reserve more (for lfs_truncate) in set_dirop instead.
this mostly solves PR 18972. (and hopefully PR 19196)
2002-12-26 13:37:18 +00:00
yamt
e9bd1836a5
don't try to write all blocks passed to lfs_markv at once
...
since it likely causes buf starvation.
2002-12-26 13:04:39 +00:00
yamt
362c57a2d2
add a XXX comment. (description of possible deadlock)
2002-12-22 17:31:52 +00:00
yamt
4370be165c
add a XXX comment
2002-12-21 05:35:54 +00:00
yamt
0d95cc5d66
correct/add assertion.
2002-12-18 14:05:50 +00:00
yamt
beff0dd387
#if 0 out vnode unlock/lock in lfs_reserve for now and add a comment about it.
...
deadlock is better than corruption (or panic), IMO.
2002-12-17 15:23:37 +00:00
yamt
a999523301
no need for cleaner to hold vnode locks.
...
cleaner and normal vnode operations are synchronized enough by
seglock/fraglock and buf's B_BUSY-ness.
2002-12-17 14:37:49 +00:00
yamt
b2d5b49e2b
use ufs_daddr_t instead of int where appropriate.
2002-12-17 14:28:54 +00:00
yamt
a79cb6db43
- in lfs_bwrite_ext, if we're cleaner,
...
mark inode IN_CLEANING rather then IN_MODIFIED.
otherwise cleaned (indirect) blocks belongs to the inode isn't written
until next sync.
- add assertions.
2002-12-14 13:41:25 +00:00
yamt
e5ea55e4ea
in lfs_writefile, check v_type==VNON earlier.
...
to avoid null dereference with DEBUG_LFS_VERBOSE.
2002-12-14 11:54:47 +00:00
yamt
8fe8a4ced8
save a segment write when doing checkpoint.
2002-12-13 14:40:02 +00:00
yamt
275b3a47a2
correct DIAGNOSTIC code for duplicated inodes in a segment and su_nbytes.
2002-12-12 12:28:13 +00:00
yamt
9097ffce96
take care of B_CLRBUF in lfs_balloc.
...
otherwise you'll see uninitialized blocks.
2002-12-11 13:34:14 +00:00
matt
60db16d1ff
Add multiple inclusion protection for headers. Fix mismatched
...
variable declarations (missing const's) as needed.
2002-12-01 00:12:06 +00:00
kristerw
fa033b67e7
Softdep is mature enough that it shouldn't define DEBUG and DIAGNOSTIC
...
unconditionally.
2002-11-30 20:27:50 +00:00
yamt
2331faab98
more XXX comment.
2002-11-27 11:36:40 +00:00
lukem
0635de35a3
Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
2002-11-26 23:30:07 +00:00
yamt
42a8b926f9
eliminate i_ino from in-core inode
...
and use local variable instead.
ok'ed by Frank van der Linden.
2002-11-26 01:23:30 +00:00
thorpej
d6f8cc841d
Avoid strict-alias warnings.
2002-11-25 01:55:21 +00:00
thorpej
b409a344b5
Avoid strict-alias warnings.
2002-11-25 01:44:21 +00:00
yamt
3af39ea015
in lfs_fakebuf, make corresponding buffer busy to avoid
...
reading blocks that isn't written yet.
it's needed because we'll update metadatas in lfs_updatemeta
before data pointed by them is actually written to disk.
XXX should be solved with fake inode/indirect blocks instead?
2002-11-24 16:39:13 +00:00
yamt
290fa35864
add a XXX comment to lfs_reserve.
...
* it isn't safe to unlock vp here
* because we're passing data using inode from namei.
* (eg. i_offset)
2002-11-24 16:09:50 +00:00
scw
7009056578
Quell an uninitialised variable warning.
2002-11-24 11:09:13 +00:00
yamt
eca07565c3
make sure i_lfs_fragsize is initialized.
...
fix panic "lfs_writefile: more than one fragment!"
PR 18974.
2002-11-24 08:43:26 +00:00
yamt
16a26d41e8
lfs_sync should wait at lfs_writer, not lfs_dirops.
...
PR 18973.
2002-11-24 08:37:43 +00:00
yamt
feacf34c09
lfs_reserve shouldn't block for lfs_unlockvp.
...
otherwise cleaner deadlocks.
PR 19134.
2002-11-24 08:32:22 +00:00
yamt
37b4f42285
blksize() macro shouldn't used for indirect blocks.
...
this fixes "getblk: block size invariant failed" panic.
PR 18977.
2002-11-24 08:27:00 +00:00
yamt
7d0ba73802
correct locking for lfs_rmdir. PR 18976.
2002-11-24 08:23:41 +00:00
wiz
29d58d0333
s/sqiud/squid/ in comment, reported by skrueger at europe com.
2002-11-04 16:59:37 +00:00