Commit Graph

47 Commits

Author SHA1 Message Date
yamt 0616e4b566 linkup: reparent() only when lost+found is created successfully. 2005-12-23 12:58:11 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
christos c236bddb0f sprinkle const. 2005-06-27 01:25:35 +00:00
lukem 700088dc7f appease gcc -Wuninitialized 2005-06-02 00:38:41 +00:00
xtraeme e3c8f73b9a whitespace (pointed out by wiz@) 2005-01-20 15:29:40 +00:00
xtraeme 52781d1897 Kill __P(), ANSIfy and WARNS=2 2005-01-19 17:33:58 +00:00
dbj 6ca6b809d3 have allocdir fail cleanly when allocino fails 2004-10-08 17:29:29 +00:00
mycroft 20f54b189f Reduce memory usage slightly. 2004-07-20 15:05:32 +00:00
mrg 2a3954efe6 - some KNF (80 cols)
- fix a printf format issue
2004-01-10 14:28:37 +00:00
agc bf07c8719a 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:11 +00:00
itojun 0e4dc5229d use bounded string op 2003-07-13 08:16:15 +00:00
fvdl 42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
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
dbj 43395bd5a8 Add support for the Apple UFS variation on ffs
This is the bulk of PR #17345

The general approach is to use a run time deteriminable value
for DIRBLKSIZ.  Additional allowances are included for using
MAXSYMLINKLEN with FS_42INODEFMT and a shift in the cylinder group
cluster summary count array.  Support is added for managing
the Apple UFS volume label.
2002-09-28 20:11:05 +00:00
simonb 1d08e313ae Don't bother testing if a uint8_t is > 256 -- that test is always false. 2002-05-09 02:55:49 +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 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
simonb 6714e09fe2 Need an lfdir global variable now. 2000-12-14 00:32:22 +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
fvdl a905c40444 Changes for softdep code. 1999-11-15 19:18:24 +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
lukem af479c48b8 - don't indiscriminately include <stdlib.h> and <unistd.h> in "fsck.h"
- explicitly pull in <stdio.h>, <stdlib.h> and <unistd.h> in *.c as necessary
1997-09-20 06:16:23 +00:00
lukem e111111128 resolve conflicts from lite-2 merge. 1997-09-16 16:44:43 +00:00
lukem b1db038303 * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck() func
* prefix hex numbers with '0x'
* getopt returns -1 not EOF
1997-09-14 14:36:29 +00:00
mrg b6daab9f37 lost+found directories are mode -1700 1997-04-21 11:34:37 +00:00
christos c5d8ca200f - util.h -> fsutil.h 1996-09-27 22:45:10 +00:00
christos 5528d37484 - fixed all printf formats [there were a lot of %l? <-> %? mistakes]
- added missing prototypes, and made local functions static
- removed parallel preening code; this is part of fsck(8)
- use printing utilities from fsck(8)
- Makefile does not make links to fsck and fsck.8
- removed -l maxparallel option. It has no meaning anymore.
1996-09-23 16:18:31 +00:00
mycroft 96dea9e6ca Use a different tree-walking algorithm in propagate(). 1996-06-11 07:07:52 +00:00
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
mycroft 0826920c54 Mostly sync with CSRG. 1994-12-28 00:03:49 +00:00
cgd 5eeab43e28 more cleanups from Jim Jegers, passed over by me. 1994-12-05 20:15:31 +00:00
mycroft 195d1d6f4e On a recursive call to fsck_readdir() through getpathname(), don't attempt to
fix a problem that's already being fixed.
1994-10-28 16:53:13 +00:00
mycroft c10923f665 dircheck() shouldn't be looking at d_type or d_namlen in blank entries
*at all*.  Not only is it wrong, but it causes a serious problem on
little-endian machines, since after -c2 conversion, d_type will often
be > 15.
1994-10-06 14:24:17 +00:00
mycroft 4922d725cf Remove some more uses of obsolete functions. 1994-09-23 23:48:10 +00:00
mycroft ea7b5d4ec6 Eliminate uses of some obsolete functions. 1994-09-23 14:26:58 +00:00
mycroft 815971855a A correct fix for the byte order problem when reconnecting. 1994-09-20 23:31:39 +00:00
mycroft 1466993ef3 Fix oversight in last patch. 1994-07-29 02:31:50 +00:00
mycroft 08d1c5cc81 Fix byte-order problem with directory entry creation. 1994-07-28 00:25:17 +00:00
mycroft ccfa3742b5 Update from 4.4-Lite, with local changes. 1994-06-08 18:57:30 +00:00
cgd e82c231da3 need <sys/time.h> 1994-04-25 18:23:19 +00:00
mycroft 0af4689100 Patch from Bruce Evans to deal with file names with NULs in them. 1993-11-05 23:32:06 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 06be60083d changed "Id" to "Header" for rcsids 1993-03-23 00:22:59 +00:00
cgd 346aa5dd48 added rcs ids to all files 1993-03-22 08:04:00 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00