Commit Graph

19 Commits

Author SHA1 Message Date
hannken 8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
itojun e1e0321817 use bounded string op 2003-08-13 02:51:20 +00:00
agc b5b2954259 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
itojun 6bf8c47b32 we can't do {} while (0) for TEST() macro since it has "break" which
goes out of the switch statement.  from shin-ichi kaneta.
2002-11-16 13:42:36 +00:00
enami 54a944c353 Cosmetic changes. 2002-11-09 12:27:08 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv fcae5f73b7 Add hooks to make mtree compilable from src/tools. 2002-01-29 00:07:27 +00:00
lukem 353bb37176 fix strlcpy length in previous... 2001-10-18 08:03:46 +00:00
lukem b720dda403 make this WARNS=2 safe 2001-10-18 03:54:18 +00:00
lukem 0d74a5dc03 flags_to_strings() changes:
- fix bug where the 'clear' flag was set outside of main loop, so
  "dump,uchg,arch" on a file with flags would clear all the bits
  (because "dump" sets 'clear'). noted in FreeBSD PR 10071, and fix
  obtained from FreeBSD.

- enforce right-most priority on arguments by clearing the appropriate
  bit in the opposite set; if a string of "nouchg,uchg" is given,
  chflags(8) would clear uchg because it applies the "set" bits before
  clearing the "clear" bits.  now, "uchg" sets UF_IMMUTABLE in setp
  and also resets it in clrp, solving this problem

- constify second arg (the `default' arg)
2001-10-18 03:16:20 +00:00
lukem ba2e04dc88 convert to new KNF 2000-07-29 03:46:14 +00:00
lukem 0f56c0cd69 * parse `nonodump' (synonym for `dump'; both are inverse of `nodump').
from Brian C. Grayson <bgrayson@marvin.ece.utexas.edu> in [bin/3932]
* don't depend on a fallthrough in one case; explicitly return like
  all other cases.
* include "stat_flags.h" instead of "ls.h" and "extern.h"; other
  programs use this file and don't need the other cruft.
1999-01-03 01:30:10 +00:00
christos b22592e84f Fix compiler warnings.
Add WARNS=1
1997-07-20 18:52:57 +00:00
jtc d943cdadce Sync with 4.4lite2 1995-09-07 06:42:58 +00:00
cgd 49f0ad8601 convert to new RCS id conventions. 1995-03-21 09:01:59 +00:00
mycroft d966913f57 Sync with CSRG. 1994-12-27 23:14:46 +00:00
mycroft 83ede345fb Merge with 4.4-Lite version. 1994-09-23 06:14:39 +00:00
mycroft e40b06360c Import original 4.4-Lite version. 1994-09-22 03:04:15 +00:00