libfuse/lib/fuse_i.h

54 lines
1000 B
C
Raw Normal View History

2001-10-29 03:44:14 +08:00
/*
FUSE: Filesystem in Userspace
Copyright (C) 2001 Miklos Szeredi (mszeredi@inf.bme.hu)
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
*/
#include "fuse.h"
#include <stdio.h>
2001-11-06 20:03:23 +08:00
#include <pthread.h>
2001-10-29 03:44:14 +08:00
typedef unsigned long fino_t;
struct node {
2001-11-07 20:09:43 +08:00
struct node *name_next;
struct node *ino_next;
fino_t ino;
2001-10-29 03:44:14 +08:00
fino_t parent;
2001-11-07 20:09:43 +08:00
char *name;
2001-10-31 22:52:35 +08:00
int mode;
2001-11-06 20:03:23 +08:00
int rdev;
int version;
2001-10-29 03:44:14 +08:00
};
struct fuse {
2001-11-06 20:03:23 +08:00
int flags;
2001-10-29 03:44:14 +08:00
int fd;
struct fuse_operations op;
2001-11-07 20:09:43 +08:00
struct node **name_table;
size_t name_table_size;
struct node **ino_table;
size_t ino_table_size;
fino_t ctr;
2001-11-06 20:03:23 +08:00
pthread_mutex_t lock;
2001-11-20 01:55:51 +08:00
int numworker;
int numavail;
2001-12-20 20:17:25 +08:00
struct fuse_context *(*getcontext)(struct fuse *);
struct fuse_context context;
2001-12-20 23:38:05 +08:00
pthread_key_t context_key;
2001-10-29 03:44:14 +08:00
};
2001-11-06 20:03:23 +08:00
struct fuse_dirhandle {
2001-10-29 03:44:14 +08:00
struct fuse *fuse;
fino_t dir;
FILE *fp;
};
2001-11-16 18:12:59 +08:00
struct fuse_cmd {
struct fuse *f;
char *buf;
size_t buflen;
};