mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-07-02 03:21:27 +08:00
improve nodeid generation
* Change fuse_ino_t to uint64_t * Change id generation to 64bit * Randomize generation value (should help with NFS)
This commit is contained in:
@ -25,12 +25,13 @@
|
||||
|
||||
#include "fuse_common.h"
|
||||
|
||||
#include <utime.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include <utime.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -44,7 +45,7 @@ extern "C" {
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
||||
/** Inode number type */
|
||||
typedef unsigned long fuse_ino_t;
|
||||
typedef uint64_t fuse_ino_t;
|
||||
|
||||
/** Request pointer type */
|
||||
typedef struct fuse_req *fuse_req_t;
|
||||
@ -88,7 +89,8 @@ struct fuse_entry_param {
|
||||
* it as an error.
|
||||
*
|
||||
*/
|
||||
unsigned long generation;
|
||||
uint64_t generation;
|
||||
|
||||
|
||||
/** Inode attributes.
|
||||
*
|
||||
@ -122,7 +124,7 @@ struct fuse_ctx {
|
||||
};
|
||||
|
||||
struct fuse_forget_data {
|
||||
uint64_t ino;
|
||||
fuse_ino_t ino;
|
||||
uint64_t nlookup;
|
||||
};
|
||||
|
||||
@ -233,7 +235,7 @@ struct fuse_lowlevel_ops {
|
||||
* @param ino the inode number
|
||||
* @param nlookup the number of lookups to forget
|
||||
*/
|
||||
void (*forget) (fuse_req_t req, fuse_ino_t ino, unsigned long nlookup);
|
||||
void (*forget) (fuse_req_t req, fuse_ino_t ino, uint64_t nlookup);
|
||||
|
||||
/**
|
||||
* Get file attributes
|
||||
|
Reference in New Issue
Block a user