target/ppc: Add support for scv and rfscv instructions
[qemu/ar7.git] / tools / virtiofsd / fuse_i.h
blob1240828208abc2a985e9b75de6bcc04efddb2ad8
1 /*
2 * FUSE: Filesystem in Userspace
3 * Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
5 * This program can be distributed under the terms of the GNU LGPLv2.
6 * See the file COPYING.LIB
7 */
9 #ifndef FUSE_I_H
10 #define FUSE_I_H
12 #define FUSE_USE_VERSION 31
13 #include "fuse_lowlevel.h"
15 struct fv_VuDev;
16 struct fv_QueueInfo;
18 struct fuse_req {
19 struct fuse_session *se;
20 uint64_t unique;
21 int ctr;
22 pthread_mutex_t lock;
23 struct fuse_ctx ctx;
24 struct fuse_chan *ch;
25 int interrupted;
26 unsigned int ioctl_64bit:1;
27 union {
28 struct {
29 uint64_t unique;
30 } i;
31 struct {
32 fuse_interrupt_func_t func;
33 void *data;
34 } ni;
35 } u;
36 struct fuse_req *next;
37 struct fuse_req *prev;
40 struct fuse_notify_req {
41 uint64_t unique;
42 void (*reply)(struct fuse_notify_req *, fuse_req_t, fuse_ino_t,
43 const void *, const struct fuse_buf *);
44 struct fuse_notify_req *next;
45 struct fuse_notify_req *prev;
48 struct fuse_session {
49 char *mountpoint;
50 volatile int exited;
51 int fd;
52 int debug;
53 int deny_others;
54 struct fuse_lowlevel_ops op;
55 int got_init;
56 struct cuse_data *cuse_data;
57 void *userdata;
58 uid_t owner;
59 struct fuse_conn_info conn;
60 struct fuse_req list;
61 struct fuse_req interrupts;
62 pthread_mutex_t lock;
63 pthread_rwlock_t init_rwlock;
64 int got_destroy;
65 int broken_splice_nonblock;
66 uint64_t notify_ctr;
67 struct fuse_notify_req notify_list;
68 size_t bufsize;
69 int error;
70 char *vu_socket_path;
71 int vu_listen_fd;
72 int vu_socketfd;
73 struct fv_VuDev *virtio_dev;
74 int thread_pool_size;
77 struct fuse_chan {
78 pthread_mutex_t lock;
79 int ctr;
80 int fd;
81 struct fv_QueueInfo *qi;
84 int fuse_send_reply_iov_nofree(fuse_req_t req, int error, struct iovec *iov,
85 int count);
86 void fuse_free_req(fuse_req_t req);
88 void fuse_session_process_buf_int(struct fuse_session *se,
89 struct fuse_bufvec *bufv,
90 struct fuse_chan *ch);
93 #define FUSE_MAX_MAX_PAGES 256
94 #define FUSE_DEFAULT_MAX_PAGES_PER_REQ 32
96 /* room needed in buffer to accommodate header */
97 #define FUSE_BUFFER_HEADER_SIZE 0x1000
99 #endif