17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5986fd29aSsetje * Common Development and Distribution License (the "License"). 6986fd29aSsetje * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22986fd29aSsetje * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 277c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate /* 307c478bd9Sstevel@tonic-gate * University Copyright- Copyright (c) 1982, 1986, 1988 317c478bd9Sstevel@tonic-gate * The Regents of the University of California 327c478bd9Sstevel@tonic-gate * All Rights Reserved 337c478bd9Sstevel@tonic-gate * 347c478bd9Sstevel@tonic-gate * University Acknowledgment- Portions of this document are derived from 357c478bd9Sstevel@tonic-gate * software developed by the University of California, Berkeley, and its 367c478bd9Sstevel@tonic-gate * contributors. 377c478bd9Sstevel@tonic-gate */ 387c478bd9Sstevel@tonic-gate 39*2bcf0248SMax Grossman /* 40*2bcf0248SMax Grossman * Copyright (c) 2013 by Delphix. All rights reserved. 41*2bcf0248SMax Grossman */ 42*2bcf0248SMax Grossman 437c478bd9Sstevel@tonic-gate #ifndef _SYS_FILIO_H 447c478bd9Sstevel@tonic-gate #define _SYS_FILIO_H 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate /* 477c478bd9Sstevel@tonic-gate * General file ioctl definitions. 487c478bd9Sstevel@tonic-gate */ 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate #include <sys/ioccom.h> 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gate #ifdef __cplusplus 537c478bd9Sstevel@tonic-gate extern "C" { 547c478bd9Sstevel@tonic-gate #endif 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate #define FIOCLEX _IO('f', 1) /* set exclusive use on fd */ 577c478bd9Sstevel@tonic-gate #define FIONCLEX _IO('f', 2) /* remove exclusive use */ 587c478bd9Sstevel@tonic-gate /* another local */ 597c478bd9Sstevel@tonic-gate #define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ 607c478bd9Sstevel@tonic-gate #define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ 617c478bd9Sstevel@tonic-gate #define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ 627c478bd9Sstevel@tonic-gate #define FIOSETOWN _IOW('f', 124, int) /* set owner */ 637c478bd9Sstevel@tonic-gate #define FIOGETOWN _IOR('f', 123, int) /* get owner */ 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate /* 667c478bd9Sstevel@tonic-gate * ioctl's for Online: DiskSuite. 677c478bd9Sstevel@tonic-gate * WARNING - the support for these ioctls may be withdrawn 687c478bd9Sstevel@tonic-gate * in future OS releases. 697c478bd9Sstevel@tonic-gate */ 707c478bd9Sstevel@tonic-gate #define _FIOLFS _IO('f', 64) /* file system lock */ 717c478bd9Sstevel@tonic-gate #define _FIOLFSS _IO('f', 65) /* file system lock status */ 727c478bd9Sstevel@tonic-gate #define _FIOFFS _IO('f', 66) /* file system flush */ 737c478bd9Sstevel@tonic-gate #define _FIOAI _FIOOBSOLETE67 /* get allocation info is */ 747c478bd9Sstevel@tonic-gate #define _FIOOBSOLETE67 _IO('f', 67) /* obsolete and unsupported */ 757c478bd9Sstevel@tonic-gate #define _FIOSATIME _IO('f', 68) /* set atime */ 767c478bd9Sstevel@tonic-gate #define _FIOSDIO _IO('f', 69) /* set delayed io */ 777c478bd9Sstevel@tonic-gate #define _FIOGDIO _IO('f', 70) /* get delayed io */ 787c478bd9Sstevel@tonic-gate #define _FIOIO _IO('f', 71) /* inode open */ 797c478bd9Sstevel@tonic-gate #define _FIOISLOG _IO('f', 72) /* disksuite/ufs protocol */ 807c478bd9Sstevel@tonic-gate #define _FIOISLOGOK _IO('f', 73) /* disksuite/ufs protocol */ 817c478bd9Sstevel@tonic-gate #define _FIOLOGRESET _IO('f', 74) /* disksuite/ufs protocol */ 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate /* 847c478bd9Sstevel@tonic-gate * Contract-private ioctl() 857c478bd9Sstevel@tonic-gate */ 867c478bd9Sstevel@tonic-gate #define _FIOISBUSY _IO('f', 75) /* networker/ufs protocol */ 877c478bd9Sstevel@tonic-gate #define _FIODIRECTIO _IO('f', 76) /* directio */ 887c478bd9Sstevel@tonic-gate #define _FIOTUNE _IO('f', 77) /* tuning */ 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate /* 917c478bd9Sstevel@tonic-gate * WARNING: These 'f' ioctls are also defined in sys/fs/cachefs_fs.h 927c478bd9Sstevel@tonic-gate * It currently defines 78-86. 937c478bd9Sstevel@tonic-gate */ 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate /* 967c478bd9Sstevel@tonic-gate * Internal Logging UFS 977c478bd9Sstevel@tonic-gate */ 987c478bd9Sstevel@tonic-gate #define _FIOLOGENABLE _IO('f', 87) /* logging/ufs protocol */ 997c478bd9Sstevel@tonic-gate #define _FIOLOGDISABLE _IO('f', 88) /* logging/ufs protocol */ 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate /* 1027c478bd9Sstevel@tonic-gate * File system snapshot ioctls (see sys/fs/ufs_snap.h) 1037c478bd9Sstevel@tonic-gate * (there is another snapshot ioctl, _FIOSNAPSHOTCREATE_MULTI, 1047c478bd9Sstevel@tonic-gate * defined farther down in this file.) 1057c478bd9Sstevel@tonic-gate */ 1067c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTCREATE _IO('f', 89) /* create a snapshot */ 1077c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTDELETE _IO('f', 90) /* delete a snapshot */ 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate /* 1107c478bd9Sstevel@tonic-gate * Return the current superblock of size SBSIZE 1117c478bd9Sstevel@tonic-gate */ 1127c478bd9Sstevel@tonic-gate #define _FIOGETSUPERBLOCK _IO('f', 91) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate /* 1157c478bd9Sstevel@tonic-gate * Contract private ioctl 1167c478bd9Sstevel@tonic-gate */ 1177c478bd9Sstevel@tonic-gate #define _FIOGETMAXPHYS _IO('f', 92) 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate /* 1207c478bd9Sstevel@tonic-gate * TSufs support 1217c478bd9Sstevel@tonic-gate */ 1227c478bd9Sstevel@tonic-gate #define _FIO_SET_LUFS_DEBUG _IO('f', 93) /* set lufs_debug */ 1237c478bd9Sstevel@tonic-gate #define _FIO_SET_LUFS_ERROR _IO('f', 94) /* set a lufs error */ 1247c478bd9Sstevel@tonic-gate #define _FIO_GET_TOP_STATS _IO('f', 95) /* get lufs tranaction stats */ 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gate /* 1277c478bd9Sstevel@tonic-gate * create a snapshot with multiple backing files 1287c478bd9Sstevel@tonic-gate */ 1297c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTCREATE_MULTI _IO('f', 96) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate /* 1327c478bd9Sstevel@tonic-gate * handle lseek SEEK_DATA and SEEK_HOLE for holey file knowledge 1337c478bd9Sstevel@tonic-gate */ 1347c478bd9Sstevel@tonic-gate #define _FIO_SEEK_DATA _IO('f', 97) /* SEEK_DATA */ 1357c478bd9Sstevel@tonic-gate #define _FIO_SEEK_HOLE _IO('f', 98) /* SEEK_HOLE */ 1367c478bd9Sstevel@tonic-gate 137986fd29aSsetje /* 138986fd29aSsetje * boot archive compression 139986fd29aSsetje */ 140986fd29aSsetje #define _FIO_COMPRESSED _IO('f', 99) /* mark file as compressed */ 141986fd29aSsetje 142*2bcf0248SMax Grossman /* 143*2bcf0248SMax Grossman * Expose fill information through ioctl 144*2bcf0248SMax Grossman */ 145*2bcf0248SMax Grossman #define _FIO_COUNT_FILLED _IO('f', 100) /* count holes in a file */ 146*2bcf0248SMax Grossman 1477c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1487c478bd9Sstevel@tonic-gate } 1497c478bd9Sstevel@tonic-gate #endif 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gate #endif /* _SYS_FILIO_H */ 152