2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 2007-2009 Google Inc. and Amit Singh
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following disclaimer
15 * in the documentation and/or other materials provided with the
17 * * Neither the name of Google Inc. nor the names of its
18 * contributors may be used to endorse or promote products derived from
19 * this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 * Copyright (C) 2005 Csaba Henk.
34 * All rights reserved.
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
39 * 1. Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 * 2. Redistributions in binary form must reproduce the above copyright
42 * notice, this list of conditions and the following disclaimer in the
43 * documentation and/or other materials provided with the distribution.
45 * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
46 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48 * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
49 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 #include <sys/cdefs.h>
59 __FBSDID("$FreeBSD$");
61 #include <sys/types.h>
62 #include <sys/module.h>
63 #include <sys/systm.h>
64 #include <sys/errno.h>
65 #include <sys/param.h>
66 #include <sys/kernel.h>
69 #include <sys/malloc.h>
70 #include <sys/queue.h>
73 #include <sys/mutex.h>
75 #include <sys/mount.h>
76 #include <sys/vnode.h>
77 #include <sys/signalvar.h>
78 #include <sys/syscallsubr.h>
79 #include <sys/sysctl.h>
83 #include "fuse_node.h"
85 #include "fuse_internal.h"
87 #define FUSE_DEBUG_MODULE IPC
88 #include "fuse_debug.h"
90 static struct fuse_ticket *fticket_alloc(struct fuse_data *data);
91 static void fticket_refresh(struct fuse_ticket *ftick);
92 static void fticket_destroy(struct fuse_ticket *ftick);
93 static int fticket_wait_answer(struct fuse_ticket *ftick);
95 fticket_aw_pull_uio(struct fuse_ticket *ftick,
98 static int fuse_body_audit(struct fuse_ticket *ftick, size_t blen);
99 static __inline__ void
100 fuse_setup_ihead(struct fuse_in_header *ihead,
101 struct fuse_ticket *ftick,
108 static fuse_handler_t fuse_standard_handler;
110 SYSCTL_NODE(_vfs, OID_AUTO, fuse, CTLFLAG_RW, 0, "FUSE tunables");
111 SYSCTL_STRING(_vfs_fuse, OID_AUTO, version, CTLFLAG_RD,
112 FUSE_FREEBSD_VERSION, 0, "fuse-freebsd version");
113 static int fuse_ticket_count = 0;
115 SYSCTL_INT(_vfs_fuse, OID_AUTO, ticket_count, CTLFLAG_RW,
116 &fuse_ticket_count, 0, "number of allocated tickets");
117 static long fuse_iov_permanent_bufsize = 1 << 19;
119 SYSCTL_LONG(_vfs_fuse, OID_AUTO, iov_permanent_bufsize, CTLFLAG_RW,
120 &fuse_iov_permanent_bufsize, 0,
121 "limit for permanently stored buffer size for fuse_iovs");
122 static int fuse_iov_credit = 16;
124 SYSCTL_INT(_vfs_fuse, OID_AUTO, iov_credit, CTLFLAG_RW,
126 "how many times is an oversized fuse_iov tolerated");
128 MALLOC_DEFINE(M_FUSEMSG, "fuse_msgbuf", "fuse message buffer");
129 static uma_zone_t ticket_zone;
132 fuse_block_sigs(sigset_t *oldset)
137 SIGDELSET(newset, SIGKILL);
138 if (kern_sigprocmask(curthread, SIG_BLOCK, &newset, oldset, 0))
139 panic("%s: Invalid operation for kern_sigprocmask()",
144 fuse_restore_sigs(sigset_t *oldset)
147 if (kern_sigprocmask(curthread, SIG_SETMASK, oldset, NULL, 0))
148 panic("%s: Invalid operation for kern_sigprocmask()",
153 fiov_init(struct fuse_iov *fiov, size_t size)
155 uint32_t msize = FU_AT_LEAST(size);
157 debug_printf("fiov=%p, size=%zd\n", fiov, size);
161 fiov->base = malloc(msize, M_FUSEMSG, M_WAITOK | M_ZERO);
163 fiov->allocated_size = msize;
164 fiov->credit = fuse_iov_credit;
168 fiov_teardown(struct fuse_iov *fiov)
170 debug_printf("fiov=%p\n", fiov);
172 MPASS(fiov->base != NULL);
173 free(fiov->base, M_FUSEMSG);
177 fiov_adjust(struct fuse_iov *fiov, size_t size)
179 debug_printf("fiov=%p, size=%zd\n", fiov, size);
181 if (fiov->allocated_size < size ||
182 (fuse_iov_permanent_bufsize >= 0 &&
183 fiov->allocated_size - size > fuse_iov_permanent_bufsize &&
184 --fiov->credit < 0)) {
186 fiov->base = realloc(fiov->base, FU_AT_LEAST(size), M_FUSEMSG,
189 panic("FUSE: realloc failed");
191 fiov->allocated_size = FU_AT_LEAST(size);
192 fiov->credit = fuse_iov_credit;
198 fiov_refresh(struct fuse_iov *fiov)
200 debug_printf("fiov=%p\n", fiov);
202 bzero(fiov->base, fiov->len);
203 fiov_adjust(fiov, 0);
207 fticket_ctor(void *mem, int size, void *arg, int flags)
209 struct fuse_ticket *ftick = mem;
210 struct fuse_data *data = arg;
212 debug_printf("ftick=%p data=%p\n", ftick, data);
214 FUSE_ASSERT_MS_DONE(ftick);
215 FUSE_ASSERT_AW_DONE(ftick);
217 ftick->tk_data = data;
219 if (ftick->tk_unique != 0)
220 fticket_refresh(ftick);
222 /* May be truncated to 32 bits */
223 ftick->tk_unique = atomic_fetchadd_long(&data->ticketer, 1);
224 if (ftick->tk_unique == 0)
225 ftick->tk_unique = atomic_fetchadd_long(&data->ticketer, 1);
227 refcount_init(&ftick->tk_refcount, 1);
228 atomic_add_acq_int(&fuse_ticket_count, 1);
234 fticket_dtor(void *mem, int size, void *arg)
236 struct fuse_ticket *ftick = mem;
238 debug_printf("ftick=%p\n", ftick);
240 FUSE_ASSERT_MS_DONE(ftick);
241 FUSE_ASSERT_AW_DONE(ftick);
243 atomic_subtract_acq_int(&fuse_ticket_count, 1);
247 fticket_init(void *mem, int size, int flags)
249 struct fuse_ticket *ftick = mem;
251 FS_DEBUG("ftick=%p\n", ftick);
253 bzero(ftick, sizeof(struct fuse_ticket));
255 fiov_init(&ftick->tk_ms_fiov, sizeof(struct fuse_in_header));
256 ftick->tk_ms_type = FT_M_FIOV;
258 mtx_init(&ftick->tk_aw_mtx, "fuse answer delivery mutex", NULL, MTX_DEF);
259 fiov_init(&ftick->tk_aw_fiov, 0);
260 ftick->tk_aw_type = FT_A_FIOV;
266 fticket_fini(void *mem, int size)
268 struct fuse_ticket *ftick = mem;
270 FS_DEBUG("ftick=%p\n", ftick);
272 fiov_teardown(&ftick->tk_ms_fiov);
273 fiov_teardown(&ftick->tk_aw_fiov);
274 mtx_destroy(&ftick->tk_aw_mtx);
277 static __inline struct fuse_ticket *
278 fticket_alloc(struct fuse_data *data)
280 return uma_zalloc_arg(ticket_zone, data, M_WAITOK);
284 fticket_destroy(struct fuse_ticket *ftick)
286 return uma_zfree(ticket_zone, ftick);
291 fticket_refresh(struct fuse_ticket *ftick)
293 debug_printf("ftick=%p\n", ftick);
295 FUSE_ASSERT_MS_DONE(ftick);
296 FUSE_ASSERT_AW_DONE(ftick);
298 fiov_refresh(&ftick->tk_ms_fiov);
299 ftick->tk_ms_bufdata = NULL;
300 ftick->tk_ms_bufsize = 0;
301 ftick->tk_ms_type = FT_M_FIOV;
303 bzero(&ftick->tk_aw_ohead, sizeof(struct fuse_out_header));
305 fiov_refresh(&ftick->tk_aw_fiov);
306 ftick->tk_aw_errno = 0;
307 ftick->tk_aw_bufdata = NULL;
308 ftick->tk_aw_bufsize = 0;
309 ftick->tk_aw_type = FT_A_FIOV;
315 fticket_wait_answer(struct fuse_ticket *ftick)
319 struct fuse_data *data;
321 debug_printf("ftick=%p\n", ftick);
322 fuse_lck_mtx_lock(ftick->tk_aw_mtx);
324 if (fticket_answered(ftick)) {
327 data = ftick->tk_data;
329 if (fdata_get_dead(data)) {
331 fticket_set_answered(ftick);
334 fuse_block_sigs(&tset);
335 err = msleep(ftick, &ftick->tk_aw_mtx, PCATCH, "fu_ans",
336 data->daemon_timeout * hz);
337 fuse_restore_sigs(&tset);
338 if (err == EAGAIN) { /* same as EWOULDBLOCK */
339 #ifdef XXXIP /* die conditionally */
340 if (!fdata_get_dead(data)) {
341 fdata_set_dead(data);
345 fticket_set_answered(ftick);
348 if (!(err || fticket_answered(ftick))) {
349 debug_printf("FUSE: requester was woken up but still no answer");
352 fuse_lck_mtx_unlock(ftick->tk_aw_mtx);
359 fticket_aw_pull_uio(struct fuse_ticket *ftick, struct uio *uio)
362 size_t len = uio_resid(uio);
364 debug_printf("ftick=%p, uio=%p\n", ftick, uio);
367 switch (ftick->tk_aw_type) {
369 fiov_adjust(fticket_resp(ftick), len);
370 err = uiomove(fticket_resp(ftick)->base, len, uio);
372 debug_printf("FUSE: FT_A_FIOV: error is %d"
374 err, fticket_resp(ftick)->base,
380 ftick->tk_aw_bufsize = len;
381 err = uiomove(ftick->tk_aw_bufdata, len, uio);
383 debug_printf("FUSE: FT_A_BUF: error is %d"
385 err, ftick->tk_aw_bufdata, len, uio);
390 panic("FUSE: unknown answer type for ticket %p", ftick);
397 fticket_pull(struct fuse_ticket *ftick, struct uio *uio)
401 debug_printf("ftick=%p, uio=%p\n", ftick, uio);
403 if (ftick->tk_aw_ohead.error) {
406 err = fuse_body_audit(ftick, uio_resid(uio));
408 err = fticket_aw_pull_uio(ftick, uio);
414 fdata_alloc(struct cdev *fdev, struct ucred *cred)
416 struct fuse_data *data;
418 debug_printf("fdev=%p\n", fdev);
420 data = malloc(sizeof(struct fuse_data), M_FUSEMSG, M_WAITOK | M_ZERO);
423 mtx_init(&data->ms_mtx, "fuse message list mutex", NULL, MTX_DEF);
424 STAILQ_INIT(&data->ms_head);
425 mtx_init(&data->aw_mtx, "fuse answer list mutex", NULL, MTX_DEF);
426 TAILQ_INIT(&data->aw_head);
427 data->daemoncred = crhold(cred);
428 data->daemon_timeout = FUSE_DEFAULT_DAEMON_TIMEOUT;
429 sx_init(&data->rename_lock, "fuse rename lock");
436 fdata_trydestroy(struct fuse_data *data)
438 FS_DEBUG("data=%p data.mp=%p data.fdev=%p data.flags=%04x\n",
439 data, data->mp, data->fdev, data->dataflags);
441 FS_DEBUG("destroy: data=%p\n", data);
443 MPASS(data->ref >= 0);
447 /* Driving off stage all that stuff thrown at device... */
448 mtx_destroy(&data->ms_mtx);
449 mtx_destroy(&data->aw_mtx);
450 sx_destroy(&data->rename_lock);
452 crfree(data->daemoncred);
454 free(data, M_FUSEMSG);
458 fdata_set_dead(struct fuse_data *data)
460 debug_printf("data=%p\n", data);
463 if (fdata_get_dead(data)) {
467 fuse_lck_mtx_lock(data->ms_mtx);
468 data->dataflags |= FSESS_DEAD;
470 selwakeuppri(&data->ks_rsel, PZERO + 1);
471 wakeup(&data->ticketer);
472 fuse_lck_mtx_unlock(data->ms_mtx);
477 fuse_ticket_fetch(struct fuse_data *data)
480 struct fuse_ticket *ftick;
482 debug_printf("data=%p\n", data);
484 ftick = fticket_alloc(data);
486 if (!(data->dataflags & FSESS_INITED)) {
487 /* Sleep until get answer for INIT messsage */
489 if (!(data->dataflags & FSESS_INITED) && data->ticketer > 2) {
490 err = msleep(&data->ticketer, &fuse_mtx, PCATCH | PDROP,
493 fdata_set_dead(data);
501 fuse_ticket_drop(struct fuse_ticket *ftick)
505 die = refcount_release(&ftick->tk_refcount);
506 debug_printf("ftick=%p refcount=%d\n", ftick, ftick->tk_refcount);
508 fticket_destroy(ftick);
514 fuse_insert_callback(struct fuse_ticket *ftick, fuse_handler_t * handler)
516 debug_printf("ftick=%p, handler=%p data=%p\n", ftick, ftick->tk_data,
519 if (fdata_get_dead(ftick->tk_data)) {
522 ftick->tk_aw_handler = handler;
524 fuse_lck_mtx_lock(ftick->tk_data->aw_mtx);
526 fuse_lck_mtx_unlock(ftick->tk_data->aw_mtx);
530 fuse_insert_message(struct fuse_ticket *ftick)
532 debug_printf("ftick=%p\n", ftick);
534 if (ftick->tk_flag & FT_DIRTY) {
535 panic("FUSE: ticket reused without being refreshed");
537 ftick->tk_flag |= FT_DIRTY;
539 if (fdata_get_dead(ftick->tk_data)) {
542 fuse_lck_mtx_lock(ftick->tk_data->ms_mtx);
544 wakeup_one(ftick->tk_data);
545 selwakeuppri(&ftick->tk_data->ks_rsel, PZERO + 1);
546 fuse_lck_mtx_unlock(ftick->tk_data->ms_mtx);
550 fuse_body_audit(struct fuse_ticket *ftick, size_t blen)
553 enum fuse_opcode opcode;
555 debug_printf("ftick=%p, blen = %zu\n", ftick, blen);
557 opcode = fticket_opcode(ftick);
561 err = (blen == sizeof(struct fuse_entry_out)) ? 0 : EINVAL;
565 panic("FUSE: a handler has been intalled for FUSE_FORGET");
569 err = (blen == sizeof(struct fuse_attr_out)) ? 0 : EINVAL;
573 err = (blen == sizeof(struct fuse_attr_out)) ? 0 : EINVAL;
577 err = (PAGE_SIZE >= blen) ? 0 : EINVAL;
581 err = (blen == sizeof(struct fuse_entry_out)) ? 0 : EINVAL;
585 err = (blen == sizeof(struct fuse_entry_out)) ? 0 : EINVAL;
589 err = (blen == sizeof(struct fuse_entry_out)) ? 0 : EINVAL;
593 err = (blen == 0) ? 0 : EINVAL;
597 err = (blen == 0) ? 0 : EINVAL;
601 err = (blen == 0) ? 0 : EINVAL;
605 err = (blen == sizeof(struct fuse_entry_out)) ? 0 : EINVAL;
609 err = (blen == sizeof(struct fuse_open_out)) ? 0 : EINVAL;
613 err = (((struct fuse_read_in *)(
614 (char *)ftick->tk_ms_fiov.base +
615 sizeof(struct fuse_in_header)
616 ))->size >= blen) ? 0 : EINVAL;
620 err = (blen == sizeof(struct fuse_write_out)) ? 0 : EINVAL;
624 if (fuse_libabi_geq(ftick->tk_data, 7, 4)) {
625 err = (blen == sizeof(struct fuse_statfs_out)) ?
628 err = (blen == FUSE_COMPAT_STATFS_SIZE) ? 0 : EINVAL;
633 err = (blen == 0) ? 0 : EINVAL;
637 err = (blen == 0) ? 0 : EINVAL;
641 err = (blen == 0) ? 0 : EINVAL;
647 * These can have varying response lengths, and 0 length
648 * isn't necessarily invalid.
653 case FUSE_REMOVEXATTR:
654 err = (blen == 0) ? 0 : EINVAL;
658 err = (blen == 0) ? 0 : EINVAL;
662 if (blen == sizeof(struct fuse_init_out) || blen == 8) {
670 err = (blen == sizeof(struct fuse_open_out)) ? 0 : EINVAL;
674 err = (((struct fuse_read_in *)(
675 (char *)ftick->tk_ms_fiov.base +
676 sizeof(struct fuse_in_header)
677 ))->size >= blen) ? 0 : EINVAL;
680 case FUSE_RELEASEDIR:
681 err = (blen == 0) ? 0 : EINVAL;
685 err = (blen == 0) ? 0 : EINVAL;
689 panic("FUSE: no response body format check for FUSE_GETLK");
693 panic("FUSE: no response body format check for FUSE_SETLK");
697 panic("FUSE: no response body format check for FUSE_SETLKW");
701 err = (blen == 0) ? 0 : EINVAL;
705 err = (blen == sizeof(struct fuse_entry_out) +
706 sizeof(struct fuse_open_out)) ? 0 : EINVAL;
710 err = (blen == 0) ? 0 : EINVAL;
714 panic("FUSE: opcodes out of sync (%d)\n", opcode);
721 fuse_setup_ihead(struct fuse_in_header *ihead,
722 struct fuse_ticket *ftick,
729 ihead->len = sizeof(*ihead) + blen;
730 ihead->unique = ftick->tk_unique;
734 debug_printf("ihead=%p, ftick=%p, nid=%ju, op=%d, blen=%zu\n",
735 ihead, ftick, (uintmax_t)nid, op, blen);
738 ihead->uid = cred->cr_uid;
739 ihead->gid = cred->cr_rgid;
743 * fuse_standard_handler just pulls indata and wakes up pretender.
744 * Doesn't try to interpret data, that's left for the pretender.
745 * Though might do a basic size verification before the pull-in takes place
749 fuse_standard_handler(struct fuse_ticket *ftick, struct uio *uio)
753 debug_printf("ftick=%p, uio=%p\n", ftick, uio);
755 err = fticket_pull(ftick, uio);
757 fuse_lck_mtx_lock(ftick->tk_aw_mtx);
759 if (!fticket_answered(ftick)) {
760 fticket_set_answered(ftick);
761 ftick->tk_aw_errno = err;
764 fuse_lck_mtx_unlock(ftick->tk_aw_mtx);
770 fdisp_make_pid(struct fuse_dispatcher *fdip,
777 struct fuse_data *data = fuse_get_mpdata(mp);
779 debug_printf("fdip=%p, op=%d, mp=%p, nid=%ju\n",
780 fdip, op, mp, (uintmax_t)nid);
783 fticket_refresh(fdip->tick);
785 fdip->tick = fuse_ticket_fetch(data);
788 FUSE_DIMALLOC(&fdip->tick->tk_ms_fiov, fdip->finh,
789 fdip->indata, fdip->iosize);
791 fuse_setup_ihead(fdip->finh, fdip->tick, nid, op, fdip->iosize, pid, cred);
795 fdisp_make(struct fuse_dispatcher *fdip,
802 RECTIFY_TDCR(td, cred);
804 return fdisp_make_pid(fdip, op, mp, nid, td->td_proc->p_pid, cred);
808 fdisp_make_vp(struct fuse_dispatcher *fdip,
814 debug_printf("fdip=%p, op=%d, vp=%p\n", fdip, op, vp);
815 RECTIFY_TDCR(td, cred);
816 return fdisp_make_pid(fdip, op, vnode_mount(vp), VTOI(vp),
817 td->td_proc->p_pid, cred);
821 fdisp_wait_answ(struct fuse_dispatcher *fdip)
826 fuse_insert_callback(fdip->tick, fuse_standard_handler);
827 fuse_insert_message(fdip->tick);
829 if ((err = fticket_wait_answer(fdip->tick))) {
830 debug_printf("IPC: interrupted, err = %d\n", err);
832 fuse_lck_mtx_lock(fdip->tick->tk_aw_mtx);
834 if (fticket_answered(fdip->tick)) {
836 * Just between noticing the interrupt and getting here,
837 * the standard handler has completed his job.
838 * So we drop the ticket and exit as usual.
840 debug_printf("IPC: already answered\n");
841 fuse_lck_mtx_unlock(fdip->tick->tk_aw_mtx);
845 * So we were faster than the standard handler.
846 * Then by setting the answered flag we get *him*
847 * to drop the ticket.
849 debug_printf("IPC: setting to answered\n");
850 fticket_set_answered(fdip->tick);
851 fuse_lck_mtx_unlock(fdip->tick->tk_aw_mtx);
855 debug_printf("IPC: not interrupted, err = %d\n", err);
857 if (fdip->tick->tk_aw_errno) {
858 debug_printf("IPC: explicit EIO-ing, tk_aw_errno = %d\n",
859 fdip->tick->tk_aw_errno);
863 if ((err = fdip->tick->tk_aw_ohead.error)) {
864 debug_printf("IPC: setting status to %d\n",
865 fdip->tick->tk_aw_ohead.error);
867 * This means a "proper" fuse syscall error.
868 * We record this value so the caller will
869 * be able to know it's not a boring messaging
870 * failure, if she wishes so (and if not, she can
871 * just simply propagate the return value of this routine).
872 * [XXX Maybe a bitflag would do the job too,
873 * if other flags needed, this will be converted thusly.]
875 fdip->answ_stat = err;
878 fdip->answ = fticket_resp(fdip->tick)->base;
879 fdip->iosize = fticket_resp(fdip->tick)->len;
881 debug_printf("IPC: all is well\n");
886 debug_printf("IPC: dropping ticket, err = %d\n", err);
894 ticket_zone = uma_zcreate("fuse_ticket", sizeof(struct fuse_ticket),
895 fticket_ctor, fticket_dtor, fticket_init, fticket_fini,
900 fuse_ipc_destroy(void)
902 uma_zdestroy(ticket_zone);