You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

  1. #include <stdint.h>
  2. typedef struct fuse_node_t fuse_node_t;
  3. struct fuse_node_t
  4. {
  5. uint64_t id;
  6. uint64_t generation;
  7. char *name;
  8. fuse_node_t *parent;
  9. uint32_t ref_count;
  10. uint64_t lookup_count;
  11. uint64_t open_count;
  12. };
  13. struct fuse_node_hashtable_t;
  14. typedef struct fuse_node_hashtable_t fuse_node_hashtable_t;
  15. fuse_node_hashtable_t *fuse_node_hashtable_init();
  16. fuse_node_t *fuse_node_hashtable_put(fuse_node_hashtable_t *ht,
  17. const uint64_t parent_id,
  18. const uint64_t child_id,
  19. const char *child_name);
  20. fuse_node_t* fuse_node_hashtable_get(fuse_node_hashtable_t *ht,
  21. const uint64_t id);
  22. fuse_node_t* fuse_node_hashtable_get_child(fuse_node_hashtable_t *ht,
  23. const uint64_t id,
  24. const char *name);
  25. void fuse_node_hashtable_del(fuse_node_hashtable_t *ht,
  26. fuse_node_t *node);
  27. void fuse_node_hashtable_get_path(fuse_node_hashtable_t *ht,
  28. char *buf,
  29. uint32_t buflen);