Add fsck.mergerfs tool (#1483)

This commit is contained in:
trapexit 2025-06-23 21:57:55 -05:00 • committed by GitHub
parent 34f07e57f5
commit 77ef88b04c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 12156 additions and 43 deletions

View file

@ -25,6 +25,7 @@
#include "fs_open.hpp"
#include "fs_path.hpp"
#include "gidcache.hpp"
#include "mergerfs_ioctl.hpp"
#include "str.hpp"
#include "ugid.hpp"
@ -34,19 +35,6 @@
#include <fcntl.h>
#include <string.h>
#ifndef _IOC_TYPE
#define _IOC_TYPE(X) (((X) >> 8) & 0xFF)
#endif
typedef char IOCTL_BUF[4096];
#define IOCTL_APP_TYPE 0xDF
#define IOCTL_FILE_INFO _IOWR(IOCTL_APP_TYPE,0,IOCTL_BUF)
#define IOCTL_GC _IO(IOCTL_APP_TYPE,1)
#define IOCTL_GC1 _IO(IOCTL_APP_TYPE,2)
#define IOCTL_INVALIDATE_ALL_NODES _IO(IOCTL_APP_TYPE,3)
#define IOCTL_INVALIDATE_GID_CACHE _IO(IOCTL_APP_TYPE,4)
// From linux/btrfs.h
#define BTRFS_IOCTL_MAGIC 0x94