usr/src/uts/common/fs/zfs/sys/zvol.h
author ahrens
Thu, 02 Aug 2007 21:23:46 -0700
changeset 4787 602d3f97842c
parent 4543 12bb2876a62e
child 6423 437422a29d3a
permissions -rw-r--r--
6393351 unique_* could be improved 6553348 assertion failed: ab->b_flags & (1 << 3) at line 2572 of arc.c 6582408 ::arc should accept -k/-m/-g to print in kilo/mega/giga-bytes 6582438 should have generic reader-priority rwlock for spa_config locks 6582441 zfs_cmd_t should only be used to pass arguments to/from userland 6582456 property code is overdue for some spring cleaning 6588564 zpl unmount lock should use regular rwlock
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
/*
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 2885
diff changeset
    23
 * Copyright 2007 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
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    38
#ifdef _KERNEL
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    39
extern int zvol_check_volsize(uint64_t volsize, uint64_t blocksize);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    40
extern int zvol_check_volblocksize(uint64_t volblocksize);
2885
c0259887ebbc 6460059 zfs destroy <snapshot> leaves behind kruft
ahrens
parents: 2676
diff changeset
    41
extern int zvol_get_stats(objset_t *os, nvlist_t *nv);
4543
12bb2876a62e PSARC/2006/465 ZFS Delegated Administration
marks
parents: 2885
diff changeset
    42
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
    43
extern int zvol_create_minor(const char *, major_t);
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    44
extern int zvol_remove_minor(const char *);
4787
602d3f97842c 6393351 unique_* could be improved
ahrens
parents: 4543
diff changeset
    45
extern int zvol_set_volsize(const char *, major_t, uint64_t);
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    46
extern int zvol_set_volblocksize(const char *, uint64_t);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    47
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    48
extern int zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    49
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
    50
extern int zvol_strategy(buf_t *bp);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    51
extern int zvol_read(dev_t dev, uio_t *uiop, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    52
extern int zvol_write(dev_t dev, uio_t *uiop, cred_t *cr);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    53
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
    54
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
    55
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
    56
    int *rvalp);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    57
extern int zvol_busy(void);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    58
extern void zvol_init(void);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    59
extern void zvol_fini(void);
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    60
#endif
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    61
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    62
#ifdef	__cplusplus
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents:
diff changeset
    63
}
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
#endif	/* _SYS_ZVOL_H */