1*168fce73SSepherosa Ziehau /*- 2*168fce73SSepherosa Ziehau * Copyright (c) 2016 Microsoft Corp. 3*168fce73SSepherosa Ziehau * All rights reserved. 4*168fce73SSepherosa Ziehau * 5*168fce73SSepherosa Ziehau * Redistribution and use in source and binary forms, with or without 6*168fce73SSepherosa Ziehau * modification, are permitted provided that the following conditions 7*168fce73SSepherosa Ziehau * are met: 8*168fce73SSepherosa Ziehau * 1. Redistributions of source code must retain the above copyright 9*168fce73SSepherosa Ziehau * notice unmodified, this list of conditions, and the following 10*168fce73SSepherosa Ziehau * disclaimer. 11*168fce73SSepherosa Ziehau * 2. Redistributions in binary form must reproduce the above copyright 12*168fce73SSepherosa Ziehau * notice, this list of conditions and the following disclaimer in the 13*168fce73SSepherosa Ziehau * documentation and/or other materials provided with the distribution. 14*168fce73SSepherosa Ziehau * 15*168fce73SSepherosa Ziehau * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16*168fce73SSepherosa Ziehau * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17*168fce73SSepherosa Ziehau * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18*168fce73SSepherosa Ziehau * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19*168fce73SSepherosa Ziehau * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20*168fce73SSepherosa Ziehau * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*168fce73SSepherosa Ziehau * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*168fce73SSepherosa Ziehau * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*168fce73SSepherosa Ziehau * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24*168fce73SSepherosa Ziehau * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*168fce73SSepherosa Ziehau */ 26*168fce73SSepherosa Ziehau 27*168fce73SSepherosa Ziehau #ifndef _VSS_H 28*168fce73SSepherosa Ziehau #define _VSS_H 29*168fce73SSepherosa Ziehau #include <sys/ioccom.h> 30*168fce73SSepherosa Ziehau #define FS_VSS_DEV_NAME "hv_fsvss_dev" 31*168fce73SSepherosa Ziehau #define APP_VSS_DEV_NAME "hv_appvss_dev" 32*168fce73SSepherosa Ziehau 33*168fce73SSepherosa Ziehau #define VSS_DEV(VSS) "/dev/"VSS 34*168fce73SSepherosa Ziehau 35*168fce73SSepherosa Ziehau #define VSS_SUCCESS 0x00000000 36*168fce73SSepherosa Ziehau #define VSS_FAIL 0x00000001 37*168fce73SSepherosa Ziehau 38*168fce73SSepherosa Ziehau enum hv_vss_op_t { 39*168fce73SSepherosa Ziehau HV_VSS_NONE = 0, 40*168fce73SSepherosa Ziehau HV_VSS_CHECK, 41*168fce73SSepherosa Ziehau HV_VSS_FREEZE, 42*168fce73SSepherosa Ziehau HV_VSS_THAW, 43*168fce73SSepherosa Ziehau HV_VSS_COUNT 44*168fce73SSepherosa Ziehau }; 45*168fce73SSepherosa Ziehau 46*168fce73SSepherosa Ziehau struct hv_vss_opt_msg { 47*168fce73SSepherosa Ziehau uint32_t opt; /* operation */ 48*168fce73SSepherosa Ziehau uint32_t status; /* 0 for success, 1 for error */ 49*168fce73SSepherosa Ziehau uint64_t msgid; /* an ID used to identify the transaction */ 50*168fce73SSepherosa Ziehau uint8_t reserved[48]; /* reserved values are all zeroes */ 51*168fce73SSepherosa Ziehau }; 52*168fce73SSepherosa Ziehau #define IOCHVVSSREAD _IOR('v', 2, struct hv_vss_opt_msg) 53*168fce73SSepherosa Ziehau #define IOCHVVSSWRITE _IOW('v', 3, struct hv_vss_opt_msg) 54*168fce73SSepherosa Ziehau #endif 55