abolish ino32_t
[unleashed.git] / include / sys / fs / ufs_filio.h
blob5126aa10bd6ae25687e8311c968048583671b97a
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 #ifndef _SYS_FS_UFS_FILIO_H
29 #define _SYS_FS_UFS_FILIO_H
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
36 * _FIOIO
38 * struct for _FIOIO ioctl():
39 * Input:
40 * fio_ino - inode number
41 * fio_gen - generation number
42 * Output:
43 * fio_fd - readonly file descriptor
47 struct fioio {
48 ino_t fio_ino; /* input : inode number */
49 int fio_gen; /* input : generation number */
50 int fio_fd; /* output: readonly file descriptor */
53 #if defined(_SYSCALL32)
55 struct fioio32 {
56 ino_t fio_ino; /* input : inode number */
57 int32_t fio_gen; /* input : generation number */
58 int32_t fio_fd; /* output: readonly file descriptor */
61 #endif /* _SYSCALL32 */
64 * _FIOTUNE
66 struct fiotune {
67 int maxcontig; /* cluster and directio size */
68 int rotdelay; /* skip blocks between contig allocations */
69 int maxbpg; /* currently defaults to 2048 */
70 int minfree; /* %age to reserve for root */
71 int optim; /* space or time */
75 * UFS Logging
77 typedef struct fiolog {
78 uint_t nbytes_requested;
79 uint_t nbytes_actual;
80 int error;
81 } fiolog_t;
83 #define FIOLOG_ENONE 0
84 #define FIOLOG_ETRANS 1
85 #define FIOLOG_EROFS 2
86 #define FIOLOG_EULOCK 3
87 #define FIOLOG_EWLOCK 4
88 #define FIOLOG_ECLEAN 5
89 #define FIOLOG_ENOULOCK 6
91 #if defined(_KERNEL)
93 extern int ufs_fiosatime(struct vnode *, struct timeval *, int,
94 struct cred *);
95 extern int ufs_fiosdio(struct vnode *, uint_t *, int flag, struct cred *);
96 extern int ufs_fiogdio(struct vnode *, uint_t *, int flag, struct cred *);
97 extern int ufs_fioio(struct vnode *, struct fioio *, int, struct cred *);
98 extern int ufs_fioisbusy(struct vnode *, int *, struct cred *);
99 extern int ufs_fiodirectio(struct vnode *, int, struct cred *);
100 extern int ufs_fiotune(struct vnode *, struct fiotune *, struct cred *);
101 extern int ufs_fiologenable(vnode_t *, fiolog_t *, cred_t *, int);
102 extern int ufs_fiologdisable(vnode_t *, fiolog_t *, cred_t *, int);
103 extern int ufs_fioislog(vnode_t *, uint32_t *, cred_t *, int);
104 extern int ufs_fio_holey(vnode_t *, int, offset_t *);
105 extern int ufs_mark_compressed(struct vnode *vp);
107 #endif /* defined(_KERNEL) */
109 #ifdef __cplusplus
111 #endif
113 #endif /* _SYS_FS_UFS_FILIO_H */