Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/io/fssnap_if.c
+++ new/usr/src/uts/common/io/fssnap_if.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 -#pragma ident "%Z%%M% %I% %E% SMI"
28 -
29 27 /*
30 28 * This file contains interface definitions and wrappers for file
31 29 * system snapshot support. File systems may depend on this module
32 30 * for symbol resolution while the implementation may remain unloaded
33 31 * until needed.
34 32 */
35 33 #include <sys/types.h>
36 34 #include <sys/debug.h>
37 35 #include <sys/t_lock.h>
38 36 #include <sys/param.h>
39 37 #include <sys/mman.h>
40 38 #include <sys/systm.h>
41 39 #include <sys/errno.h>
42 40 #include <sys/kmem.h>
43 41 #include <sys/cmn_err.h>
44 42 #include <sys/vnode.h>
45 43 #include <sys/debug.h>
46 44 #include <sys/proc.h>
47 45 #include <sys/user.h>
48 46 #include <sys/conf.h>
49 47 #include <sys/modctl.h>
50 48 #include <sys/fssnap_if.h>
51 49
52 50 struct fssnap_operations snapops = {
53 51 NULL, /* fssnap_create */
54 52 NULL, /* fssnap_set_candidate */
55 53 NULL, /* fssnap_is_candidate */
56 54 NULL, /* fssnap_create_done */
57 55 NULL, /* fssnap_delete */
58 56 NULL /* fssnap_strategy */
59 57 };
60 58
61 59 void *
62 60 fssnap_create(chunknumber_t nchunks, uint_t chunksz, u_offset_t maxsize,
63 61 struct vnode *fsvp, int backfilecount, struct vnode **bfvpp, char *backpath,
64 62 u_offset_t max_backfile_size)
65 63 {
66 64 void *snapid = NULL;
67 65
68 66 if (snapops.fssnap_create)
69 67 snapid = (snapops.fssnap_create)(nchunks, chunksz, maxsize,
70 68 fsvp, backfilecount, bfvpp, backpath, max_backfile_size);
71 69
72 70 return (snapid);
73 71 }
74 72
75 73 void
76 74 fssnap_set_candidate(void *snapshot_id, chunknumber_t chunknumber)
77 75 {
78 76 if (snapops.fssnap_set_candidate)
79 77 (snapops.fssnap_set_candidate)(snapshot_id, chunknumber);
80 78 }
81 79
82 80 int
83 81 fssnap_is_candidate(void *snapshot_id, u_offset_t off)
84 82 {
85 83 int rc = 0;
86 84
87 85 if (snapops.fssnap_is_candidate)
88 86 rc = (snapops.fssnap_is_candidate)(snapshot_id, off);
89 87
90 88 return (rc);
91 89 }
92 90
93 91 int
94 92 fssnap_create_done(void *snapshot_id)
95 93 {
96 94 int snapslot = -1;
97 95
98 96 if (snapops.fssnap_create_done)
99 97 snapslot = (snapops.fssnap_create_done)(snapshot_id);
100 98
101 99 return (snapslot);
102 100 }
103 101
104 102 int
105 103 fssnap_delete(void *snapshot_id)
106 104 {
107 105 int snapslot = -1;
108 106
109 107 if (snapops.fssnap_delete)
110 108 snapslot = (snapops.fssnap_delete)(snapshot_id);
111 109
112 110 return (snapslot);
113 111 }
114 112
115 113 void
116 114 fssnap_strategy(void *snapshot_id, struct buf *bp)
117 115 {
118 116 if (snapops.fssnap_strategy)
119 117 (snapops.fssnap_strategy)(snapshot_id, bp);
120 118 }
121 119
↓ open down ↓ |
83 lines elided |
↑ open up ↑ |
122 120
123 121 #include <sys/modctl.h>
124 122
125 123 extern struct mod_ops mod_miscops;
126 124
127 125 static struct modlmisc modlmisc = {
128 126 &mod_miscops, "File System Snapshot Interface",
129 127 };
130 128
131 129 static struct modlinkage modlinkage = {
132 - MODREV_1, (void *)&modlmisc, NULL
130 + MODREV_1, { (void *)&modlmisc, NULL }
133 131 };
134 132
135 133 int
136 134 _init(void)
137 135 {
138 136 return (mod_install(&modlinkage));
139 137 }
140 138
141 139 /*
142 140 * Unloading is MT-safe because our client drivers use
143 141 * the _depends_on[] mechanism - we won't go while they're
144 142 * still around.
145 143 */
146 144 int
147 145 _fini(void)
148 146 {
149 147 return (mod_remove(&modlinkage));
150 148 }
151 149
152 150 int
153 151 _info(struct modinfo *modinfop)
154 152 {
155 153 return (mod_info(&modlinkage, modinfop));
156 154 }
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX