The NetBSD Project

CVS log for src/sbin/fsck_ffs/setup.c

[BACK] Up to [cvs.NetBSD.org] / src / sbin / fsck_ffs

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.109: download - view: text, markup, annotated - select for diffs
Wed Jul 5 10:59:08 2023 UTC (16 months, 4 weeks ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +5 -11 lines
Revert "fsck_ffs(8): Ensure A divides S before aligned_alloc(A, S)."

C17 lifted this restriction.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Tue Jul 4 20:40:53 2023 UTC (16 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +10 -11 lines
fsck_ffs(8): Fix whitespace issues.

- Nix trailing whitespace.
- Omit excessive blank lines.
- Insert missing blank lines between $NetBSD$ and copyright.

No functional change intended.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Tue Jul 4 20:40:22 2023 UTC (16 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +11 -5 lines
fsck_ffs(8): Ensure A divides S before aligned_alloc(A, S).

Required by C11 Sec. 7.22.3.1 The aligned_alloc function, para. 2,
p. 348:

   The value of alignment shall be a valid alignment supported by the
   implementation and the value of size shall be an integral multiple
   of alignment.

XXX pullup-10

Revision 1.104.2.2: download - view: text, markup, annotated - select for diffs
Sat May 13 11:54:17 2023 UTC (18 months, 2 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Diff to: previous 1.104.2.1: preferred, colored; branchpoint 1.104: preferred, colored; next MAIN 1.105: preferred, colored
Changes since revision 1.104.2.1: +4 -3 lines
Pull up following revision(s) (requested by chs in ticket #161):

	sbin/fsck_ffs/setup.c: revision 1.106
	sbin/fsck_ffs/pass5.c: revision 1.57

ufs: more signed/unsigned fixes

Fix the previous signed/unsigned fixes to build on 32-bit,
including applying this commit from FreeBSD:

  commit 2d34afcd04207cf3fa3d5b7f467a890eae75da41
  Author: Kirk McKusick <mckusick@FreeBSD.org>
  Date:   Sun Oct 25 21:04:07 2020 +0000
    Use proper type (ino_t) for inode numbers to avoid improper sign extention
    in the Pass 5 checks. The manifestation was fsck_ffs exiting with this error:
      ** Phase 5 - Check Cyl groups
      fsck_ffs: inoinfo: inumber 18446744071562087424 out of range
    The error only manifests itself for filesystems bigger than about 100Tb.
    Reported by:  Nikita Grechikhin <ngrechikhin at yandex.ru>
    MFC after:    2 weeks
    Sponsored by: Netflix

Revision 1.104.2.1: download - view: text, markup, annotated - select for diffs
Sat May 13 11:51:14 2023 UTC (18 months, 2 weeks ago) by martin
Branches: netbsd-10
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +3 -3 lines
Pull up following revision(s) (requested by chs in ticket #160):

	usr.sbin/makefs/ffs/ffs_alloc.c: revision 1.31
	sbin/tunefs/tunefs.c: revision 1.58
	sbin/fsck_ffs/setup.c: revision 1.105
	sbin/fsck_ffs/pass5.c: revision 1.56
	usr.sbin/makefs/ffs.c: revision 1.74
	usr.sbin/makefs/ffs/mkfs.c: revision 1.42
	usr.sbin/makefs/Makefile: revision 1.40
	sys/ufs/ffs/fs.h: revision 1.71
	sbin/fsdb/fsdb.c: revision 1.54
	sbin/resize_ffs/resize_ffs.c: revision 1.58
	sbin/fsck_ffs/pass4.c: revision 1.29
	usr.sbin/makefs/ffs/ffs_extern.h: revision 1.9
	sbin/newfs/mkfs.c: revision 1.133
	sys/ufs/ffs/ffs_alloc.c: revision 1.172
	sbin/fsck_ffs/pass1b.c: revision 1.24
	usr.sbin/dumpfs/dumpfs.c: revision 1.68
	sys/ufs/ffs/ffs_extern.h: revision 1.88
	usr.sbin/quotacheck/quotacheck.c: revision 1.51
	sys/ufs/ffs/ffs_subr.c: revision 1.54
	sbin/fsck_ffs/main.c: revision 1.91
	sbin/fsck_ffs/pass1.c: revision 1.63

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.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Sun Jan 8 05:25:24 2023 UTC (22 months, 3 weeks ago) by chs
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +4 -3 lines
ufs: more signed/unsigned fixes

Fix the previous signed/unsigned fixes to build on 32-bit,
including applying this commit from FreeBSD:

  commit 2d34afcd04207cf3fa3d5b7f467a890eae75da41
  Author: Kirk McKusick <mckusick@FreeBSD.org>
  Date:   Sun Oct 25 21:04:07 2020 +0000

    Use proper type (ino_t) for inode numbers to avoid improper sign extention
    in the Pass 5 checks. The manifestation was fsck_ffs exiting with this error:

      ** Phase 5 - Check Cyl groups
      fsck_ffs: inoinfo: inumber 18446744071562087424 out of range

    The error only manifests itself for filesystems bigger than about 100Tb.

    Reported by:  Nikita Grechikhin <ngrechikhin at yandex.ru>
    MFC after:    2 weeks
    Sponsored by: Netflix

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sat Jan 7 19:41:29 2023 UTC (22 months, 3 weeks ago) by chs
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +3 -3 lines
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.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Thu Nov 17 06:40:38 2022 UTC (2 years ago) by chs
Branches: MAIN
CVS tags: netbsd-10-base
Branch point for: netbsd-10
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +42 -6 lines
Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new	fsck_ffs operations "-c	ea" and	"-c no-ea" to convert file systems
from UFS2 to UFS2ea and	vice-versa (both of which delete all existing extended
attributes in the process).

Revision 1.101.12.2: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:00 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.101.12.1: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.12.1: +12 -9 lines
Sync with HEAD

Revision 1.103: download - view: text, markup, annotated - select for diffs
Fri Apr 17 09:42:27 2020 UTC (4 years, 7 months ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-20200421, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +12 -9 lines
align buffers used for I/O to DEV_BSIZE so it's executed more optimally
when run for xbd(4) raw (character) device

Revision 1.101.12.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:05:33 2019 UTC (5 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +50 -2 lines
Sync with HEAD

Revision 1.101.10.1: download - view: text, markup, annotated - select for diffs
Sat Oct 20 06:58:22 2018 UTC (6 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +50 -2 lines
Sync with head

Revision 1.101.4.1: download - view: text, markup, annotated - select for diffs
Tue Oct 9 09:53:20 2018 UTC (6 years, 1 month ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101: +50 -2 lines
Pull up following revision(s) (requested by hannken in ticket #1051):

	sbin/fsck_ffs/setup.c: revision 1.102

Add a test for duplicate inodes on the persistent snapshot list.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Fri Oct 5 09:49:23 2018 UTC (6 years, 1 month ago) by hannken
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +50 -2 lines
Add a test for duplicate inodes on the persistent snapshot list.

Revision 1.100.14.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:13 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +25 -6 lines
Sync with HEAD

Revision 1.100.10.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:01 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +25 -6 lines
Sync with HEAD

Revision 1.101: download - view: text, markup, annotated - select for diffs
Wed Feb 8 16:11:40 2017 UTC (7 years, 9 months ago) by rin
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-base, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: phil-wifi, pgoyette-compat, netbsd-8
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +25 -6 lines
Add smaller versions of fsck_ffs(8) and newfs(8) for install media, where
support for Endian-Independent FFS and Apple UFS is disabled unless FFS_EI=1
and APPLE_UFS=1 are added to CRUNCHENV, respectively.

This reduces the size of ramdisk image for atari by over 15KB.

Thanks tsutsui and christos for their useful comments.

Revision 1.95.6.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:02:24 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.95.6.2: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.6.2: +6 -6 lines
Rebase to HEAD as of a few days ago.

Revision 1.94.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:37:28 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.94.2.2: preferred, colored; branchpoint 1.94: preferred, colored; next MAIN 1.95: preferred, colored
Changes since revision 1.94.2.2: +10 -10 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.100: download - view: text, markup, annotated - select for diffs
Sun Jun 23 07:28:36 2013 UTC (11 years, 5 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -3 lines
Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

   lblkno
   lblktosize
   lfragtosize
   numfrags
   blkroundup
   fragroundup

Revision 1.95.6.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:28:51 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.95.6.1: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.6.1: +4 -4 lines
resync from head

Revision 1.99: download - view: text, markup, annotated - select for diffs
Sun Jun 23 02:06:04 2013 UTC (11 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +7 -7 lines
fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)

Revision 1.98: download - view: text, markup, annotated - select for diffs
Wed Jun 19 17:51:25 2013 UTC (11 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +3 -3 lines
Rename ambiguous macros:
   MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Sun Jun 9 17:57:09 2013 UTC (11 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +3 -3 lines
Stick UFS_ in front of these symbols:
   DIRBLKSIZ
   DIRECTSIZ
   DIRSIZ
   OLDDIRFMT
   NEWDIRFMT

Part of PR 47909.

Revision 1.95.6.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:28:06 2013 UTC (11 years, 9 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +8 -8 lines
resync with head

Revision 1.94.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:05:30 2013 UTC (11 years, 10 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.94.2.1: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.2.1: +8 -8 lines
sync with head

Revision 1.96: download - view: text, markup, annotated - select for diffs
Tue Jan 22 09:39:12 2013 UTC (11 years, 10 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base8, agc-symver-base, agc-symver
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +8 -8 lines
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.

Revision 1.94.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:05:39 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +5 -5 lines
sync with head

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Jan 29 00:58:13 2012 UTC (12 years, 10 months ago) by nonaka
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: tls-maxphys
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +5 -5 lines
use FS_UFS[12]_MAGIC_SWAPPED instead of bswap32(FS_UFS[12]_MAGIC).

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Aug 14 12:32:01 2011 UTC (13 years, 3 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +7 -8 lines
WARNS=4

Revision 1.92.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:18:42 2011 UTC (13 years, 5 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.92: preferred, colored; next MAIN 1.93: preferred, colored
Changes since revision 1.92: +3 -3 lines
Catchup with rmind-uvmplock merge.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Thu Jun 9 19:57:52 2011 UTC (13 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -3 lines
share more code.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Sun Mar 20 11:41:24 2011 UTC (13 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +4 -4 lines
initialise memory allocated for uquot_user_hash & uquot_group_hash.
Pointed out by Nicolas Joly.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Mar 6 17:08:16 2011 UTC (13 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +41 -4 lines
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.

Revision 1.90.2.2: download - view: text, markup, annotated - select for diffs
Thu Feb 17 17:13:48 2011 UTC (13 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.90.2.1: preferred, colored; branchpoint 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90.2.1: +7 -6 lines
Move quota2_check_doquota() call so that an unclean, wapbl filesystem
will still be ckecked if a quota inode needs to be created.

Revision 1.90.2.1: download - view: text, markup, annotated - select for diffs
Thu Jan 20 14:24:54 2011 UTC (13 years, 10 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +39 -3 lines
Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
  as parameter a path to a mount point, and a prop_dictionary
  (in plistref format) describing commands and arguments.
  For each command, status and data are returned as a prop_dictionary.
  quota commands features will be added to take advantage of this,
  exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
  ffs (and playing nicely with wapbl).
  Quotas are enabled on a ffs filesystem via superblock flags.
  tunefs(8) can enable or disable quotas.
  On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
  block and inode usages, and will check and update quotas in Pass 6.
  quota usage and limits are stored in unliked files (one for users,
  one for groups)l fsck_ffs(8) will create the files if needed, or
  free them if needed. This means that after enabling or disabling
  quotas on a filesystem; a fsck_ffs(8) run is required.
  quotacheck(8) is not needed any more, on a unclean shutdown
  fsck or journal replay will take care of fixing quotas.
  newfs(8) can create a ready-to-mount quota-enabled filesystem
  (superblock flags are set and quota inodes are created).
  Other new features or semantic changes:
  - default quota datas, applied to users or groups which don't already
    have a quota entry
  - per-user/group grace time (instead of a filesystem global one)
  - 0 really means "nothing allowed at all", not "no limit".
    If you want "no limit", set the limit to UQUAD_MAX (tools will
    understand "unlimited" and "-")

  A quota file is structured as follow:
  it starts with a header, containing a few per-filesystem values,
  and the default quota limits.
  Quota entries are linked together as a simple list, each entry has a
  pointer (as an offset withing the file) to the next.
  The header has a pointer to a list of free quota entries, and
  a hash table of in-use entries. The size of the hash table depends
  on the filesystem block size (header+hash table should fit in the
  first block). The file is not sparse and is a multiple of
  filesystem block size (when the free quota entry list is empty a new
  filesystem block is allocated). quota entries to not cross
  filesystem block boundaries.

  In memory, the kernel keeps a cache of recently used quota entries
  as a reference to the block number, and offset withing the block.
  The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
      update repquota, edquota and rpc.rquotad to the new world
      implement compat_50_quotactl ioctl.
      update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.

Revision 1.84.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 05:26:34 2010 UTC (14 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.84: preferred, colored; next MAIN 1.85: preferred, colored
Changes since revision 1.84: +29 -18 lines
sync to netbsd-5

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sun Jan 31 16:04:35 2010 UTC (14 years, 10 months ago) by mlelstv
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: bouyer-quota2
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +4 -2 lines
Skip handling of APPLEUFS_LABEL if it is smaller than a device block.
In particular:

- newfs will not try to erase the label
- fsck_ffs will not try to validate the label

This lets newfs and fsck work on 2048-byte-per-sector media.

Does Apple UFS support such media and how?

Revision 1.84.2.1: download - view: text, markup, annotated - select for diffs
Sat Oct 3 22:49:42 2009 UTC (15 years, 2 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.84: preferred, colored; next MAIN 1.85: preferred, colored
Changes since revision 1.84: +29 -18 lines
Pull up following revision(s) (requested by bouyer in ticket #1036):
	sbin/fsck_ffs/extern.h: revision 1.25 via patch
	sbin/fsck_ffs/setup.c: revision 1.88 via patch
	sbin/fsck_ffs/wapbl.c: revision 1.4 via patch
	sbin/tunefs/tunefs.c: revision 1.41 via patch
	sys/ufs/ffs/ffs_vfsops.c: revision 1.252 via patch
	sys/ufs/ffs/ffs_wapbl.c: revision 1.13 via patch
Allow tunefs to clear any type of WAPBL log, not only in-filesystem
ones. Discussed in
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.
--
Do some basic checks of the WAPBL journal, to abort the boot before the
kernel refuse to mount a filesystem read-write (booting a system
multiuser with critical filesystems read-only is bad):
Add a check_wapbl() which will check some WAPBL values in the superblock,
and try to read the journal via wapbl_replay_start() if there is one.
pfatal() if one of these fail (abort boot if in preen mode,
as "CONTINUE" otherwise). In non-preen mode the bogus journal will
be cleared.
check_wapbl() is always called if the superblock supports WAPBL.
Even if FS_DOWAPBL is not there, there could be flags asking the
kernel to clear or create a log with bogus values which would cause the
kernel refuse to mount the filesystem.
Discussed in
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.
--
If the WAPBL journal can't be read (ffs_wapbl_replay_start() fails),
mount the filesystem anyway if MNT_FORCE is present.
This allows to still boot single-user a system with a corrupted
WAPBL on /, and so get a chance to run fsck to fix it.
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Sun Sep 27 17:13:37 2009 UTC (15 years, 2 months ago) by bouyer
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -3 lines
Restore changes from 1.86 and 1.87 after commit of 1.88.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sun Sep 13 14:25:28 2009 UTC (15 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +29 -18 lines
Do some basic checks of the WAPBL journal, to abort the boot before the
kernel refuse to mount a filesystem read-write (booting a system
multiuser with critical filesystems read-only is bad):
Add a check_wapbl() which will check some WAPBL values in the superblock,
and try to read the journal via wapbl_replay_start() if there is one.
pfatal() if one of these fail (abort boot if in preen mode,
as "CONTINUE" otherwise). In non-preen mode the bogus journal will
be cleared.
check_wapbl() is always called if the superblock supports WAPBL.
Even if FS_DOWAPBL is not there, there could be flags asking the
kernel to clear or create a log with bogus values which would cause the
kernel refuse to mount the filesystem.
Discussed in
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.

Revision 1.84.4.1: download - view: text, markup, annotated - select for diffs
Wed May 13 19:19:01 2009 UTC (15 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.84: preferred, colored; next MAIN 1.85: preferred, colored
Changes since revision 1.84: +4 -4 lines
Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Apr 7 05:50:11 2009 UTC (15 years, 7 months ago) by mrg
Branches: MAIN
CVS tags: jym-xensuspend-nbase, jym-xensuspend-base
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +3 -3 lines
fix a logic error in the previous, as point out by frank kardel.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Wed Mar 25 03:42:41 2009 UTC (15 years, 8 months ago) by mrg
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -3 lines
don't ignore "fsck -f" when given with "-p" on a wapbl filesystem.
ie, "fsck -fp" actually forces the check in preen mode now.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed Feb 25 13:52:18 2009 UTC (15 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +3 -3 lines
don't copy the address of a pointer. Noticed by Anon Ymous

Revision 1.81.10.2: download - view: text, markup, annotated - select for diffs
Sun Sep 28 11:17:11 2008 UTC (16 years, 2 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.81.10.1: preferred, colored; branchpoint 1.81: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81.10.1: +42 -2 lines
Sync with HEAD.

Revision 1.82.4.1: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:28:23 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82: +44 -4 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sat Aug 30 10:46:16 2008 UTC (16 years, 3 months ago) by bouyer
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: netbsd-5, matt-nb5-mips64, jym-xensuspend
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +18 -4 lines
Add fss(4) snapshot support to fsck_ffs(8) (via -x or -X options, like
dump(8)). This allows fsck_ffs -n to work on a snapshot of a R/W mounted
filesystem, and avoid errors related to filesystem activity.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Jul 31 05:38:04 2008 UTC (16 years, 4 months ago) by simonb
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +28 -2 lines
Merge the simonb-wapbl branch.  From the original branch commit:

   Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.

Revision 1.82.6.1: download - view: text, markup, annotated - select for diffs
Tue Jun 10 14:51:21 2008 UTC (16 years, 5 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82: +28 -2 lines
Initial commit of Wasabi System's WAPBL (Write Ahead Physical Block
Logging) journaling code.  Originally written by Darrin B. Jewell
while at Wasabi and updated to -current by Antti Kantee, Andy Doran,
Greg Oster and Simon Burge.

Still a number of issues - look in doc/BRANCHES for "simonb-wapbl"
for more info.

Revision 1.81.10.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 13:54:10 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +9 -6 lines
Sync with HEAD.

Revision 1.81.8.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:14:49 2008 UTC (16 years, 8 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.81: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81: +9 -6 lines
sync with head.

Revision 1.81.2.1: download - view: text, markup, annotated - select for diffs
Sun Mar 23 00:44:23 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.81: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81: +9 -6 lines
sync with HEAD

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sat Feb 23 21:41:48 2008 UTC (16 years, 9 months ago) by christos
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, matt-armv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Branch point for: wrstuden-revivesa, simonb-wapbl
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +9 -6 lines
Make sure that the exit values are always sane, and use symbolic instead
of magic constants. Reviewed by go@

Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Aug 22 16:30:28 2007 UTC (17 years, 3 months ago) by christos
Branches: MAIN
CVS tags: mjf-devfs-base, mjf-devfs, matt-armv6-prevmlocking, matt-armv6-base, cube-autoconf-base, cube-autoconf
Branch point for: mjf-devfs2, matt-armv6, keiichi-mipv6
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +22 -2 lines
Avoid zero-divides from Anon Ymous

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Aug 26 22:03:47 2006 UTC (18 years, 3 months ago) by christos
Branches: MAIN
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, hpcarm-cleanup
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +30 -83 lines
- Deal with wedges and the new disk geometry structures, instead of using
  struct disklabel.

Functionality lost:
  1. struct disklabel used to be updated to contain bsize, fsize, cpg.
     This information was used to locate the alternative superblock in
     the filesystem if the primary superblock was corrupted. We need
     to find a new place to store this information if we need this
     functionality.
  2. On vax SMD drives that contained bad sector lists, the newfs program
     knew how to get the offset and skip to the correct location in order
     to place the label.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Fri Mar 17 15:53:46 2006 UTC (18 years, 8 months ago) by rumble
Branches: MAIN
CVS tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +7 -2 lines
Check for allocation failures in malloc, calloc, realloc, asprintf, and
vasprintf and try to handle them.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Mon Jun 27 01:25:35 2005 UTC (19 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +4 -4 lines
sprinkle const.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Thu Jun 2 01:23:19 2005 UTC (19 years, 6 months ago) by dbj
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -3 lines
for ufs2, assume FS_44INODEFMT
this is necessary for freebsd compatbility, since they do not initialize
the old field.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Jun 2 00:38:41 2005 UTC (19 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +4 -4 lines
appease gcc -Wuninitialized

Revision 1.75: download - view: text, markup, annotated - select for diffs
Wed Jan 19 17:33:59 2005 UTC (19 years, 10 months ago) by xtraeme
Branches: MAIN
CVS tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +9 -20 lines
Kill __P(), ANSIfy and WARNS=2

Revision 1.74: download - view: text, markup, annotated - select for diffs
Fri Oct 29 19:02:17 2004 UTC (20 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +16 -10 lines
Rewrite getdisklabelpart() to avoid problems with isdigit(*ch_ptr) and
an incorrect check for a (probably impossible) empty string.
Add comments to avoid confusion...

Revision 1.70.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 27 17:51:53 2004 UTC (20 years, 7 months ago) by jdc
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Diff to: previous 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70: +21 -3 lines
Pull up revisions 1.72-1.73 (requested by dbj in ticket #185)

Fix problems related to superblock upgrade issues which may be
experienced by -current users from 2003.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Apr 14 17:37:11 2004 UTC (20 years, 7 months ago) by dbj
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +20 -2 lines
add support for downgrading a filesystem fslevel from 4 to 3

Revision 1.72: download - view: text, markup, annotated - select for diffs
Wed Apr 14 17:35:19 2004 UTC (20 years, 7 months ago) by dbj
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3 lines
set fs_old_nrpos to 1 when doing -c4 upgrade.
This isn't used by kernel, but does affect cg layout slightly

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Apr 12 06:28:05 2004 UTC (20 years, 7 months ago) by dbj
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -3 lines
fix whitespace in debug printf

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Mar 21 20:01:41 2004 UTC (20 years, 8 months ago) by dsl
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +9 -5 lines
Don't use an ffsv1 superblock from 64k (SBLOCK_UFS2) when looking
for the main filesystem superblock.
64k is the offset of the first alternate if the blocksize if 64k.
Fixes part of PR kern/24809

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Jan 20 15:29:35 2004 UTC (20 years, 10 months ago) by dbj
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +5 -3 lines
don't calculate fake superblock used for finding alternate superblocks
if the disklabel is missing the cpg parameter.  Also print a warning
if this is skipped because of a missing fsize, frag or cpg disklabel parameter
this fixes a divide by zero error reported by martin@

Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon Jan 12 19:40:24 2004 UTC (20 years, 10 months ago) by dbj
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +4 -4 lines
change the message "COVERTING TO FFSv2 SUPERBLOCK" to
"CONVERT TO NEW SUPERBLOCK LAYOUT" to help avoid confusion

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Jan 10 14:28:37 2004 UTC (20 years, 10 months ago) by mrg
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +14 -11 lines
- some KNF (80 cols)
- fix a printf format issue

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Jan 9 22:23:18 2004 UTC (20 years, 10 months ago) by dbj
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +4 -4 lines
use %#llx instead of %llx when printing incorrect qfmask or qbmask

Revision 1.65: download - view: text, markup, annotated - select for diffs
Fri Jan 9 19:12:31 2004 UTC (20 years, 10 months ago) by dbj
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +165 -34 lines
do not upgrade superblock or set FS_FLAGS_UPDATED unless -c 4 option
is provided.
add compatibility for filesystems before FFSv2 integration
these patches are from pr port-macppc/23925 and should also
fix problems discussed in pr kern/21404 and pr kern/21283

Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Jan 2 05:08:57 2004 UTC (20 years, 11 months ago) by dbj
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +4 -4 lines
add uuid field to apple ufs volume label

Revision 1.63: download - view: text, markup, annotated - select for diffs
Mon Oct 20 12:04:38 2003 UTC (21 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +15 -15 lines
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.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Aug 7 10:04:21 2003 UTC (21 years, 4 months ago) by agc
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -7 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Apr 11 10:21:40 2003 UTC (21 years, 7 months ago) by enami
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -3 lines
Correctly detect a UFS1 file system of non-native endian.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Apr 6 17:23:26 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +21 -13 lines
Write update some old fields when writing the superblock, similar to
ffs_oldfscompat_write() in the kernel. Use the old totals when
time < old_time (i.e. an old kernel or fsck wrote the filesystem last).
When setting the date back on a new kernel, that works out ok, since
new kernels always update both fields.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Apr 5 13:45:21 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +7 -2 lines
Skip checks for old 4.2BSD filesystem; as it stands, we can't deal with
writing them. Could be fixed, but doesn't have a high priority.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Apr 2 10:39:26 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +142 -133 lines
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.

Revision 1.52.2.1: download - view: text, markup, annotated - select for diffs
Sun Feb 23 08:00:10 2003 UTC (21 years, 9 months ago) by jmc
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001
Diff to: previous 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52: +32 -52 lines
Pullup rev 1.57 (requested by fvdl in ticket #1180)
 Only check relevant fields when comparing the superblock to an alternate
 superblock. Avoids false positives should fsck_ffs be run on a filesystem
 that was created after the UFS2 code has been merged.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Feb 21 15:15:49 2003 UTC (21 years, 9 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +32 -52 lines
Only check relevant fields when comparing the superblock to an alternate
superblock. Avoids false positives should fsck_ffs be run on a filesystem
that was created after the UFS2 code has been merged.

This commit is mostly a forward compatibility patch that can be pulled
up in to the 1.6 branch.

From Kirk Mckusick in FreeBSD (setup.c rev. 1.30). Original commit message:
========
When checking the alternate superblock, we used to copy any fields
that might have changed, then did a byte-by-byte comparison with
the alternate. If any unused fields got used, they had to be added
to the exception list. Such changes caused too many false alarms.
So, I have changed the comparison algorithm to compare a selected
set of fields that are not expected to change. This new algorithm
causes far fewer false hits and still does a good job of detecting
problems when they have really occurred. In particular, this change
should ease the transition to kernels supporting UFS2 which make
some significant changes to the superblock.

Sponsored by:	DARPA, NAI Labs
========

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri Jan 24 21:55:09 2003 UTC (21 years, 10 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -4 lines
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.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Nov 5 05:18:50 2002 UTC (22 years, 1 month ago) by dbj
Branches: MAIN
CVS tags: fvdl_fs64_base
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -3 lines
check that a disklabel is valid before trying to extract partition
information from it when checking for apple ufs filesystems

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Sep 28 20:11:06 2002 UTC (22 years, 2 months ago) by dbj
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +149 -11 lines
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.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Jun 30 22:57:31 2002 UTC (22 years, 5 months ago) by dbj
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +12 -6 lines
commit fix from pr bin/15449
this fixes FS_42POSTBLFMT compatibility

Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Dec 19 10:05:20 2001 UTC (22 years, 11 months ago) by fvdl
Branches: MAIN
CVS tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RC1
Branch point for: netbsd-1-6
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -2 lines
Don't use the pendinginodes and pendingblocks fields in alternate
superblock comparison.

Revision 1.37.4.5: download - view: text, markup, annotated - select for diffs
Sun Nov 25 19:54:36 2001 UTC (23 years ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003
Diff to: previous 1.37.4.4: preferred, colored; branchpoint 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.4.4: +7 -2 lines
Pull up revision 1.49 (requested by lukem):
  Pull in enhanced ffs_dirpref() algorithm, which provides a
  substantial performance improvement through better locality
  between parent/child directories and their files, and by easing
  the pressure on the buffer cache for metadata operations.

Revision 1.37.4.4: download - view: text, markup, annotated - select for diffs
Sun Nov 25 19:37:37 2001 UTC (23 years ago) by he
Branches: netbsd-1-5
Diff to: previous 1.37.4.3: preferred, colored; branchpoint 1.37: preferred, colored
Changes since revision 1.37.4.3: +2 -3 lines
Pull up revision 1.47 (requested by lukem):
  Deprecate unused fs_fscktime.

Revision 1.37.4.3: download - view: text, markup, annotated - select for diffs
Sun Nov 25 19:35:42 2001 UTC (23 years ago) by he
Branches: netbsd-1-5
Diff to: previous 1.37.4.2: preferred, colored; branchpoint 1.37: preferred, colored
Changes since revision 1.37.4.2: +12 -22 lines
Pull up revision 1.46 (requested by lukem):
  Change fs_csp[] from being a fixed size to being an array sized
  as required.  This allows file systems with more than about 15500
  cylinder groups (on 32-bit systems) to be used.

Revision 1.37.4.2: download - view: text, markup, annotated - select for diffs
Sun Nov 25 19:27:02 2001 UTC (23 years ago) by he
Branches: netbsd-1-5
Diff to: previous 1.37.4.1: preferred, colored; branchpoint 1.37: preferred, colored
Changes since revision 1.37.4.1: +7 -7 lines
Pull up revision 1.45 (requested by lukem):
  Call ffs_sb_swap() with the correct arguments.  Fixes problems
  with using other-endian file systems.

Revision 1.37.4.1: download - view: text, markup, annotated - select for diffs
Sat Nov 24 22:08:55 2001 UTC (23 years ago) by he
Branches: netbsd-1-5
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +54 -41 lines
Pull up revisions 1.39-1.43 (requested by lukem):
  Jumbo pullup for fsck_ffs:
   o fix incorrect error message
   o mark initialized globals with ``extern''
   o make reconnect algorithm O(n) instead of O(n^4)
   o remove dead code
   o don't swap cg_clustersum(cg)[0], it's a bitmap
   o ensure rotor values are positive
   o some code restructuring
   o fix byte swapping bug
   o pass5: check alternate superblocks for consistency with in-core master
   o fix usage message

Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri Nov 16 05:35:40 2001 UTC (23 years ago) by lukem
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +7 -12 lines
- changes to -F semantics:
	- remove the restriction that filesystem must be a regular file
	- don't try and read a disklabel
- use `p' (instead of `h') as the index of the last partition

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Sep 18 08:38:28 2001 UTC (23 years, 2 months ago) by lukem
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +14 -3 lines
add comments to make it clearer what cmpsblks() is doing

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Sep 6 02:16:00 2001 UTC (23 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +7 -2 lines
Incorporate the enhanced ffs_dirpref() by Grigoriy Orlov, as found in
FreeBSD (three commits; the initial work, man page updates, and a fix
to ffs_reload()), with the following differences:
- Be consistent between newfs(8) and tunefs(8) as to the options which
  set and control the tuning parameters for this work (avgfilesize & avgfpdir)
- Use u_int16_t instead of u_int8_t to keep track of the number of
  contiguous directories (suggested by Chuck Silvers)
- Work within our FFS_EI framework
- Ensure that fs->fs_maxclusters and fs->fs_contigdirs don't point to
  the same area of memory

The new algorithm has a marked performance increase, especially when
performing tasks such as untarring pkgsrc.tar.gz, etc.

The original FreeBSD commit messages are attached:

=====
mckusick    2001/04/10 01:39:00 PDT
  Directory layout preference improvements from Grigoriy Orlov <gluk@ptci.ru>.
  His description of the problem and solution follow. My own tests show
  speedups on typical filesystem intensive workloads of 5% to 12% which
  is very impressive considering the small amount of code change involved.

  ------

    One day I noticed that some file operations run much faster on
  small file systems then on big ones. I've looked at the ffs
  algorithms, thought about them, and redesigned the dirpref algorithm.

    First I want to describe the results of my tests. These results are old
  and I have improved the algorithm after these tests were done. Nevertheless
  they show how big the perfomance speedup may be. I have done two file/directory
  intensive tests on a two OpenBSD systems with old and new dirpref algorithm.
  The first test is "tar -xzf ports.tar.gz", the second is "rm -rf ports".
  The ports.tar.gz file is the ports collection from the OpenBSD 2.8 release.
  It contains 6596 directories and 13868 files. The test systems are:

  1. Celeron-450, 128Mb, two IDE drives, the system at wd0, file system for
     test is at wd1. Size of test file system is 8 Gb, number of cg=991,
     size of cg is 8m, block size = 8k, fragment size = 1k OpenBSD-current
     from Dec 2000 with BUFCACHEPERCENT=35

  2. PIII-600, 128Mb, two IBM DTLA-307045 IDE drives at i815e, the system
     at wd0, file system for test is at wd1. Size of test file system is 40 Gb,
     number of cg=5324, size of cg is 8m, block size = 8k, fragment size = 1k
     OpenBSD-current from Dec 2000 with BUFCACHEPERCENT=50

  You can get more info about the test systems and methods at:
  http://www.ptci.ru/gluk/dirpref/old/dirpref.html

                                Test Results

               tar -xzf ports.tar.gz               rm -rf ports
    mode  old dirpref new dirpref speedup old dirprefnew dirpref speedup
                               First system
   normal     667         472      1.41       477        331       1.44
   async      285         144      1.98       130         14       9.29
   sync       768         616      1.25       477        334       1.43
   softdep    413         252      1.64       241         38       6.34
                               Second system
   normal     329         81       4.06       263.5       93.5     2.81
   async      302         25.7    11.75       112          2.26   49.56
   sync       281         57.0     4.93       263         90.5     2.9
   softdep    341         40.6     8.4        284          4.76   59.66

  "old dirpref" and "new dirpref" columns give a test time in seconds.
  speedup - speed increasement in times, ie. old dirpref / new dirpref.

  ------

  Algorithm description

  The old dirpref algorithm is described in comments:

  /*
   * Find a cylinder to place a directory.
   *
   * The policy implemented by this algorithm is to select from
   * among those cylinder groups with above the average number of
   * free inodes, the one with the smallest number of directories.
   */

  A new directory is allocated in a different cylinder groups than its
  parent directory resulting in a directory tree that is spreaded across
  all the cylinder groups. This spreading out results in a non-optimal
  access to the directories and files. When we have a small filesystem
  it is not a problem but when the filesystem is big then perfomance
  degradation becomes very apparent.

  What I mean by a big file system ?

    1. A big filesystem is a filesystem which occupy 20-30 or more percent
       of total drive space, i.e. first and last cylinder are physically
       located relatively far from each other.
    2. It has a relatively large number of cylinder groups, for example
       more cylinder groups than 50% of the buffers in the buffer cache.

  The first results in long access times, while the second results in
  many buffers being used by metadata operations. Such operations use
  cylinder group blocks and on-disk inode blocks. The cylinder group
  block (fs->fs_cblkno) contains struct cg, inode and block bit maps.
  It is 2k in size for the default filesystem parameters. If new and
  parent directories are located in different cylinder groups then the
  system performs more input/output operations and uses more buffers.
  On filesystems with many cylinder groups, lots of cache buffers are
  used for metadata operations.

  My solution for this problem is very simple. I allocate many directories
  in one cylinder group. I also do some things, so that the new allocation
  method does not cause excessive fragmentation and all directory inodes
  will not be located at a location far from its file's inodes and data.
  The algorithm is:
  /*
   * Find a cylinder group to place a directory.
   *
   * The policy implemented by this algorithm is to allocate a
   * directory inode in the same cylinder group as its parent
   * directory, but also to reserve space for its files inodes
   * and data. Restrict the number of directories which may be
   * allocated one after another in the same cylinder group
   * without intervening allocation of files.
   *
   * If we allocate a first level directory then force allocation
   * in another cylinder group.
   */

    My early versions of dirpref give me a good results for a wide range of
  file operations and different filesystem capacities except one case:
  those applications that create their entire directory structure first
  and only later fill this structure with files.

    My solution for such and similar cases is to limit a number of
  directories which may be created one after another in the same cylinder
  group without intervening file creations. For this purpose, I allocate
  an array of counters at mount time. This array is linked to the superblock
  fs->fs_contigdirs[cg]. Each time a directory is created the counter
  increases and each time a file is created the counter decreases. A 60Gb
  filesystem with 8mb/cg requires 10kb of memory for the counters array.

    The maxcontigdirs is a maximum number of directories which may be created
  without an intervening file creation. I found in my tests that the best
  performance occurs when I restrict the number of directories in one cylinder
  group such that all its files may be located in the same cylinder group.
  There may be some deterioration in performance if all the file inodes
  are in the same cylinder group as its containing directory, but their
  data partially resides in a different cylinder group. The maxcontigdirs
  value is calculated to try to prevent this condition. Since there is
  no way to know how many files and directories will be allocated later
  I added two optimization parameters in superblock/tunefs. They are:

          int32_t  fs_avgfilesize;   /* expected average file size */
          int32_t  fs_avgfpdir;      /* expected # of files per directory */

  These parameters have reasonable defaults but may be tweeked for special
  uses of a filesystem. They are only necessary in rare cases like better
  tuning a filesystem being used to store a squid cache.

  I have been using this algorithm for about 3 months. I have done
  a lot of testing on filesystems with different capacities, average
  filesize, average number of files per directory, and so on. I think
  this algorithm has no negative impact on filesystem perfomance. It
  works better than the default one in all cases. The new dirpref
  will greatly improve untarring/removing/coping of big directories,
  decrease load on cvs servers and much more. The new dirpref doesn't
  speedup a compilation process, but also doesn't slow it down.

  Obtained from:	Grigoriy Orlov <gluk@ptci.ru>
=====

=====
iedowse     2001/04/23 17:37:17 PDT
  Pre-dirpref versions of fsck may zero out the new superblock fields
  fs_contigdirs, fs_avgfilesize and fs_avgfpdir. This could cause
  panics if these fields were zeroed while a filesystem was mounted
  read-only, and then remounted read-write.

  Add code to ffs_reload() which copies the fs_contigdirs pointer
  from the previous superblock, and reinitialises fs_avgf* if necessary.

  Reviewed by:	mckusick
=====

=====
nik         2001/04/10 03:36:44 PDT
  Add information about the new options to newfs and tunefs which set the
  expected average file size and number of files per directory.  Could do
  with some fleshing out.
=====

Revision 1.48: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:53:31 2001 UTC (23 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -3 lines
no need to assign asb->fs_state twice in cmpsblks()

Revision 1.47: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:52:18 2001 UTC (23 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -3 lines
deprecate fs_fscktime; we never used it.

in an effort to maintain compatibility with freebsd/openbsd/whatever,
i'm attempting to get the superblock format in sync, and freebsd uses
the int32_t at this position for `fs_pendinginodes'.

if we ever decide to implement fscktime functionality, we'll:
a) make sure to liaise with the other projects to reserve the same
   spare field
b) actually implement the code this time ...

(this is also preparing us for other changes, like the new dirpref code)

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Sep 2 01:58:31 2001 UTC (23 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +12 -22 lines
Incorporate fix by iedowse @ FreeBSD to allow disks with large numbers of
cylinder groups to work correctly, with minor modifications by me to work
with our FFS_EI code.  From the FreeBSD commit message:

	The ffs superblock includes a 128-byte region for use by temporary
	in-core pointers to summary information. An array in this region
	(fs_csp) could overflow on filesystems with a very large number of
	cylinder groups (~16000 on i386 with 8k blocks). When this happens,
	other fields in the superblock get corrupted, and fsck refuses to
	check the filesystem.

	Solve this problem by replacing the fs_csp array in 'struct fs'
	with a single pointer, and add padding to keep the length of the
	128-byte region fixed. Update the kernel and userland utilities
	to use just this single pointer.

	With this change, the kernel no longer makes use of the superblock
	fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c
	to indicate that these fields must be calculated for compatibility
	with older kernels.

	Reviewed by:    mckusick

Revision 1.45: download - view: text, markup, annotated - select for diffs
Fri Aug 17 02:18:47 2001 UTC (23 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +7 -7 lines
remove third argument (`int ns') from ffs_sb_swap(), and let ffs_sb_swap()
determine the endianness of the `struct fs *o' superblock from o->fs_magic
and set needswap as necessary, rather than trusting the caller to get
it right.  invariably, almost every caller of ffs_sb_swap() was calling it
with ns set to the wrong value for ns anyway!
ansi KNF ffs_bswap.c declarations whilst here.

this fixes all sorts of problems when trying to use other-endian file systems,
notably the kernel trying to access memory *way* off, possibly corrupting or
panicing, and userland programs SEGVing and/or corrupting things (e.g,
"fsck_ffs -B"  to swap a file system endianness).

whilst the previous rev of ffs_bswap.c (1.10, 2000/12/23) made this problem
worse, i suspect that the problem was always there and previous versions
just happened not to trash things at the wrong time.

FFS_EI should now be a lot more stable.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Aug 15 03:54:53 2001 UTC (23 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +9 -3 lines
- implement -F; treat provided filesystems as images in regular files
- replace "filesystem" with "file system" as appropriate
- grammar fixes

Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed Jul 4 22:43:35 2001 UTC (23 years, 5 months ago) by hubertf
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3 lines
EVEN IF YOU SCREAM, THE COMMANT IS STILL CALLED fsck_ffs !

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sun Feb 4 21:25:54 2001 UTC (23 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -4 lines
remove redundant declarations

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Jan 26 17:37:16 2001 UTC (23 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +43 -35 lines
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.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Jan 9 06:05:10 2001 UTC (23 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -5 lines
Remove a bogus piece of code that was never used.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Jan 9 05:39:27 2001 UTC (23 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +12 -2 lines
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.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Jan 5 02:02:57 2001 UTC (23 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -5 lines
use %ll_ instead of the less standard %q_

Revision 1.36.6.1: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:30:24 1999 UTC (24 years, 11 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +22 -7 lines
Pull up to last week's -current.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Nov 15 19:18:26 1999 UTC (25 years ago) by fvdl
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +22 -7 lines
Changes for softdep code.

Revision 1.36.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 26 23:20:11 1999 UTC (25 years, 1 month ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.36.2.1: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.2.1: +8 -2 lines
Fix some merge mistakes.

Revision 1.36.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 19 13:01:30 1999 UTC (25 years, 1 month ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +16 -7 lines
Bring in Kirk McKusick's FFS softdep code on a branch.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat May 1 20:04:14 1999 UTC (25 years, 7 months ago) by is
Branches: MAIN
CVS tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, fvdl-softdep
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -4 lines
Fix typo.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Thu Nov 12 16:19:48 1998 UTC (26 years ago) by christos
Branches: MAIN
CVS tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -3 lines
Adjust for DKTYPENAME changes.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Jul 26 20:32:43 1998 UTC (26 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +7 -7 lines
const poisoning.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Mar 18 17:01:24 1998 UTC (26 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +208 -116 lines
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").

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Sep 24 09:24:23 1997 UTC (27 years, 2 months ago) by lukem
Branches: MAIN
CVS tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -2 lines
for now, #ifdef out a couple of chunks that were added in the lite2 merge

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Sep 20 06:16:33 1997 UTC (27 years, 2 months ago) by lukem
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -2 lines
- 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

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Sep 16 16:45:33 1997 UTC (27 years, 2 months ago) by lukem
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +29 -24 lines
resolve conflicts from lite-2 merge.

Revision 1.1.1.3 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue Sep 16 15:07:06 1997 UTC (27 years, 2 months ago) by lukem
Branches: CSRG
CVS tags: lite-2
Diff to: previous 1.1.1.2: preferred, colored
Changes since revision 1.1.1.2: +65 -31 lines
imported from lite-2

Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue Sep 16 08:37:08 1997 UTC (27 years, 2 months ago) by mrg
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +9 -9 lines
make these compile on the alpha after WARNS=1.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Sep 14 14:36:37 1997 UTC (27 years, 2 months ago) by lukem
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +9 -8 lines
* cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck() func
* prefix hex numbers with '0x'
* getopt returns -1 not EOF

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Sep 27 22:45:19 1996 UTC (28 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
- util.h -> fsutil.h

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Sep 23 16:18:41 1996 UTC (28 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +13 -11 lines
- 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.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue May 21 17:36:21 1996 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -6 lines
Oops; use %x to print out masks, not %d.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue May 21 17:25:56 1996 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +76 -8 lines
Check fs_[bf]mask, fs_maxfilesize, fs_maxsymlinklen, and fs_q[bf]mask,
since incorrect values may cause the kernel to malfunction.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Apr 5 01:45:29 1996 UTC (28 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -4 lines
check in changes proposed in PR 2006 (approved by J.T.), to rename fsck
to fsck_ffs, so that in the future 'fsck' can be a wrapper than invokes
appropriate filesystem-specific checker programs.  For now, the only
user-visible change is that the names have changed in the manual page
and in error messages; fsck and fsck.8 are now links to fsck_ffs and
fsck_ffs.8, until the rest of the transition is complete.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Jul 12 01:49:23 1995 UTC (29 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +5 -4 lines
implement a 'force check' flag, '-f'.  I used the SunOS name, but the Digital
semantics.  now:
	(1) dirty file systems will always be checked; nothing new there.
	(2) if not '-f' clean file systems will _NEVER_ be checked,
		i.e. they won't be checked even if -p isn't specified.  This
		allows one to 'fsck -p ; fsck' to preen, then clean up
		anything that 'fsck -p' barfs on, without waiting for the
		clean file systems to be checked again.
	(3) if '-f' clean file systems will ALWAYS be checked.  This
		allows people to put 'fsck -fp' into /etc/rc on systems
		where they're leery of the FS clean flag state, need
		the extra reliability, and can afford time 'wasted'
		in checks.
The assumption made here is that if a file system is marked clean, it
_IS CLEAN_, really, and shouldn't be checked unless fsck is explicitly
told to (with -f).  This should be a valid assumption, but may not be in
the presence of file system bugs.  Documentation updated to note '-f'.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Apr 12 21:24:12 1995 UTC (29 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +17 -4 lines
Set the clean flag if necessary.  If preening, don't check `clean' file
systems.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Mar 21 01:30:20 1995 UTC (29 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +5 -5 lines
type sizes

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Mar 18 14:56:01 1995 UTC (29 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +7 -2 lines
convert to new RCS Id conventions; reduce my headache

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Dec 28 00:03:57 1994 UTC (29 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +18 -3 lines
Mostly sync with CSRG.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Dec 27 19:26:57 1994 UTC (29 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -1 lines
Copy fs_maxcluster when comparing superblocks.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Dec 18 15:55:43 1994 UTC (29 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4 lines
light clean, and make it compile against new header files.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Dec 5 20:16:06 1994 UTC (30 years ago) by cgd
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +18 -8 lines
more cleanups from Jim Jegers, passed over by me.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Oct 28 16:55:11 1994 UTC (30 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +6 -6 lines
Use the S_IS*() macros, and make this compile again after Chris's changes to ufs.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Sep 23 23:49:16 1994 UTC (30 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -2 lines
Remove some more uses of obsolete functions.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Sep 23 14:27:21 1994 UTC (30 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +7 -8 lines
Eliminate uses of some obsolete functions.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jun 29 11:01:37 1994 UTC (30 years, 5 months ago) by ws
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -2 lines
Reads on raw disks are only guarranteed in multiples of the block size

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Jun 13 22:43:24 1994 UTC (30 years, 5 months ago) by mycroft
Branches: CSRG
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +71 -89 lines
Import 4.4-Lite version.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Jun 8 19:00:32 1994 UTC (30 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +73 -144 lines
Update from 4.4-Lite, with local changes.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Apr 25 18:33:42 1994 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
oops; changed comparison, but not field!

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Apr 25 18:29:04 1994 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -1 lines
need <sys/time.h>

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Apr 14 03:25:01 1994 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
fs type names will soon be strings

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Apr 9 08:58:31 1994 UTC (30 years, 8 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +54 -3 lines
from <dean@fsa.ca>: let "fsck /usr" work. also, if the user does
"fsck /dev/sd0a" attempt to map to the raw device name.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Oct 1 01:45:31 1993 UTC (31 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -1 lines
Skip check if filesystem is marked clean and isn't too dusty, only with -p.
Set clean flag after checking a filesystem.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Aug 1 18:27:11 1993 UTC (31 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -2 lines
Add RCS identifiers.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Mar 23 00:28:14 1993 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -1 lines
changed "Id" to "Header" for rcsids

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Mar 22 08:04:00 1993 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -0 lines
added rcs ids to all files

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 8 months ago) by cgd
Branches: CSRG
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>