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. 24*bd93c05dSAlexander Eremin * Copyright 2015 Nexenta Systems, Inc. All rights reserved. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 287c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate /* 317c478bd9Sstevel@tonic-gate * University Copyright- Copyright (c) 1982, 1986, 1988 327c478bd9Sstevel@tonic-gate * The Regents of the University of California 337c478bd9Sstevel@tonic-gate * All Rights Reserved 347c478bd9Sstevel@tonic-gate * 357c478bd9Sstevel@tonic-gate * University Acknowledgment- Portions of this document are derived from 367c478bd9Sstevel@tonic-gate * software developed by the University of California, Berkeley, and its 377c478bd9Sstevel@tonic-gate * contributors. 387c478bd9Sstevel@tonic-gate */ 397c478bd9Sstevel@tonic-gate 402bcf0248SMax Grossman /* 412bcf0248SMax Grossman * Copyright (c) 2013 by Delphix. All rights reserved. 422bcf0248SMax Grossman */ 432bcf0248SMax Grossman 447c478bd9Sstevel@tonic-gate #ifndef _SYS_FILIO_H 457c478bd9Sstevel@tonic-gate #define _SYS_FILIO_H 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate /* 487c478bd9Sstevel@tonic-gate * General file ioctl definitions. 497c478bd9Sstevel@tonic-gate */ 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate #include <sys/ioccom.h> 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate #ifdef __cplusplus 547c478bd9Sstevel@tonic-gate extern "C" { 557c478bd9Sstevel@tonic-gate #endif 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate #define FIOCLEX _IO('f', 1) /* set exclusive use on fd */ 587c478bd9Sstevel@tonic-gate #define FIONCLEX _IO('f', 2) /* remove exclusive use */ 597c478bd9Sstevel@tonic-gate /* another local */ 607c478bd9Sstevel@tonic-gate #define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ 617c478bd9Sstevel@tonic-gate #define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ 627c478bd9Sstevel@tonic-gate #define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ 637c478bd9Sstevel@tonic-gate #define FIOSETOWN _IOW('f', 124, int) /* set owner */ 647c478bd9Sstevel@tonic-gate #define FIOGETOWN _IOR('f', 123, int) /* get owner */ 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate /* 677c478bd9Sstevel@tonic-gate * ioctl's for Online: DiskSuite. 687c478bd9Sstevel@tonic-gate * WARNING - the support for these ioctls may be withdrawn 697c478bd9Sstevel@tonic-gate * in future OS releases. 707c478bd9Sstevel@tonic-gate */ 717c478bd9Sstevel@tonic-gate #define _FIOLFS _IO('f', 64) /* file system lock */ 727c478bd9Sstevel@tonic-gate #define _FIOLFSS _IO('f', 65) /* file system lock status */ 737c478bd9Sstevel@tonic-gate #define _FIOFFS _IO('f', 66) /* file system flush */ 747c478bd9Sstevel@tonic-gate #define _FIOAI _FIOOBSOLETE67 /* get allocation info is */ 757c478bd9Sstevel@tonic-gate #define _FIOOBSOLETE67 _IO('f', 67) /* obsolete and unsupported */ 767c478bd9Sstevel@tonic-gate #define _FIOSATIME _IO('f', 68) /* set atime */ 777c478bd9Sstevel@tonic-gate #define _FIOSDIO _IO('f', 69) /* set delayed io */ 787c478bd9Sstevel@tonic-gate #define _FIOGDIO _IO('f', 70) /* get delayed io */ 797c478bd9Sstevel@tonic-gate #define _FIOIO _IO('f', 71) /* inode open */ 807c478bd9Sstevel@tonic-gate #define _FIOISLOG _IO('f', 72) /* disksuite/ufs protocol */ 817c478bd9Sstevel@tonic-gate #define _FIOISLOGOK _IO('f', 73) /* disksuite/ufs protocol */ 827c478bd9Sstevel@tonic-gate #define _FIOLOGRESET _IO('f', 74) /* disksuite/ufs protocol */ 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate /* 857c478bd9Sstevel@tonic-gate * Contract-private ioctl() 867c478bd9Sstevel@tonic-gate */ 877c478bd9Sstevel@tonic-gate #define _FIOISBUSY _IO('f', 75) /* networker/ufs protocol */ 887c478bd9Sstevel@tonic-gate #define _FIODIRECTIO _IO('f', 76) /* directio */ 897c478bd9Sstevel@tonic-gate #define _FIOTUNE _IO('f', 77) /* tuning */ 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate /* 927c478bd9Sstevel@tonic-gate * Internal Logging UFS 937c478bd9Sstevel@tonic-gate */ 947c478bd9Sstevel@tonic-gate #define _FIOLOGENABLE _IO('f', 87) /* logging/ufs protocol */ 957c478bd9Sstevel@tonic-gate #define _FIOLOGDISABLE _IO('f', 88) /* logging/ufs protocol */ 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate /* 987c478bd9Sstevel@tonic-gate * File system snapshot ioctls (see sys/fs/ufs_snap.h) 997c478bd9Sstevel@tonic-gate * (there is another snapshot ioctl, _FIOSNAPSHOTCREATE_MULTI, 1007c478bd9Sstevel@tonic-gate * defined farther down in this file.) 1017c478bd9Sstevel@tonic-gate */ 1027c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTCREATE _IO('f', 89) /* create a snapshot */ 1037c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTDELETE _IO('f', 90) /* delete a snapshot */ 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate /* 1067c478bd9Sstevel@tonic-gate * Return the current superblock of size SBSIZE 1077c478bd9Sstevel@tonic-gate */ 1087c478bd9Sstevel@tonic-gate #define _FIOGETSUPERBLOCK _IO('f', 91) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate /* 1117c478bd9Sstevel@tonic-gate * Contract private ioctl 1127c478bd9Sstevel@tonic-gate */ 1137c478bd9Sstevel@tonic-gate #define _FIOGETMAXPHYS _IO('f', 92) 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate /* 1167c478bd9Sstevel@tonic-gate * TSufs support 1177c478bd9Sstevel@tonic-gate */ 1187c478bd9Sstevel@tonic-gate #define _FIO_SET_LUFS_DEBUG _IO('f', 93) /* set lufs_debug */ 1197c478bd9Sstevel@tonic-gate #define _FIO_SET_LUFS_ERROR _IO('f', 94) /* set a lufs error */ 1207c478bd9Sstevel@tonic-gate #define _FIO_GET_TOP_STATS _IO('f', 95) /* get lufs tranaction stats */ 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate /* 1237c478bd9Sstevel@tonic-gate * create a snapshot with multiple backing files 1247c478bd9Sstevel@tonic-gate */ 1257c478bd9Sstevel@tonic-gate #define _FIOSNAPSHOTCREATE_MULTI _IO('f', 96) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate /* 1287c478bd9Sstevel@tonic-gate * handle lseek SEEK_DATA and SEEK_HOLE for holey file knowledge 1297c478bd9Sstevel@tonic-gate */ 1307c478bd9Sstevel@tonic-gate #define _FIO_SEEK_DATA _IO('f', 97) /* SEEK_DATA */ 1317c478bd9Sstevel@tonic-gate #define _FIO_SEEK_HOLE _IO('f', 98) /* SEEK_HOLE */ 1327c478bd9Sstevel@tonic-gate 133986fd29aSsetje /* 134986fd29aSsetje * boot archive compression 135986fd29aSsetje */ 136986fd29aSsetje #define _FIO_COMPRESSED _IO('f', 99) /* mark file as compressed */ 137986fd29aSsetje 1382bcf0248SMax Grossman /* 1392bcf0248SMax Grossman * Expose fill information through ioctl 1402bcf0248SMax Grossman */ 1412bcf0248SMax Grossman #define _FIO_COUNT_FILLED _IO('f', 100) /* count holes in a file */ 1422bcf0248SMax Grossman 1437c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1447c478bd9Sstevel@tonic-gate } 1457c478bd9Sstevel@tonic-gate #endif 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate #endif /* _SYS_FILIO_H */ 148