perseant
4b8db8388e
Use the correct method to create a new inode, when we allocate lost+found.
...
Correct uninitialized variable issues in pass6.c and dir.c (PR#30411 and
PR#30394, respectively).
2005-06-08 19:09:55 +00:00
he
e82dc5dc94
Initialize metalbn in ufs_getlbns to appease -Wuninitialized.
...
Marked with XXXGCC for dreamcast (found while compiling for it).
Reviewed by lukem.
2005-06-07 09:08:07 +00:00
lukem
1ab5811713
Disable -Wuninitialized on dir.c (until PR 30394 is addressed)
...
and pass6.c (until PR 30411 is addressed)
2005-06-03 18:02:03 +00:00
lukem
2b11c546a4
appease gcc -Wuninitialized
2005-06-02 01:02:21 +00:00
agc
d5a81777aa
Make this build on arm platforms by using the correct printf formats.
2005-05-24 06:51:49 +00:00
perseant
b1dbcbaa26
Check some error conditions that would otherwise cause fsck_lfs to dump core.
...
Pointed out by Pavel Cahyna in a follow-on to PR #29151 .
2005-05-23 22:17:20 +00:00
perseant
9bf7a991c5
Fail gracefully if we are asked to expand the buffer cache hash table size
...
when there is no memory available to do so. Use the uvnode's strategy
routine to retrieve data from the device, rather than always using pread().
Add a buffer header flag that specifies external management of the buffer's
data area.
All of this in support of a new cleaner, which is not included in this commit.
2005-05-20 18:59:36 +00:00
perseant
a73b3b19ea
Check parts of pass 5 even if only rolling forward. We can't check the true
...
segment holdings against the blocks held by the inodes, but we can still
check the cleanerinfo data against the segment table.
2005-04-23 20:21:03 +00:00
wiz
049635f546
Sync usage with man page.
2005-04-14 21:30:11 +00:00
wiz
21a2722f35
Quote a word that would otherwise be interpreted as macro;
...
increase width argument to .Bl so that all options fit.
2005-04-14 21:29:29 +00:00
wiz
b4508f65fb
Bump date for new -q; use Dq; capitalize NetBSD
...
in the usual way; new sentence, new line; some nits.
2005-04-14 21:26:11 +00:00
perseant
68db799864
Document "-f" (force check) flag. Implement and document "-q" (quiet).
2005-04-14 21:15:59 +00:00
perseant
b0a56e6928
Take care preserving the integrity of the free list during roll forward.
...
Also, avoid freeing a deleted vnode twice when a file is remove during
roll forward.
2005-04-12 23:14:18 +00:00
martin
9edc493234
When creating an int hash value from pointer, go via intptr_t.
...
Fixes PR 29953.
2005-04-12 12:42:02 +00:00
perseant
1d4cc6a17b
Be more efficient with the hash tables for the buffer and vnode caches.
...
Note that roll-forward can add more inodes to the filesystem; don't overflow
the tables but reallocate them.
2005-04-11 23:19:24 +00:00
perseant
e6e33f374d
Correct phase 0 message
2005-04-06 04:32:59 +00:00
perseant
aafc65baa9
Note that fsck_lfs may not know beforehand whether a given block is a
...
superblock or a segment summary, and tries both. These may be different
sizes. Fix a broken assertion that they are the same size.
Fixes PR # 29151.
2005-04-06 02:38:17 +00:00
he
2d66b2737e
Move the definition of simple_lock() and simple_unlock() to a common
...
header, since more of the LFS macros now use these functions. Since
we're outside of the kernel, these are defined to be empty.
2005-04-01 23:45:59 +00:00
perseant
dcba0206d6
"#define lfs_devvp lfs_unlockvp" for readability, since that's what we
...
use it for in fsck_lfs/newfs_lfs.
2005-03-25 20:16:37 +00:00
perseant
3118a7b178
Make fsck_lfs optimize the inode free list, if it appears to have become
...
too disordered. This should improve file creation speed on aged filesystems.
Include code to disorder the list for debugging purposes, though this is
of course not compiled in by default.
2005-03-25 20:14:43 +00:00
perseant
9740d8d0b2
Buffer cache fixes: make sure we initialize all the hash lists, and allow
...
the cache to grow in size irrespective of how many buffers may be in the
locked queue, since we can't write those in any case. Prevents fsck_lfs
from spinning when it has too much to write.
2005-03-19 00:43:17 +00:00
perseant
5d2f3e4908
Various minor LFS improvements:
...
* Extend the lfs library from fsck_lfs(8) so that it can be used with a
not-yet-existent LFS. Make newfs_lfs(8) use this library, so it can
create LFSs whose Ifile is larger than one segment.
* Make newfs_lfs(8) use strsuftoi64() for its arguments, a la newfs(8).
* Make fsck_lfs(8) respect the "file system is clean" flag.
* Don't let fsck_lfs(8) think it has dirty blocks when invoked with the
-n flag.
2005-02-26 05:45:54 +00:00
perry
5c9f370160
remove obsolete "register" declarations.
2005-02-06 06:13:47 +00:00
perry
251f7f5990
ANSIfy a function declaration, remove obsolete "register" declarations.
2005-02-06 06:13:12 +00:00
xtraeme
76500fc2f9
WARNS=2 is the default defined in sbin/Makefile.inc. (thanks wiz)
2005-01-20 16:39:22 +00:00
xtraeme
0f821b7962
ANSIfy, WARNS=2
2005-01-19 19:41:59 +00:00
christos
a73c2bd574
Add a progress meter to fsck_ffs based on the work by thorpej presented
...
to the mailing lists last January. This is optional.
2005-01-13 15:22:35 +00:00
minoura
da5384833d
Changes from rev 1.34 and 1.35 of sbin/newfs_lfs/lfs.c.
2004-09-15 03:24:09 +00:00
yamt
17d264b6df
zero-out dinode is not a proper way to 'clear' an lfs inode.
2004-07-18 20:51:30 +00:00
yamt
078a5e0d1f
remove a prototype of a non-exist function.
2004-07-18 20:03:12 +00:00
wiz
e770b57941
Improve description of -b and -m.
2004-07-06 16:51:18 +00:00
wiz
05d7d5d421
Document -m. It was already there, only commented out.
...
Bump date.
Addresses PR 26067 by Kouichirou Hiratsuka.
2004-07-06 16:49:10 +00:00
yamt
deea834892
pass5: dereference of an uninitialized pointer.
2004-05-14 10:41:12 +00:00
christos
6bd1d6d4db
Replace the statfs() family of system calls with statvfs().
...
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
perseant
5aaab72dd6
change KES license to standard NetBSD license
2004-03-20 22:31:13 +00:00
jmmv
b635f565e7
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
...
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
heas
43894fc5ac
Check result of malloc().
...
reviewed by Martin.
2003-12-24 01:39:27 +00:00
dsl
e69ce3e4bf
Add a -q (quiet) option to print nothing for clean filesystems.
...
Support in fsck_ffs and stub in fsck_xxx.
Push a few more messages through pwarn() instead of printf() to ensure
disk name is shown.
2003-10-20 12:04:38 +00:00
jdolecek
91b453f2db
fix NULL pointer pointer dereference in fileerror() when ino is NULL
...
problem reported and fix provided in PR kern/23065 by Gary Duzan, only
slightly adjusted to only do the VTOI() when needed
2003-10-05 17:11:23 +00:00
yamt
f271a34ced
write out modified directory entries to the correct place.
2003-10-03 12:23:22 +00:00
yamt
6e547a61f9
make this work for big (ie. with indirect blocks) directories
...
without spurious 'EXTRA ..' errors.
2003-10-03 12:22:15 +00:00
itojun
6379e11194
realloc pedant
2003-09-19 08:29:58 +00:00
agc
276d62f603
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
itojun
8883e1fb40
use bounded string op
2003-07-13 08:05:58 +00:00
yamt
884f970fae
in ckinode(), use idesc->id_number instead of dino.di_u.inumber
...
since the latter is invalid for pass2 and vget can return invalid vnode
for inode number 0.
2003-07-12 16:13:38 +00:00
yamt
a7f5ddbf64
in lfs_raw_vget(),
...
- don't leave references into free'ed memory region. (fix SIGBUSes)
- plug a memory leak.
2003-07-12 12:28:23 +00:00
yamt
e01ace1f2e
- don't assume that malloc'ed memory is zero-filled.
...
- LIST_INIT {dirty,clean} block lists.
2003-07-12 11:57:59 +00:00
yamt
1d5f020689
fix a null dereference on stale inode.
2003-07-12 11:49:04 +00:00
yamt
c992c60208
only read superblock (ie. struct dlfs) from disk and
...
initialize rest of struct lfs by hand.
(this shouldn't cause a real problem since if superblock is valid,
LFS_SBPAD-sizeof(struct dlfs) bytes after it is always zero-filled, though)
PR/22123 (Izumi Tsutsui)
2003-07-12 11:47:05 +00:00
yamt
96782bb1fd
don't use uninitialized variables.
...
PR/22123 (Izumi Tsutsui)
2003-07-12 11:41:15 +00:00