Commit Graph

24 Commits

Author SHA1 Message Date
chs f298a94b73 ufs: fixed signed/unsigned bugs affecting large file systems
Apply these commits from FreeBSD:

  commit e870d1e6f97cc73308c11c40684b775bcfa906a2
  Author: Kirk McKusick <mckusick@FreeBSD.org>
  Date:   Wed Feb 10 20:10:35 2010 +0000

    This fix corrects a problem in the file system that treats large
    inode numbers as negative rather than unsigned. For a default
    (16K block) file system, this bug began to show up at a file system
    size above about 16Tb.

    To fully handle this problem, newfs must be updated to ensure that
    it will never create a filesystem with more than 2^32 inodes. That
    patch will be forthcoming soon.

    Reported by: Scott Burns, John Kilburg, Bruce Evans
    Followup by: Jeff Roberson
    PR:          133980
    MFC after:   2 weeks

  commit 81479e688b0f643ffacd3f335b4b4bba460b769d
  Author: Kirk McKusick <mckusick@FreeBSD.org>
  Date:   Thu Feb 11 18:14:53 2010 +0000

    One last pass to get all the unsigned comparisons correct.


In additional to the changes from FreeBSD, this commit includes quite a few
related changes to appease -Wsign-compare.
2023-01-07 19:41:29 +00:00
dholland dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +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
christos d90f13b3bf Use -DPROGRESS to enable the progress bar, don't depend on SMALL. 2005-01-13 19:56:02 +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
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
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
lukem bb82a84ded If SIGINFO is received, display summary information to stderr.
Based on changes in FreeBSD, via Chuck Cranor <chuck@research.att.com>
2002-05-06 03:17:43 +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 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
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
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
cgd 5eeab43e28 more cleanups from Jim Jegers, passed over by me. 1994-12-05 20:15:31 +00:00
mycroft ea7b5d4ec6 Eliminate uses of some obsolete functions. 1994-09-23 14:26:58 +00:00
mycroft ccfa3742b5 Update from 4.4-Lite, with local changes. 1994-06-08 18:57:30 +00:00
cgd 9a2c884999 need <sys/time.h> 1994-04-25 18:28:42 +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