block_if.h (282922) | block_if.h (283168) |
---|---|
1/*- 2 * Copyright (c) 2013 Peter Grehan <grehan@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2013 Peter Grehan <grehan@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/bhyve/block_if.h 282922 2015-05-14 21:08:48Z grehan $ | 26 * $FreeBSD: head/usr.sbin/bhyve/block_if.h 283168 2015-05-21 04:19:22Z grehan $ |
27 */ 28 29/* 30 * The block API to be used by bhyve block-device emulations. The routines 31 * are thread safe, with no assumptions about the context of the completion 32 * callback - it may occur in the caller's context, or asynchronously in 33 * another thread. 34 */ 35 36#ifndef _BLOCK_IF_H_ 37#define _BLOCK_IF_H_ 38 39#include <sys/uio.h> 40#include <sys/unistd.h> 41 | 27 */ 28 29/* 30 * The block API to be used by bhyve block-device emulations. The routines 31 * are thread safe, with no assumptions about the context of the completion 32 * callback - it may occur in the caller's context, or asynchronously in 33 * another thread. 34 */ 35 36#ifndef _BLOCK_IF_H_ 37#define _BLOCK_IF_H_ 38 39#include <sys/uio.h> 40#include <sys/unistd.h> 41 |
42#define BLOCKIF_IOV_MAX 67 /* not practical to be IOV_MAX */ | 42#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ |
43 44struct blockif_req { 45 struct iovec br_iov[BLOCKIF_IOV_MAX]; 46 int br_iovcnt; 47 off_t br_offset; 48 ssize_t br_resid; 49 void (*br_callback)(struct blockif_req *req, int err); 50 void *br_param; --- 20 unchanged lines hidden --- | 43 44struct blockif_req { 45 struct iovec br_iov[BLOCKIF_IOV_MAX]; 46 int br_iovcnt; 47 off_t br_offset; 48 ssize_t br_resid; 49 void (*br_callback)(struct blockif_req *req, int err); 50 void *br_param; --- 20 unchanged lines hidden --- |