thorpej
9c45d4b02d
In pass 5, check alternate superblocks for consistency with
...
the current in-core master superblock, and fix them up if
they're incorrect. Move the code that writes the alternate
superblocks if (cvtlevel || doswap) into pass 5 for efficiency.
Reviewd by Charles Hannum, and used by me to fix up a curdled
file system.
2001-01-26 17:37:16 +00:00
mycroft
1fa165bd82
Fix a rather glaring byte-swapping bug: di_size is 64 bits, not 16.
2001-01-23 02:35:51 +00:00
mycroft
521984e793
Whoops; call propagate() with the right child inode number. (Doesn't break
...
anything, but it would have made reconnect less efficient.)
2001-01-10 08:26:20 +00:00
mycroft
f5a9d5eadc
Abstract the code to attach a directory to its parent's child list into a
...
separate function, and call it from multiple places in linkup() to handle
reconnects and creation of /lost+found.
2001-01-10 08:22:20 +00:00
mycroft
d722519e03
Make sure the rotor values are non-negative.
2001-01-09 11:20:00 +00:00
mycroft
a48409305d
A minor tweak.
2001-01-09 09:25:32 +00:00
enami
6c06fd4f9f
Don't swap cg_clustersum(cg)[0]. It doesn't actually exists and it's
...
actually tail of free block bitmap.
XXX swap_cg() should be shared with newfs.
2001-01-09 09:08:35 +00:00
mycroft
c4c9a7ecc0
Remove a bogus piece of code that was never used.
2001-01-09 06:05:10 +00:00
mycroft
66418680d4
The reconnect algorithm was historically O(n^4).
...
Some years ago I made it O(n^2).
Someone helpfully made it O(n^4) again.
Today I'm making it O(n).
If that's not good enough, I don't know what else to do. B-)
Technical details:
* The graph traversal in propagate() is modified to be able to start from any
point in the tree. To handle certain exceptional cases, it is also modified
to work in two passes, marking the tree with a special tag and then changing
it to DFOUND.
* The reconnect case now modifies the child/sibling pointers and calls
propagate() to propagate the connection state starting with the reconnected
directory.
Pray that you never encounter a file system trashed enough for this to matter.
2001-01-09 05:51:14 +00:00
mycroft
3f2ff10f4c
Try to cope with cs_ndir being wacky (too large or, particularly when using -b,
...
too damn small) by setting a minimum (1024) and maximum (maxino + 1). This
prevents certain operations getting REALLY slow when -b is used, and also
avoids overallocating memory if the superblock is hosed.
2001-01-09 05:39:27 +00:00
lukem
f7650338ca
use %ll_ instead of the less standard %q_
2001-01-05 02:02:57 +00:00
simonb
6714e09fe2
Need an lfdir global variable now.
2000-12-14 00:32:22 +00:00
scw
9482a2a194
Some more `extern's for initialised globals.
2000-12-13 22:38:15 +00:00
mycroft
078acb237c
Fix an annoyingly incorrect message.
2000-12-13 03:04:51 +00:00
is
9979da6cbb
Format string cleanups by Bill Sommerfeld.
2000-10-10 20:24:49 +00:00
castor
d02d10e226
Fix an evil ugly bug which causes files placed into lost+found to
...
be inconsistent, and unremovable. From Ethan Solomita <ethan@geocast.com>.
Reviewed by fvdl.
2000-08-03 14:52:39 +00:00
mycroft
9496d82675
Add a missing newline in one message.
...
(The fact that I got this message using softdep should probably disturb
someone...)
2000-07-14 02:43:44 +00:00
christos
c1936bfd69
- ARGH /brick fvdl
...
- Put back the change from revision 1.31
1999-12-12 23:53:26 +00:00
bouyer
15ca2512dc
Add a missing '\n'.
1999-11-28 20:03:17 +00:00
mrg
f6bf35c814
fix lp64 lossage.
1999-11-17 00:29:54 +00:00
fvdl
f2651c65ac
Fix %d <-> long mismatch.
1999-11-15 20:31:51 +00:00
fvdl
5a92829791
Update for softdep code.
1999-11-15 19:19:41 +00:00
fvdl
a905c40444
Changes for softdep code.
1999-11-15 19:18:24 +00:00
christos
0e578b8b02
make sure that we don't try to allocate negative memory when blks == 0.
1999-09-06 19:52:28 +00:00
is
69741f8d3d
Fix typo.
1999-05-01 20:04:14 +00:00
mycroft
f6590b22cd
Clean up SYNOPSIS formatting.
1999-03-07 11:02:05 +00:00
bouyer
3e3f9c7795
#include machine/bswap.h and remove -lutil.
1999-01-15 13:32:05 +00:00
christos
7b57bf6d78
Adjust for DKTYPENAME changes.
1998-11-12 16:19:47 +00:00
thorpej
df7e58ed2e
Use DINODE_SIZE rather than sizeof(struct dinode) and/or pointer arithmetic.
1998-10-23 01:13:33 +00:00
ross
029a64cc29
from Erik Bertelsen <erik@mediator.uni-c.dk>
...
{ put } { in } { lots } { of } { these } { to } { shut } { up } { egcs }
1998-08-25 19:18:12 +00:00
mycroft
519d858510
__AUDIT__ cleanup.
1998-07-28 19:22:54 +00:00
mycroft
217e6f7a7e
const poisoning.
1998-07-26 20:32:42 +00:00
mycroft
2d452ae63c
Remove redundant declaration.
1998-07-26 20:28:55 +00:00
msaitoh
6e6138d601
fix typo.
1998-05-25 10:41:57 +00:00
mycroft
72a3da3933
copyback_cg() tried to copy too much if the cylinder group info was smaller
...
than 8k. From PR 5404.
1998-05-06 02:45:09 +00:00
kleink
38103c73ff
Need <time.h> for time() prototype.
1998-04-01 15:55:43 +00:00
kleink
3072a632c5
Need <time.h> for ctime() and time() prototypes.
1998-04-01 15:38:58 +00:00
mrg
8578360272
use extern int over extern
1998-03-30 02:07:59 +00:00
bouyer
9aaa32d9a7
Add support for non-native byteorder FFS, and converting byteorder.
...
Also, be a bit more conservative with the clean flag: don't mark the FS
clean when we know there may still be errors (user anserwed 'n' to
a question, or fsck says "you must rerun fsck").
1998-03-18 17:01:23 +00:00
fvdl
e5bc90f40c
Merge with Lite2 + local changes
1998-03-01 02:20:01 +00:00
mjacob
b6558b2b59
Hmmm..fsck_ffs has to really be able to alwasy work, and if you've got
...
a *huge* (like 600GB) filesystem, you need to not be limited by resource
limits.
1997-11-02 01:42:44 +00:00
mycroft
e96e918e60
Use bsd.subdir.mk as appropriate.
1997-10-11 09:34:07 +00:00
christos
e230a48b57
CFLAGS->CPPFLAGS
1997-10-10 19:47:50 +00:00
enami
9f86d6ed5e
Don't declare optind and optarg.
1997-10-01 02:15:48 +00:00
lukem
8b07f7ca3d
for now, #ifdef out a couple of chunks that were added in the lite2 merge
1997-09-24 09:24:21 +00:00
lukem
e808c63383
unnecessary file from lite-2 merge
1997-09-21 04:08:55 +00:00
lukem
ea79507baf
reintroduce clarity changes made in rev1.14 that were lost in the lite2 merge
1997-09-21 03:51:34 +00:00
lukem
90c9455b48
remove -g from CFLAGS=
1997-09-21 03:49:53 +00:00
lukem
103e158ba5
remove some code that was obsoleted by mycroft's changes to
...
propagate() in dir.c rev 1.14.
this was accidentally re-introduced in the lite-2 merge, and could
cause filesystem corruption.
1997-09-21 03:06:47 +00:00
lukem
d2f145c7a6
a quad_t is an int64_t, not a u_int64_t...
1997-09-21 00:24:55 +00:00