etc/protocols - sync with NetBSD-8
[minix.git] / sys / ufs / lfs / ulfs_snapshot.c
blob7f7e5d13e52ceb5c4c9d692c3bde04a1765adbef
1 /* $NetBSD: ulfs_snapshot.c,v 1.2 2013/06/08 22:05:15 dholland Exp $ */
2 /* from ffs_snapshot.c,v 1.122 2013/05/07 09:40:54 hannken Exp */
4 /*
5 * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
7 * Further information about snapshots can be obtained from:
9 * Marshall Kirk McKusick http://www.mckusick.com/softdep/
10 * 1614 Oxford Street mckusick@mckusick.com
11 * Berkeley, CA 94709-1608 +1-510-843-9542
12 * USA
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
24 * THIS SOFTWARE IS PROVIDED BY MARSHALL KIRK MCKUSICK ``AS IS'' AND ANY
25 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL MARSHALL KIRK MCKUSICK BE LIABLE FOR
28 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
36 * @(#)ffs_snapshot.c 8.11 (McKusick) 7/23/00
38 * from FreeBSD: ffs_snapshot.c,v 1.79 2004/02/13 02:02:06 kuriyama Exp
41 #include <sys/cdefs.h>
42 __KERNEL_RCSID(0, "$NetBSD: ulfs_snapshot.c,v 1.2 2013/06/08 22:05:15 dholland Exp $");
44 #if defined(_KERNEL_OPT)
45 #include "opt_lfs.h"
46 #endif
48 #include <sys/param.h>
49 #include <sys/kernel.h>
50 #include <sys/systm.h>
51 #include <sys/conf.h>
52 #include <sys/buf.h>
53 #include <sys/proc.h>
54 #include <sys/namei.h>
55 #include <sys/sched.h>
56 #include <sys/stat.h>
57 #include <sys/malloc.h>
58 #include <sys/mount.h>
59 #include <sys/resource.h>
60 #include <sys/resourcevar.h>
61 #include <sys/vnode.h>
62 #include <sys/kauth.h>
63 #include <sys/fstrans.h>
64 #include <sys/wapbl.h>
66 #include <miscfs/specfs/specdev.h>
68 #include <ufs/lfs/ulfs_quotacommon.h>
69 #include <ufs/lfs/ulfsmount.h>
70 #include <ufs/lfs/ulfs_inode.h>
71 #include <ufs/lfs/ulfs_extern.h>
72 #include <ufs/lfs/ulfs_bswap.h>
74 #include <ufs/lfs/lfs.h>
75 #include <ufs/lfs/lfs_extern.h>
77 #include <uvm/uvm.h>
80 * Decrement extra reference on snapshot when last name is removed.
81 * It will not be freed until the last open reference goes away.
83 void
84 ulfs_snapgone(struct inode *ip)
86 (void)ip;
87 /* just panic */
88 panic("reached ulfs_snapgone\n");