File: fuse_node.h

package info (click to toggle)
mergerfs 2.40.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,000 kB
  • sloc: cpp: 58,559; ansic: 17,241; makefile: 348; python: 156; sh: 119
file content (36 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdint.h>

typedef struct fuse_node_t fuse_node_t;
struct fuse_node_t
{
  uint64_t     id;
  uint64_t     generation;  
  char        *name;
  fuse_node_t *parent;
  uint32_t     ref_count;
  uint64_t     lookup_count;
  uint64_t     open_count;
};

struct fuse_node_hashtable_t;
typedef struct fuse_node_hashtable_t fuse_node_hashtable_t;


fuse_node_hashtable_t *fuse_node_hashtable_init();

fuse_node_t *fuse_node_hashtable_put(fuse_node_hashtable_t *ht,
                                     const uint64_t         parent_id,
                                     const uint64_t         child_id,
                                     const char            *child_name);

fuse_node_t* fuse_node_hashtable_get(fuse_node_hashtable_t *ht,
                                     const uint64_t         id);
fuse_node_t* fuse_node_hashtable_get_child(fuse_node_hashtable_t *ht,
                                           const uint64_t         id,
                                           const char            *name);
void fuse_node_hashtable_del(fuse_node_hashtable_t *ht,
                             fuse_node_t           *node);

void fuse_node_hashtable_get_path(fuse_node_hashtable_t *ht,
                                  char                  *buf,
                                  uint32_t               buflen);