mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 17:36:25 -05:00
Add async message processing
This commit is contained in:
parent
c89fbde48d
commit
24423b8d2a
22 changed files with 1535 additions and 764 deletions
|
|
@ -641,7 +641,8 @@ void fuse_destroy(struct fuse *f);
|
|||
*/
|
||||
void fuse_exit(struct fuse *f);
|
||||
|
||||
int fuse_config_num_threads(const struct fuse *fuse_);
|
||||
int fuse_config_read_thread_count(const struct fuse *f);
|
||||
int fuse_config_process_thread_count(const struct fuse *f);
|
||||
|
||||
/**
|
||||
* FUSE event loop with multiple threads
|
||||
|
|
@ -762,12 +763,6 @@ struct fuse *fuse_setup(int argc, char *argv[],
|
|||
/** This is the part of fuse_main() after the event loop */
|
||||
void fuse_teardown(struct fuse *fuse, char *mountpoint);
|
||||
|
||||
/** Read a single command. If none are read, return NULL */
|
||||
struct fuse_cmd *fuse_read_cmd(struct fuse *f);
|
||||
|
||||
/** Process a single command */
|
||||
void fuse_process_cmd(struct fuse *f, struct fuse_cmd *cmd);
|
||||
|
||||
/** Multi threaded event loop, which calls the custom command
|
||||
processor function */
|
||||
int fuse_loop_mt_proc(struct fuse *f, fuse_processor_t proc, void *data);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
* 25
|
||||
*/
|
||||
|
||||
#include "fuse_msgbuf.h"
|
||||
#ifndef FUSE_USE_VERSION
|
||||
#define FUSE_USE_VERSION 24
|
||||
#endif
|
||||
|
|
@ -1478,9 +1479,12 @@ void *fuse_session_data(struct fuse_session *se);
|
|||
int fuse_session_receive(struct fuse_session *se,
|
||||
struct fuse_buf *buf);
|
||||
void fuse_session_process(struct fuse_session *se,
|
||||
const struct fuse_buf *buf);
|
||||
const void *buf,
|
||||
const size_t bufsize);
|
||||
|
||||
int fuse_session_loop_mt(struct fuse_session *se, const int threads);
|
||||
int fuse_session_loop_mt(struct fuse_session *se,
|
||||
const int read_thread_count,
|
||||
const int process_thread_count);
|
||||
|
||||
/* ----------------------------------------------------------- *
|
||||
* Channel interface *
|
||||
|
|
@ -1520,12 +1524,6 @@ void *fuse_chan_data(struct fuse_chan *ch);
|
|||
*/
|
||||
struct fuse_session *fuse_chan_session(struct fuse_chan *ch);
|
||||
|
||||
int fuse_chan_recv(struct fuse_chan *ch,
|
||||
char *buf,
|
||||
size_t size);
|
||||
int fuse_chan_send(struct fuse_chan *ch,
|
||||
const struct iovec iov[],
|
||||
size_t count);
|
||||
void fuse_chan_destroy(struct fuse_chan *ch);
|
||||
|
||||
EXTERN_C_END
|
||||
|
|
|
|||
12
libfuse/include/fuse_msgbuf.h
Normal file
12
libfuse/include/fuse_msgbuf.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct fuse_msgbuf_t fuse_msgbuf_t;
|
||||
struct fuse_msgbuf_t
|
||||
{
|
||||
char *mem;
|
||||
uint32_t size;
|
||||
uint32_t used;
|
||||
int pipefd[2];
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue