Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/avs/ns/dsw/dsw.c
+++ new/usr/src/uts/common/avs/ns/dsw/dsw.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 (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 #define _DSW_
27 27
28 28 #include <sys/types.h>
29 29 #include <sys/ksynch.h>
30 30 #include <sys/kmem.h>
31 31 #include <sys/errno.h>
32 32 #include <sys/conf.h>
33 33 #include <sys/cmn_err.h>
34 34 #include <sys/modctl.h>
35 35 #include <sys/cred.h>
36 36 #include <sys/file.h>
37 37 #include <sys/ddi.h>
38 38 #include <sys/unistat/spcs_s.h>
39 39 #include <sys/dkio.h>
40 40
41 41 #ifdef DS_DDICT
42 42 #include "../contract.h"
43 43 #endif
44 44
45 45 #include <sys/nsctl/nsctl.h>
46 46 #include <sys/nsctl/nsvers.h>
47 47
48 48 #include <sys/sdt.h> /* dtrace is S10 or later */
49 49
50 50 #include "dsw.h"
51 51 #include "dsw_dev.h"
52 52
53 53 #define DIDINIT 0x01
54 54 #define DIDNODES 0x02
55 55
56 56
57 57 static int iiopen(dev_t *devp, int flag, int otyp, cred_t *crp);
58 58 static int iiclose(dev_t dev, int flag, int otyp, cred_t *crp);
59 59 static int iiprint(dev_t dev, char *str);
60 60 static int iiioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *crp,
61 61 int *rvp);
62 62 static int iiprobe(dev_info_t *dip);
63 63 static int iiattach(dev_info_t *dip, ddi_attach_cmd_t cmd);
64 64 static int iidetach(dev_info_t *dip, ddi_detach_cmd_t cmd);
65 65 static int iistrat(struct buf *);
66 66 static int iiread();
67 67
68 68
69 69 static kstat_t *ii_gkstat = NULL;
70 70 iigkstat_t iigkstat = {
71 71 { "ii_debug", KSTAT_DATA_ULONG },
72 72 { "ii_bitmap", KSTAT_DATA_ULONG },
73 73 { "ii_throttle_unit", KSTAT_DATA_ULONG },
74 74 { "ii_throttle_delay", KSTAT_DATA_ULONG },
75 75 { "ii_copy_direct", KSTAT_DATA_ULONG },
76 76 { "num-sets", KSTAT_DATA_ULONG },
77 77 { "assoc-over", KSTAT_DATA_ULONG },
78 78 { "spilled-over", KSTAT_DATA_ULONG },
79 79 };
80 80
81 81 static struct cb_ops ii_cb_ops = {
82 82 iiopen,
83 83 iiclose,
84 84 iistrat, /* dummy strategy */
85 85 iiprint,
86 86 nodev, /* no dump */
87 87 iiread, /* dummy read */
88 88 nodev, /* no write */
89 89 iiioctl,
90 90 nodev, /* no devmap */
91 91 nodev, /* no mmap */
92 92 nodev, /* no segmap */
93 93 nochpoll,
94 94 ddi_prop_op,
95 95 NULL, /* not STREAMS */
96 96 D_NEW | D_MP
97 97 };
98 98
99 99 static struct dev_ops ii_ops = {
100 100 DEVO_REV,
101 101 0,
102 102 nodev, /* no getinfo */
103 103 nulldev,
104 104 iiprobe,
105 105 iiattach,
106 106 iidetach,
107 107 nodev, /* no reset */
108 108 &ii_cb_ops,
109 109 (struct bus_ops *)NULL
↓ open down ↓ |
109 lines elided |
↑ open up ↑ |
110 110 };
111 111
112 112 static struct modldrv ii_ldrv = {
113 113 &mod_driverops,
114 114 "nws:Point-in-Time:" ISS_VERSION_STR,
115 115 &ii_ops
116 116 };
117 117
118 118 static struct modlinkage ii_modlinkage = {
119 119 MODREV_1,
120 - &ii_ldrv,
121 - NULL
120 + { &ii_ldrv, NULL }
122 121 };
123 122
124 123 struct ii_state {
125 124 dev_info_t *dip;
126 125 int instance;
127 126 };
128 127
129 128 /* used for logging sysevent, gets set in _ii_attach */
130 129 dev_info_t *ii_dip = NULL;
131 130
132 131 extern _ii_info_t *_ii_info_top;
133 132 extern _ii_lsthead_t *_ii_cluster_top;
134 133 extern _ii_lsthead_t *_ii_group_top;
135 134 extern kmutex_t _ii_cluster_mutex;
136 135 extern kmutex_t _ii_group_mutex;
137 136
138 137 const int dsw_major_rev = ISS_VERSION_MAJ; /* Major release number */
139 138 const int dsw_minor_rev = ISS_VERSION_MIN; /* Minor release number */
140 139 const int dsw_micro_rev = ISS_VERSION_MIC; /* Micro release number */
141 140 const int dsw_baseline_rev = ISS_VERSION_NUM; /* Baseline revision */
142 141 static void *ii_statep;
143 142
144 143 extern int _ii_init_dev();
145 144 extern void _ii_deinit_dev();
146 145 extern int _ii_config(intptr_t arg, int ilp32, int *rvp, int iflags);
147 146 extern int _ii_disable(intptr_t arg, int ilp32, int *rvp);
148 147 extern int _ii_suspend(intptr_t arg, int ilp32, int *rvp);
149 148 extern int _ii_bitmap(intptr_t arg, int ilp32, int *rvp);
150 149 extern int _ii_segment(intptr_t arg, int ilp32, int *rvp);
151 150 extern int _ii_abort(intptr_t arg, int ilp32, int *rvp);
152 151 extern int _ii_acopy(intptr_t arg, int ilp32, int *rvp);
153 152 extern int _ii_copy(intptr_t arg, int ilp32, int *rvp);
154 153 extern int _ii_shutdown(intptr_t arg, int *rvp);
155 154 extern int _ii_stat(intptr_t arg, int ilp32, int *rvp);
156 155 extern int _ii_version(intptr_t arg, int ilp32, int *rvp);
157 156 extern int _ii_wait(intptr_t arg, int ilp32, int *rvp);
158 157 extern int _ii_reset(intptr_t arg, int ilp32, int *rvp);
159 158 extern int _ii_offline(intptr_t arg, int ilp32, int *rvp);
160 159 extern int _ii_list(intptr_t arg, int ilp32, int *rvp);
161 160 extern int _ii_listlen(int cmd, int ilp32, int *rvp);
162 161 extern int _ii_export(intptr_t arg, int ilp32, int *rvp);
163 162 extern int _ii_join(intptr_t arg, int ilp32, int *rvp);
164 163 extern int _ii_copyparm(intptr_t arg, int ilp32, int *rvp);
165 164 extern int _ii_ocreate(intptr_t arg, int ilp32, int *rvp);
166 165 extern int _ii_oattach(intptr_t arg, int ilp32, int *rvp);
167 166 extern int _ii_odetach(intptr_t arg, int ilp32, int *rvp);
168 167 extern int _ii_olist(intptr_t arg, int ilp32, int *rvp);
169 168 extern int _ii_ostat(intptr_t arg, int ilp32, int *rvp, int is_iost_2);
170 169 extern int _ii_bitsset(intptr_t arg, int ilp32, int cmd, int *rvp);
171 170 extern int _ii_gc_list(intptr_t, int, int *, kmutex_t *, _ii_lsthead_t *);
172 171 extern int _ii_clist(intptr_t arg, int ilp32, int *rvp);
173 172 extern int _ii_move_grp(intptr_t arg, int ilp32, int *rvp);
174 173 extern int _ii_change_tag(intptr_t arg, int ilp32, int *rvp);
175 174 extern int ii_debug;
176 175 extern int ii_throttle_unit;
177 176 extern int ii_throttle_delay;
178 177 extern int ii_copy_direct;
179 178 extern int ii_bitmap;
180 179
181 180 int
182 181 _init(void)
183 182 {
184 183 int error;
185 184
186 185 error = ddi_soft_state_init(&ii_statep, sizeof (struct ii_state), 1);
187 186 if (!error) {
188 187 error = mod_install(&ii_modlinkage);
189 188 if (error)
190 189 ddi_soft_state_fini(&ii_statep);
191 190 }
192 191
193 192 return (error);
194 193 }
195 194
196 195 int
197 196 _fini(void)
198 197 {
199 198 int error;
200 199
201 200 error = mod_remove(&ii_modlinkage);
202 201 if (!error)
203 202 ddi_soft_state_fini(&ii_statep);
204 203
205 204 return (error);
206 205 }
207 206
208 207 int
209 208 _info(struct modinfo *modinfop)
210 209 {
211 210 int rc;
212 211
213 212 rc = mod_info(&ii_modlinkage, modinfop);
214 213
215 214 return (rc);
216 215 }
217 216
218 217 /* ARGSUSED */
219 218
220 219 static int
221 220 iiprobe(dev_info_t *dip)
222 221 {
223 222 return (DDI_PROBE_SUCCESS);
224 223 }
225 224
226 225 /*ARGSUSED*/
227 226 static int
228 227 ii_stats_update(kstat_t *ksp, int rw)
229 228 {
230 229 if (KSTAT_WRITE == rw) {
231 230 return (EACCES);
232 231 }
233 232
234 233 /*
235 234 * We do nothing here for now -- the kstat structure is
236 235 * updated in-place
237 236 */
238 237
239 238 return (0);
240 239 }
241 240
242 241 static void
243 242 ii_create_kstats()
244 243 {
245 244 /* create global info structure */
246 245 if (!ii_gkstat) {
247 246 ii_gkstat = kstat_create("ii", 0, "global", "StorEdge",
248 247 KSTAT_TYPE_NAMED,
249 248 sizeof (iigkstat) / sizeof (kstat_named_t),
250 249 KSTAT_FLAG_VIRTUAL);
251 250 if (ii_gkstat) {
252 251 ii_gkstat->ks_data = &iigkstat;
253 252 ii_gkstat->ks_update = ii_stats_update;
254 253 ii_gkstat->ks_private = 0;
255 254 kstat_install(ii_gkstat);
256 255
257 256 /* fill in immutable values */
258 257 iigkstat.ii_debug.value.ul = ii_debug;
259 258 iigkstat.ii_bitmap.value.ul = ii_bitmap;
260 259 iigkstat.ii_throttle_unit.value.ul = ii_throttle_unit;
261 260 iigkstat.ii_throttle_delay.value.ul =
262 261 ii_throttle_delay;
263 262 iigkstat.ii_copy_direct.value.ul = ii_copy_direct;
264 263 } else {
265 264 cmn_err(CE_WARN, "!Unable to create II global stats");
266 265 }
267 266 }
268 267 }
269 268
270 269 static int
271 270 iiattach(dev_info_t *dip, ddi_attach_cmd_t cmd)
272 271 {
273 272 struct ii_state *xsp;
274 273 int instance;
275 274 int i;
276 275 intptr_t flags;
277 276
278 277 if (cmd != DDI_ATTACH) {
279 278 return (DDI_FAILURE);
280 279 }
281 280 /* save the dev_info_t to be used in logging using ddi_log_sysevent */
282 281 ii_dip = dip;
283 282
284 283 instance = ddi_get_instance(dip);
285 284 if (ddi_soft_state_zalloc(ii_statep, instance) != 0) {
286 285 cmn_err(CE_WARN, "!ii: no memory for instance %d state.",
287 286 instance);
288 287 return (DDI_FAILURE);
289 288 }
290 289
291 290 flags = 0;
292 291 xsp = ddi_get_soft_state(ii_statep, instance);
293 292 if (xsp == NULL) {
294 293 cmn_err(CE_WARN,
295 294 "!ii: attach: could not get state for instance %d.",
296 295 instance);
297 296 goto out;
298 297 }
299 298
300 299 ii_debug = ddi_prop_get_int(DDI_DEV_T_ANY, dip,
301 300 DDI_PROP_DONTPASS | DDI_PROP_NOTPROM, "ii_debug", 0);
302 301 if (ii_debug != 0) {
303 302 #ifdef DEBUG
304 303 cmn_err(CE_NOTE, "!ii: initializing ii version %d.%d.%d.%d",
305 304 dsw_major_rev, dsw_minor_rev,
306 305 dsw_micro_rev, dsw_baseline_rev);
307 306 #else
308 307 if (dsw_micro_rev) {
309 308 cmn_err(CE_NOTE, "!ii: initializing ii vers %d.%d.%d",
310 309 dsw_major_rev, dsw_minor_rev, dsw_micro_rev);
311 310 } else {
312 311 cmn_err(CE_NOTE, "!ii: initializing ii version %d.%d",
313 312 dsw_major_rev, dsw_minor_rev);
314 313 }
315 314 #endif
316 315 switch (ii_debug) {
317 316 case 1:
318 317 case 2: cmn_err(CE_NOTE,
319 318 "!ii: ii_debug=%d is enabled.", ii_debug);
320 319 break;
321 320 default:
322 321 cmn_err(CE_WARN,
323 322 "!ii: Value of ii_debug=%d is not 0,1 or 2.",
324 323 ii_debug);
325 324 }
326 325 }
327 326
328 327 ii_bitmap = ddi_prop_get_int(DDI_DEV_T_ANY, dip,
329 328 DDI_PROP_DONTPASS | DDI_PROP_NOTPROM, "ii_bitmap", II_WTHRU);
330 329 switch (ii_bitmap) {
331 330 case II_KMEM:
332 331 if (ii_debug > 0)
333 332 cmn_err(CE_NOTE, "!ii: ii_bitmap is in memory");
334 333 break;
335 334 case II_FWC:
336 335 if (ii_debug > 0)
337 336 cmn_err(CE_NOTE, "!ii: ii_bitmap is on disk,"
338 337 " no FWC");
339 338 break;
340 339 case II_WTHRU:
341 340 if (ii_debug > 0)
342 341 cmn_err(CE_NOTE, "!ii: ii_bitmap is on disk");
343 342 break;
344 343 default:
345 344 cmn_err(CE_NOTE,
346 345 "!ii: ii_bitmap=%d out of range; "
347 346 "defaulting WTHRU(%d)", ii_bitmap, II_WTHRU);
348 347 ii_bitmap = II_WTHRU;
349 348 }
350 349
351 350 /* pick up these values if in ii.conf, otherwise leave alone */
352 351 i = ddi_prop_get_int(DDI_DEV_T_ANY, dip,
353 352 DDI_PROP_DONTPASS | DDI_PROP_NOTPROM, "ii_throttle_unit", 0);
354 353 if (i > 0) {
355 354 ii_throttle_unit = i;
356 355 if ((ii_throttle_unit < MIN_THROTTLE_UNIT) ||
357 356 (ii_throttle_unit > MAX_THROTTLE_UNIT) ||
358 357 (ii_debug > 0))
359 358 cmn_err(CE_NOTE,
360 359 "!ii: ii_throttle_unit=%d", ii_throttle_unit);
361 360 }
362 361
363 362 i = ddi_prop_get_int(DDI_DEV_T_ANY, dip,
364 363 DDI_PROP_DONTPASS | DDI_PROP_NOTPROM, "ii_throttle_delay", 0);
365 364 if (i > 0) {
366 365 ii_throttle_delay = i;
367 366 if ((ii_throttle_delay < MIN_THROTTLE_DELAY) ||
368 367 (ii_throttle_delay > MIN_THROTTLE_DELAY) ||
369 368 (ii_debug > 0))
370 369 cmn_err(CE_NOTE,
371 370 "!ii: ii_throttle_delay=%d", ii_throttle_delay);
372 371 }
373 372
374 373 ii_copy_direct = ddi_prop_get_int(DDI_DEV_T_ANY, dip,
375 374 DDI_PROP_DONTPASS | DDI_PROP_NOTPROM, "ii_copy_direct", 1);
376 375 if (i > 0) {
377 376 ii_copy_direct = i;
378 377 if ((ii_copy_direct < 0) || (ii_copy_direct > 1))
379 378 cmn_err(CE_NOTE,
380 379 "!ii: ii_copy_direct=%d", ii_copy_direct);
381 380 }
382 381
383 382 if (_ii_init_dev()) {
384 383 cmn_err(CE_WARN, "!ii: _ii_init_dev failed");
385 384 goto out;
386 385 }
387 386 flags |= DIDINIT;
388 387
389 388 xsp->dip = dip;
390 389 xsp->instance = instance;
391 390
392 391 if (ddi_create_minor_node(dip, "ii", S_IFCHR, instance, DDI_PSEUDO, 0)
393 392 != DDI_SUCCESS) {
394 393 cmn_err(CE_WARN, "!ii: could not create node.");
395 394 goto out;
396 395 }
397 396 flags |= DIDNODES;
398 397
399 398 ddi_set_driver_private(dip, (caddr_t)flags);
400 399 ddi_report_dev(dip);
401 400
402 401 ii_create_kstats();
403 402
404 403 return (DDI_SUCCESS);
405 404
406 405 out:
407 406 ddi_set_driver_private(dip, (caddr_t)flags);
408 407 (void) iidetach(dip, DDI_DETACH);
409 408
410 409 return (DDI_FAILURE);
411 410 }
412 411
413 412 static int
414 413 iidetach(dev_info_t *dip, ddi_detach_cmd_t cmd)
415 414 {
416 415 struct ii_state *xsp;
417 416 int instance;
418 417 intptr_t flags;
419 418
420 419 if (cmd != DDI_DETACH) {
421 420 return (DDI_FAILURE);
422 421 }
423 422
424 423 if (_ii_info_top) {
425 424 return (DDI_FAILURE); /* busy */
426 425 }
427 426
428 427 instance = ddi_get_instance(dip);
429 428 xsp = ddi_get_soft_state(ii_statep, instance);
430 429 if (xsp == NULL) {
431 430 cmn_err(CE_WARN,
432 431 "!ii: detach: could not get state for instance %d.",
433 432 instance);
434 433 return (DDI_FAILURE);
435 434 }
436 435
437 436 flags = (intptr_t)ddi_get_driver_private(dip);
438 437 if (flags & DIDNODES)
439 438 ddi_remove_minor_node(dip, NULL);
440 439 if (flags & DIDINIT)
441 440 _ii_deinit_dev();
442 441
443 442 ddi_soft_state_free(ii_statep, instance);
444 443
445 444 if (ii_gkstat) {
446 445 kstat_delete(ii_gkstat);
447 446 ii_gkstat = NULL;
448 447 }
449 448
450 449 return (DDI_SUCCESS);
451 450 }
452 451
453 452
454 453 /* ARGSUSED */
455 454
456 455 static int
457 456 iiopen(dev_t *devp, int flag, int otyp, cred_t *crp)
458 457 {
459 458 int error;
460 459
461 460 error = drv_priv(crp);
462 461
463 462 return (error);
464 463 }
465 464
466 465
467 466 /* ARGSUSED */
468 467
469 468 static int
470 469 iiclose(dev_t dev, int flag, int otyp, cred_t *crp)
471 470 {
472 471 return (0);
473 472 }
474 473
475 474 /* ARGSUSED */
476 475
477 476 static int
478 477 iiprint(dev_t dev, char *str)
479 478 {
480 479 int instance = 0;
481 480
482 481 cmn_err(CE_WARN, "!ii%d: %s", instance, str);
483 482 return (0);
484 483 }
485 484
486 485 /* ARGSUSED */
487 486
488 487 static int
489 488 iiioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *crp, int *rvp)
490 489 {
491 490 int rc;
492 491 int ilp32;
493 492
494 493 ilp32 = (ddi_model_convert_from(mode & FMODELS) == DDI_MODEL_ILP32);
495 494
496 495
497 496 switch (cmd) {
498 497 case DSWIOC_WAIT:
499 498 rc = _ii_wait(arg, ilp32, rvp);
500 499 break;
501 500
502 501 case DSWIOC_RESET:
503 502 rc = _ii_reset(arg, ilp32, rvp);
504 503 break;
505 504
506 505 case DSWIOC_VERSION:
507 506 rc = _ii_version(arg, ilp32, rvp);
508 507 break;
509 508
510 509 case DSWIOC_ENABLE:
511 510 rc = _ii_config(arg, ilp32, rvp, 0);
512 511 break;
513 512
514 513 case DSWIOC_RESUME:
515 514 rc = _ii_config(arg, ilp32, rvp, II_EXISTING);
516 515 break;
517 516
518 517 case DSWIOC_DISABLE:
519 518 rc = _ii_disable(arg, ilp32, rvp);
520 519 break;
521 520
522 521 case DSWIOC_SUSPEND:
523 522 rc = _ii_suspend(arg, ilp32, rvp);
524 523 break;
525 524
526 525 case DSWIOC_ACOPY:
527 526 rc = _ii_acopy(arg, ilp32, rvp);
528 527 break;
529 528
530 529 case DSWIOC_COPY:
531 530 rc = _ii_copy(arg, ilp32, rvp);
532 531 break;
533 532
534 533 case DSWIOC_SHUTDOWN:
535 534 rc = _ii_shutdown(arg, rvp);
536 535 break;
537 536
538 537 case DSWIOC_STAT:
539 538 rc = _ii_stat(arg, ilp32, rvp);
540 539 break;
541 540
542 541 case DSWIOC_BITMAP:
543 542 rc = _ii_bitmap(arg, ilp32, rvp);
544 543 break;
545 544
546 545 case DSWIOC_SEGMENT:
547 546 rc = _ii_segment(arg, ilp32, rvp);
548 547 break;
549 548
550 549 case DSWIOC_ABORT:
551 550 rc = _ii_abort(arg, ilp32, rvp);
552 551 break;
553 552
554 553 case DSWIOC_OFFLINE:
555 554 rc = _ii_offline(arg, ilp32, rvp);
556 555 break;
557 556
558 557 case DSWIOC_LIST:
559 558 rc = _ii_list(arg, ilp32, rvp);
560 559 break;
561 560
562 561 case DSWIOC_LISTLEN:
563 562 case DSWIOC_OLISTLEN:
564 563 rc = _ii_listlen(cmd, ilp32, rvp);
565 564 break;
566 565
567 566 case DSWIOC_EXPORT:
568 567 rc = _ii_export(arg, ilp32, rvp);
569 568 break;
570 569
571 570 case DSWIOC_IMPORT:
572 571 rc = _ii_config(arg, ilp32, rvp, II_IMPORT);
573 572 break;
574 573
575 574 case DSWIOC_JOIN:
576 575 rc = _ii_join(arg, ilp32, rvp);
577 576 break;
578 577
579 578 case DSWIOC_COPYP:
580 579 rc = _ii_copyparm(arg, ilp32, rvp);
581 580 break;
582 581
583 582 case DSWIOC_OCREAT:
584 583 rc = _ii_ocreate(arg, ilp32, rvp);
585 584 break;
586 585
587 586 case DSWIOC_OATTACH:
588 587 rc = _ii_oattach(arg, ilp32, rvp);
589 588 break;
590 589
591 590 case DSWIOC_ODETACH:
592 591 rc = _ii_odetach(arg, ilp32, rvp);
593 592 break;
594 593
595 594 case DSWIOC_OLIST:
596 595 rc = _ii_olist(arg, ilp32, rvp);
597 596 break;
598 597
599 598 case DSWIOC_OSTAT:
600 599 rc = _ii_ostat(arg, ilp32, rvp, FALSE);
601 600 break;
602 601
603 602 case DSWIOC_OSTAT2:
604 603 rc = _ii_ostat(arg, ilp32, rvp, TRUE);
605 604 break;
606 605
607 606 case DSWIOC_SBITSSET:
608 607 case DSWIOC_CBITSSET:
609 608 rc = _ii_bitsset(arg, ilp32, cmd, rvp);
610 609 break;
611 610
612 611 case DSWIOC_CLIST:
613 612 rc = _ii_gc_list(arg, ilp32, rvp, &_ii_cluster_mutex,
614 613 _ii_cluster_top);
615 614 break;
616 615
617 616 case DSWIOC_GLIST:
618 617 rc = _ii_gc_list(arg, ilp32, rvp, &_ii_group_mutex,
619 618 _ii_group_top);
620 619 break;
621 620
622 621 case DSWIOC_MOVEGRP:
623 622 rc = _ii_move_grp(arg, ilp32, rvp);
624 623 break;
625 624
626 625 case DSWIOC_CHANGETAG:
627 626 rc = _ii_change_tag(arg, ilp32, rvp);
628 627 break;
629 628
630 629 default:
631 630 rc = EINVAL;
632 631 break;
633 632 }
634 633
635 634 return (rc);
636 635 }
637 636
638 637 /*
639 638 * dummy function
640 639 */
641 640
642 641 static int
643 642 iistrat(struct buf *bp)
644 643 {
645 644 bp->b_error = EIO;
646 645 biodone(bp);
647 646
648 647 return (0);
649 648 }
650 649
651 650 static int
652 651 iiread()
653 652 {
654 653 return (EIO);
655 654 }
↓ open down ↓ |
524 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX