Commit Graph

3148 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
atatat
190adb15c3 Sysctl descriptions under emul subtree. 2004-05-25 04:29:08 +00:00
jonathan
230fb9b8ab Eliminate several uses of `curproc' from the socket-layer code and from NFS.
Add a new explicit `struct proc *p' argument to socreate(), sosend().
Use that argument instead of curproc. Follow-on changes to pass that
argument to socreate(), sosend(), and (*so->so_send)() calls.
These changes reviewed and independently recoded  by Matt Thomas.

Changes to soreceive() and (*dom->dom_exernalize() from Matt Thomas:
pass soreceive()'s struct uio* uio->uio_procp to unp_externalize().
Eliminate curproc from unp_externalize.   Also, now soreceive() uses
its uio->uio_procp value, pass that same value downward to
((pr->pru_usrreq)() calls for consistency, instead of (struct proc * )0.

Similar changes in sys/nfs to eliminate (most) uses of curproc,
either via the req-> r_procp field of a struct nfsreq *req argument,
or by passing down new explicit struct proc * arguments.

Reviewed by: Matt Thomas, posted to tech-kern.
NB: The (*pr->pru_usrreq)() change should be tested on more (all!) protocols.
2004-05-22 22:52:13 +00:00
christos
85699649e2 grr, forgot to take out the & 2004-05-22 20:53:26 +00:00
christos
9a0b176050 allocate memory for statvfs instead of using the stack. 2004-05-22 20:46:53 +00:00
atatat
10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00
drochner
644e697b54 regen 2004-05-11 10:55:29 +00:00
drochner
c736283f11 FreeBSD emulation should not depend on NetBSD binary compatibility
options. Include compat_20_sys_*statfs* unconditionally.
2004-05-11 10:54:51 +00:00
jonathan
d2dde9d018 Regen src/sys/compat/freebsd_sys{call.h,callargs.h,calls.c,ent.c} from
syscalls.master rev 1.45, with COMPAT_2.0 fix.
2004-05-10 20:47:14 +00:00
christos
cec7684b79 Add opt_compat_netbsd.h because we need it for COMPAT_20; pointed out
by Jonathan Stone.
2004-05-10 20:27:42 +00:00
kent
e3f4d77dda regenerate for fsync_range, uuidgen, getvfsstat, statvfs1, fstatvfs1, and fhstatvfs1 2004-05-08 14:33:12 +00:00
kent
af38d21dbd add fsync_range, uuidgen, getvfsstat, statvfs1, fstatvfs1, and fhstatvfs1. 2004-05-08 14:31:59 +00:00
pk
4a04452106 Use crdup(), instead of crget()+memcpy(). 2004-05-02 12:32:22 +00:00
fair
5b3531cc87 Line 175 VFS_STAVTFS -> STATVFS (tyop) 2004-04-27 21:37:49 +00:00
atatat
e5004170aa Be consistent about using sysc_init_field() 2004-04-27 03:49:03 +00:00
christos
f987d253b9 PR/25335: Erik E. Fair: statvfs lossage in sys/lkm/compat/osf1 2004-04-26 20:33:50 +00:00
matt
b1fee09f27 Constify sreq2breq 2004-04-25 06:25:52 +00:00
matt
22120ad628 Constify the speedtab arrays 2004-04-25 06:23:40 +00:00
matt
c768d54573 Constify an array. 2004-04-25 06:04:54 +00:00
matt
48011c94e7 Constify a few read-only arrays/variables. 2004-04-25 06:02:20 +00:00
atatat
3f800573aa Be consistent about using sysc_init_field() 2004-04-25 05:54:38 +00:00
christos
dede52abd3 PR/25288: Erik E. Fair: convert this file to statvfs 2004-04-23 12:02:39 +00:00
hannken
fcd7f3df90 Fix statfs->statvfs fallout. 2004-04-22 14:32:09 +00:00
christos
924e775ac7 fix statvfs->statvfs1 fallout 2004-04-22 14:06:31 +00:00
christos
e6f05cd289 Add the missing 'v' to fhstatvfs1 2004-04-22 12:04:03 +00:00
hannken
754675a0e1 Make it compile again after statvfs import. 2004-04-22 10:18:03 +00:00
matt
633d902c65 Regen for statvfs changes. 2004-04-22 05:44:30 +00:00
christos
22df5bb240 try to make this compile. XXX: this will not work yet (hi simon) 2004-04-21 11:50:26 +00:00
simonb
b81e6f2ef6 ANSIfy, some KNF. 2004-04-21 07:05:07 +00:00
simonb
0495170a7a Fix some statfs->statvfs fallout. Compile tested only... 2004-04-21 05:20:27 +00:00
christos
34728fd71f more statvfs1 fallout. 2004-04-21 02:40:05 +00:00
christos
36d3802e0f fix more statvfs1 fallout 2004-04-21 02:37:20 +00:00
christos
5ccca4a99a s/statvfs/statvfs1/ 2004-04-21 02:27:34 +00:00
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
dmcmahill
888e67edcc Fix the sysinfo(SI_HW_SERIAL, emulation so that we actually get the
hostid of the machine rather than always getting "0".  Tested with
hostid(1) from solaris-2.8 and with lmhostid (part of FlexLM) for solaris.
Approved by atatat@.
2004-04-19 02:55:40 +00:00
matt
a6b639c3a5 Switch to using PSL_USEROK_P()
Use new save_fpu_lwp sematics to save or discard the fpu state appropriately.
2004-04-17 08:47:15 +00:00
christos
a97d60211a fix undefined variable. 2004-03-29 21:43:28 +00:00
drochner
60cbbd8f70 use netbsd32_sigcode with COMPAT_16 only 2004-03-26 18:38:55 +00:00
drochner
d19f706361 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 17:34:18 +00:00
drochner
4f4ec7e627 regen after __HAVE_SIGINFO removal 2004-03-26 15:29:28 +00:00
drochner
9fd8e8983b all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 15:18:54 +00:00
drochner
4f5b1431f9 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 15:01:16 +00:00
drochner
20c83a3f1e while this is dead code appearently, define e_sigobject only
if sigcode/esigcode are useful, otherwise bad things will
happen in kern_exec.c:exec_sigcode_map()
(from code inspection, untested)
2004-03-25 16:54:10 +00:00
pooka
8b2eb5b87e Use PR_WAITOK instead of M_WAITOK for pool_get(). This is polite,
since M_WAITOK happens to be PR_NOWAIT.
2004-03-24 16:55:07 +00:00
atatat
19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
mrg
0275cc80b8 fix a (syscall args) comment. 2004-03-21 13:26:44 +00:00
he
545d50632e Remove local declaration of 'sg', since it is no longer used. 2004-03-11 10:14:10 +00:00
atatat
c2309bcca6 *Don't* call sys___sysctl() from within the kernel. Use old_sysctl()
instead.
2004-03-09 03:18:03 +00:00
atatat
0d4caad924 Remove useless comment about stuff that never happened. 2004-03-09 03:13:07 +00:00
atatat
bb33b98bad I obviously put this (__SYSCTL_PRIVATE) here, but I have no
recollection of what it was for and it's now just useless, so it goes.
2004-03-09 03:11:39 +00:00