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