Deleted Added
full compact
nfs_fha.h (302408) nfs_fha.h (322137)
1/*-
2 * Copyright (c) 2008 Isilon Inc http://www.isilon.com/
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
1/*-
2 * Copyright (c) 2008 Isilon Inc http://www.isilon.com/
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25/* $FreeBSD: stable/11/sys/nfs/nfs_fha.h 260097 2013-12-30 20:23:15Z mav $ */
25/* $FreeBSD: stable/11/sys/nfs/nfs_fha.h 322137 2017-08-07 07:02:51Z mav $ */
26
27#ifndef _NFS_FHA_H
28#define _NFS_FHA_H 1
29
30#ifdef _KERNEL
31
32/* Sysctl defaults. */
33#define FHA_DEF_ENABLE 1
26
27#ifndef _NFS_FHA_H
28#define _NFS_FHA_H 1
29
30#ifdef _KERNEL
31
32/* Sysctl defaults. */
33#define FHA_DEF_ENABLE 1
34#define FHA_DEF_READ 1
35#define FHA_DEF_WRITE 1
34#define FHA_DEF_BIN_SHIFT 22 /* 4MB */
35#define FHA_DEF_MAX_NFSDS_PER_FH 8
36#define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */
37
38#define FHA_HASH_SIZE 251
39
40struct fha_ctls {
41 int enable;
36#define FHA_DEF_BIN_SHIFT 22 /* 4MB */
37#define FHA_DEF_MAX_NFSDS_PER_FH 8
38#define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */
39
40#define FHA_HASH_SIZE 251
41
42struct fha_ctls {
43 int enable;
44 int read;
45 int write;
42 uint32_t bin_shift;
43 uint32_t max_nfsds_per_fh;
44 uint32_t max_reqs_per_nfsd;
45};
46
47/*
48 * These are the entries in the filehandle hash. They talk about a specific
49 * file, requests against which are being handled by one or more nfsds. We

--- 24 unchanged lines hidden (view full) ---

74 struct mtx mtx;
75};
76
77/* A structure used for passing around data internally. */
78struct fha_info {
79 u_int64_t fh;
80 off_t offset;
81 int locktype;
46 uint32_t bin_shift;
47 uint32_t max_nfsds_per_fh;
48 uint32_t max_reqs_per_nfsd;
49};
50
51/*
52 * These are the entries in the filehandle hash. They talk about a specific
53 * file, requests against which are being handled by one or more nfsds. We

--- 24 unchanged lines hidden (view full) ---

78 struct mtx mtx;
79};
80
81/* A structure used for passing around data internally. */
82struct fha_info {
83 u_int64_t fh;
84 off_t offset;
85 int locktype;
86 int read;
87 int write;
82};
83
84struct fha_callbacks {
85 rpcproc_t (*get_procnum)(rpcproc_t procnum);
86 int (*realign)(struct mbuf **mb, int malloc_flags);
87 int (*get_fh)(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos);
88 int (*is_read)(rpcproc_t procnum);
89 int (*is_write)(rpcproc_t procnum);

--- 25 unchanged lines hidden ---
88};
89
90struct fha_callbacks {
91 rpcproc_t (*get_procnum)(rpcproc_t procnum);
92 int (*realign)(struct mbuf **mb, int malloc_flags);
93 int (*get_fh)(uint64_t *fh, int v3, struct mbuf **md, caddr_t *dpos);
94 int (*is_read)(rpcproc_t procnum);
95 int (*is_write)(rpcproc_t procnum);

--- 25 unchanged lines hidden ---