The NetBSD Project

CVS log for src/sbin/tunefs/tunefs.8

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.49 / (download) - annotate - [select for diffs], Mon Jan 17 20:01:43 2022 UTC (2 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

update date

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jan 17 18:03:22 2022 UTC (2 years, 1 month ago) by kim
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

Move the possible optimize_preference values back under the -o flag

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jun 18 19:32:56 2020 UTC (3 years, 8 months ago) by wiz
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

The ACL flag is -p, not -n.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jun 7 19:35:15 2020 UTC (3 years, 8 months ago) by wiz
Branch: MAIN
Changes since 1.45: +12 -12 lines
Diff to previous 1.45 (colored)

Sort option descriptions.

Revision 1.45 / (download) - annotate - [select for diffs], Sat May 16 18:31:47 2020 UTC (3 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.44: +8 -2 lines
Diff to previous 1.44 (colored)

Add ACL support for FFS. From FreeBSD.

Revision 1.41.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:28 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.41.2.1: +19 -2 lines
Diff to previous 1.41.2.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Aug 9 10:41:05 2014 UTC (9 years, 6 months ago) by wiz
Branch: MAIN
CVS Tags: tls-maxphys-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, 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, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, 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, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, 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, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.43: +10 -6 lines
Diff to previous 1.43 (colored)

Bump date for previous. New sentence, new line. Use more markup.
Remove superfluous Pp in list.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Aug 9 10:33:46 2014 UTC (9 years, 6 months ago) by mlelstv
Branch: MAIN
Changes since 1.42: +14 -1 lines
Diff to previous 1.42 (colored)

add -S option to adjust the superblock for different sector sizes. While
the kernel ignores this information, userland tools rely on it.

This is needed when moving images between devices of different sector size.

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:28:12 2013 UTC (11 years ago) by tls
Branch: tls-maxphys
Changes since 1.41: +8 -3 lines
Diff to previous 1.41 (colored)

resync with head

Revision 1.40.4.2 / (download) - annotate - [select for diffs], Wed Jan 16 05:32:35 2013 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.40.4.1: +8 -3 lines
Diff to previous 1.40.4.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

sync with (a bit old) head

Revision 1.42 / (download) - annotate - [select for diffs], Mon Dec 3 12:28:06 2012 UTC (11 years, 2 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, 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, agc-symver-base, agc-symver
Changes since 1.41: +8 -3 lines
Diff to previous 1.41 (colored)

Document how to resize the WAPBL log size.
Based on patch by Edgar Fu <ef@math.uni-bonn.de>.

Revision 1.40.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:43 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.40: +1 -3 lines
Diff to previous 1.40 (colored)

sync with head

Revision 1.41 / (download) - annotate - [select for diffs], Sun Apr 8 22:00:37 2012 UTC (11 years, 10 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4
Branch point for: tls-maxphys
Changes since 1.40: +1 -3 lines
Diff to previous 1.40 (colored)

Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Mar 6 17:21:08 2011 UTC (12 years, 11 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, 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, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.39: +5 -4 lines
Diff to previous 1.39 (colored)

Fix punctuation markup; new sentence, new line.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Mar 6 17:08:17 2011 UTC (12 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.38: +19 -2 lines
Diff to previous 1.38 (colored)

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.38.2.1 / (download) - annotate - [select for diffs], Thu Jan 20 14:24:55 2011 UTC (13 years, 1 month ago) by bouyer
Branch: bouyer-quota2
Changes since 1.38: +19 -2 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

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.37.4.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:07 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.37: +1 -21 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Sync with HEAD.

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

Revision 1.38 / (download) - annotate - [select for diffs], Sun Feb 22 20:28:05 2009 UTC (15 years ago) by ad
Branch: MAIN
CVS Tags: matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base, bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: bouyer-quota2
Changes since 1.37: +1 -21 lines
Diff to previous 1.37 (colored)

PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.

Revision 1.36.26.1 / (download) - annotate - [select for diffs], Sun Sep 28 11:17:15 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.36: +10 -1 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

Sync with HEAD.

Revision 1.36.30.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:28:30 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.36: +10 -1 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Jul 31 05:38:04 2008 UTC (15 years, 7 months ago) by simonb
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, 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, 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, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: jym-xensuspend
Changes since 1.36: +10 -1 lines
Diff to previous 1.36 (colored)

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.36.32.2 / (download) - annotate - [select for diffs], Mon Jul 28 13:38:50 2008 UTC (15 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.36.32.1: +2 -2 lines
Diff to previous 1.36.32.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

A wapbl(8) should be a wapbl(4).

Found by wizd.

Revision 1.36.32.1 / (download) - annotate - [select for diffs], Mon Jul 28 12:40:06 2008 UTC (15 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.36: +10 -1 lines
Diff to previous 1.36 (colored)

Add support for creating a WAPBL log in the filesystem.  Will
create an in-filesystem log on first "mount -o log" if one doesn't
exist, and will then continue to use same log in the future.  See
(soon to be added) wapbl(4) for more info.

Adds a new B_CONTIG low-level allocation flag that uses hints in
"struct ffs_inode_ext" to lay out an ffs file's data contiguously.

Thanks to Greg Oster for helping with the design of this and to
Antti Kantee for code review and suggestions.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Dec 20 10:28:47 2004 UTC (19 years, 2 months ago) by hubertf
Branch: 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, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, simonb-wapbl-nbase, simonb-wapbl-base, 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, 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, mjf-devfs-base, mjf-devfs, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: wrstuden-revivesa, simonb-wapbl, mjf-devfs2
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored)

Add comment that there are strings attached to the fish. Beware!
(Source: http://www.livejournal.com/community/unixhistory/1808.html)

Revision 1.35 / (download) - annotate - [select for diffs], Thu Nov 18 00:11:48 2004 UTC (19 years, 3 months ago) by hubertf
Branch: MAIN
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

Remove (wrong?) default for minfree, xref newfs.8 instead.
Suggested by Ignatios.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Thu Apr 29 04:09:05 2004 UTC (19 years, 10 months ago) by jmc
Branch: 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
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pullup rev 1.34 (requested by grant in ticket #208)

According to newfs(8) and reality, the default minfree value is actually
5%, not 10%.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 26 14:00:31 2004 UTC (19 years, 10 months ago) by grant
Branch: MAIN
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored)

according to newfs(8) and reality, the default minfree value is actually
5%, not 10%. make it so.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Aug 7 10:04:40 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.32: +2 -6 lines
Diff to previous 1.32 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

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

Revision 1.32 / (download) - annotate - [select for diffs], Wed Apr 2 10:39:32 2003 UTC (20 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.31: +1 -23 lines
Diff to previous 1.31 (colored)

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.31 / (download) - annotate - [select for diffs], Tue Feb 25 10:35:11 2003 UTC (21 years ago) by wiz
Branch: MAIN
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored)

.Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Dec 21 12:50:54 2002 UTC (21 years, 2 months ago) by wiz
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

dependent only has es, no as; from Adrian Mrva.

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Sun Nov 25 19:57:55 2001 UTC (22 years, 3 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.20.2.1: +8 -2 lines
Diff to previous 1.20.2.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored)

Pull up revision 1.26 (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.20.2.1 / (download) - annotate - [select for diffs], Sun Nov 25 19:39:13 2001 UTC (22 years, 3 months ago) by he
Branch: netbsd-1-5
Changes since 1.20: +46 -40 lines
Diff to previous 1.20 (colored)

Pull up revisions 1.23-1.25 (requested by lukem):
  Add ``-F'' option, and rename ``-t'' option to ``-k''.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Nov 16 11:21:39 2001 UTC (22 years, 3 months ago) by wiz
Branch: 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-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-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.28: +6 -6 lines
Diff to previous 1.28 (colored)

Sort sections.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Nov 16 10:25:51 2001 UTC (22 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Whitespace nits

Revision 1.27 / (download) - annotate - [select for diffs], Fri Nov 9 09:05:52 2001 UTC (22 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.26: +6 -4 lines
Diff to previous 1.26 (colored)

Change -F from "special must be a regular file" to "special can be any type,
and don't attempt to do any file name translation (e.g, search in fstab)".

In the non -F case, search for special in fstab. If found, convert fs_spec
to a raw device name. In any case, use opendisk(3) to open the device.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Sep 6 02:16:01 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.25: +8 -2 lines
Diff to previous 1.25 (colored)

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.25 / (download) - annotate - [select for diffs], Mon Sep 3 16:30:02 2001 UTC (22 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.24: +3 -1 lines
Diff to previous 1.24 (colored)

comment the commenting-out, to reduce confusion

Revision 1.24 / (download) - annotate - [select for diffs], Mon Sep 3 15:04:39 2001 UTC (22 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.23: +24 -22 lines
Diff to previous 1.23 (colored)

- rename option `-t trackskew' to `-k trackskew', for consistency with newfs(8)
- add CHANGEVAL() macro, which does the hard work of changing a parameter
- sort options in usage()
- use  .ig [ ... ] ..  to comment out sections of man pages (instead
  of .\" at the start of each line

Revision 1.23 / (download) - annotate - [select for diffs], Sun Aug 19 09:39:24 2001 UTC (22 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.22: +25 -23 lines
Diff to previous 1.22 (colored)

- add -F; indicates "special" is a file system image in a regular file
- reorder "special" validation to after option parsing
- use getopt(3) instead of homegrown code
- add getnum() to parse and validate a number
- clean up man page
- ansi KNF, WARNS=2

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jun 5 11:22:54 2001 UTC (22 years, 9 months ago) by wiz
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Drop arguments of .Os.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Mar 5 23:18:09 2001 UTC (23 years ago) by aymeric
Branch: MAIN
Changes since 1.20: +1 -10 lines
Diff to previous 1.20 (colored)

Move reference to article on soft-updates from tunefs.8 to mount_ffs.8
OK'd by Ignatios.

Revision 1.19.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 16:05:54 2000 UTC (23 years, 8 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.19: +17 -17 lines
Diff to previous 1.19 (colored) next main 1.20 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jun 15 22:37:17 2000 UTC (23 years, 8 months ago) by fvdl
Branch: MAIN
CVS Tags: 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
Branch point for: netbsd-1-5
Changes since 1.19: +17 -17 lines
Diff to previous 1.19 (colored)

Disable (unifdef for now) tunefs -n <disable|enable>, this is done via
a mount option now.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Apr 27 21:34:27 2000 UTC (23 years, 10 months ago) by nathanw
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.18: +14 -2 lines
Diff to previous 1.18 (colored)

Finish describing what the soft dependancy code does.
Add a reference to the McKusick/Ganger Usenix paper.

Addresses PR#8838.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Mar 30 10:43:46 2000 UTC (23 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.17: +7 -1 lines
Diff to previous 1.17 (colored)

State the possible values of optimize_prefernce in description of
-o flag. Fixes bin/9706.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 28 19:51:34 2000 UTC (24 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.16: +11 -11 lines
Diff to previous 1.16 (colored)

reorder long descriptions for arguments to be in alphabetical order.
XXX: shouldn't 'enable' and 'disable' for -n be marked up in some way?

Revision 1.14.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:30:34 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.14: +14 -1 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

Pull up to last week's -current.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Nov 15 20:53:56 1999 UTC (24 years, 3 months ago) by fvdl
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Fix typo.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Nov 15 19:22:22 1999 UTC (24 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.14: +14 -1 lines
Diff to previous 1.14 (colored)

Update for soft updates code.

Revision 1.14.4.1 / (download) - annotate - [select for diffs], Tue Oct 19 12:59:53 1999 UTC (24 years, 4 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.14: +14 -1 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

Bring in Kirk McKusick's FFS softdep code on a branch.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Mar 7 11:02:08 1999 UTC (25 years ago) by mycroft
Branch: 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, fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, fvdl-softdep
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Clean up SYNOPSIS formatting.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Oct 20 09:12:07 1997 UTC (26 years, 4 months ago) by enami
Branch: 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
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Fix .Nm usage.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Sep 16 12:54:42 1997 UTC (26 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.11: +30 -3 lines
Diff to previous 1.11 (colored)

resolve conflicts from lite-2 merge

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Tue Sep 16 12:47:38 1997 UTC (26 years, 5 months ago) by lukem
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +32 -4 lines
Diff to previous 1.1.1.2 (colored)

imported from lite-2

Revision 1.11 / (download) - annotate - [select for diffs], Mon Sep 15 11:27:12 1997 UTC (26 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

* fix .Nm usage
* prototype main() to pass WARNS=1

Revision 1.10 / (download) - annotate - [select for diffs], Fri Dec 27 05:53:53 1996 UTC (27 years, 2 months ago) by mikel
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

oops, missed a comma.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Dec 26 04:33:35 1996 UTC (27 years, 2 months ago) by mikel
Branch: MAIN
Changes since 1.8: +1 -2 lines
Diff to previous 1.8 (colored)

eliminate obsolete references to mkfs(8);
from Klaus Klein <kleink@layla.inka.de>

Revision 1.8 / (download) - annotate - [select for diffs], Sat Mar 18 15:01:29 1995 UTC (28 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.7: +3 -2 lines
Diff to previous 1.7 (colored)

convert to new RCS Id conventions; reduce my headache

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Mon Jun 13 22:53:57 1994 UTC (29 years, 8 months ago) by mycroft
Branch: WFJ-920714, CSRG
CVS Tags: lite-1
Changes since 1.1.1.1: +7 -6 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4-Lite version.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 8 19:36:12 1994 UTC (29 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.6: +8 -7 lines
Diff to previous 1.6 (colored)

Update from 4.4-Lite, with local changes.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Apr 20 03:57:07 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored)

back to 10%, per mkm

Revision 1.5 / (download) - annotate - [select for diffs], Tue Apr 12 05:03:23 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

documentation, general cleanup.  ick.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 1 07:38:00 1993 UTC (30 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.3: +2 -3 lines
Diff to previous 1.3 (colored)

Add RCS indentifiers.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 23 00:31:21 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, netbsd-0-8
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

changed "Id" to "Header" for rcsids

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 22 08:04:00 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.1: +2 -0 lines
Diff to previous 1.1 (colored)

added rcs ids to all files

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>