annotate usr/src/uts/common/fs/zfs/sys/zvol.h @ 6423:437422a29d3a

PSARC 2006/370 ZFS Boot Support 5008936 ZFS and/or zvol should support dumps 5070124 dumpadm -d /dev/... does not enforce block device requirement for savecore 6521468 ZFS Boot support Phase 2 6553503 bfu can't find 'rootdev' from /etc/vfstab on a zfs root filesystem 6574993 zfs_mountroot() may need to call clkset() to set the boot_time kstat 6633197 zvol should not permit newfs or createpool while it's in use by swap or dump 6661127 zfs_name_valid() does not support ZFS_TYPE_POOL 6684121 The changes to smf scripts for supporting canmount=noauto will cause a boot failure.
author gw25295
date Fri, 11 Apr 2008 18:36:28 -0700
parents 602d3f97842c
children dc03f981ea18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
1 /*
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
2 * CDDL HEADER START
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
3 *
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
4 * The contents of this file are subject to the terms of the
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
5 * Common Development and Distribution License (the "License").
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
6 * You may not use this file except in compliance with the License.
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
7 *
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
9 * or http://www.opensolaris.org/os/licensing.
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
10 * See the License for the specific language governing permissions
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
11 * and limitations under the License.
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
12 *
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
13 * When distributing Covered Code, include this CDDL HEADER in each
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
15 * If applicable, add the following below this CDDL HEADER, with the
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
16 * fields enclosed by brackets "[]" replaced with your own identifying
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
17 * information: Portions Copyright [yyyy] [name of copyright owner]
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
18 *
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
19 * CDDL HEADER END
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
20 */
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
21
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
22 /*
6423
437422a29d3a PSARC 2006/370 ZFS Boot Support
gw25295
parents: 4787
diff changeset
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
24 * Use is subject to license terms.
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
25 */
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
26
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
27 #ifndef _SYS_ZVOL_H
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
28 #define _SYS_ZVOL_H
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
29
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
30 #pragma ident "%Z%%M% %I% %E% SMI"
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
31
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
32 #include <sys/zfs_context.h>
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
33
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
34 #ifdef __cplusplus
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
35 extern "C" {
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
36 #endif
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
37
6423
437422a29d3a PSARC 2006/370 ZFS Boot Support
gw25295
parents: 4787
diff changeset
38 #define ZVOL_OBJ 1ULL
437422a29d3a PSARC 2006/370 ZFS Boot Support
gw25295
parents: 4787
diff changeset
39 #define ZVOL_ZAP_OBJ 2ULL
437422a29d3a PSARC 2006/370 ZFS Boot Support
gw25295
parents: 4787
diff changeset
40
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
41 #ifdef _KERNEL
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
42 extern int zvol_check_volsize(uint64_t volsize, uint64_t blocksize);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
43 extern int zvol_check_volblocksize(uint64_t volblocksize);
2885
c0259887ebbc 6460059 zfs destroy <snapshot> leaves behind kruft
ahrens
parents: 2676
diff changeset
44 extern int zvol_get_stats(objset_t *os, nvlist_t *nv);
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 2885
diff changeset
45 extern void zvol_create_cb(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx);
4787
602d3f97842c 6393351 unique_* could be improved
ahrens
parents: 4543
diff changeset
46 extern int zvol_create_minor(const char *, major_t);
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
47 extern int zvol_remove_minor(const char *);
4787
602d3f97842c 6393351 unique_* could be improved
ahrens
parents: 4543
diff changeset
48 extern int zvol_set_volsize(const char *, major_t, uint64_t);
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
49 extern int zvol_set_volblocksize(const char *, uint64_t);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
50
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
51 extern int zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr);
6423
437422a29d3a PSARC 2006/370 ZFS Boot Support
gw25295
parents: 4787
diff changeset
52 extern int zvol_dump(dev_t dev, caddr_t addr, daddr_t offset, int nblocks);
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
53 extern int zvol_close(dev_t dev, int flag, int otyp, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
54 extern int zvol_strategy(buf_t *bp);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
55 extern int zvol_read(dev_t dev, uio_t *uiop, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
56 extern int zvol_write(dev_t dev, uio_t *uiop, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
57 extern int zvol_aread(dev_t dev, struct aio_req *aio, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
58 extern int zvol_awrite(dev_t dev, struct aio_req *aio, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
59 extern int zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr,
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
60 int *rvalp);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
61 extern int zvol_busy(void);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
62 extern void zvol_init(void);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
63 extern void zvol_fini(void);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
64 #endif
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
65
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
66 #ifdef __cplusplus
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
67 }
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
68 #endif
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
69
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
70 #endif /* _SYS_ZVOL_H */