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