summaryrefslogtreecommitdiffstats
path: root/src/fuse/main.h
diff options
context:
space:
mode:
authorMichael Scherle2022-02-17 18:58:25 +0100
committerSimon Rettberg2024-05-13 18:25:14 +0200
commitd92d1d3faf7cde517d8c3fe914301eb5aa872f62 (patch)
treeff2eaa0a640223b36dfabd3ffe29772e44e50733 /src/fuse/main.h
parent[KERNEL] Fix build on 5.15 kernels >= 5.15.132 (diff)
downloaddnbd3-d92d1d3faf7cde517d8c3fe914301eb5aa872f62.tar.gz
dnbd3-d92d1d3faf7cde517d8c3fe914301eb5aa872f62.tar.xz
dnbd3-d92d1d3faf7cde517d8c3fe914301eb5aa872f62.zip
[FUSE] basic cow implementation & rudimentary tests
Diffstat (limited to 'src/fuse/main.h')
-rw-r--r--src/fuse/main.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/fuse/main.h b/src/fuse/main.h
new file mode 100644
index 0000000..721f251
--- /dev/null
+++ b/src/fuse/main.h
@@ -0,0 +1,39 @@
+#ifndef _MAIN_H_
+#define _MAIN_H_
+#include "cowfile.h"
+#include "connection.h"
+#include "helper.h"
+#include <dnbd3/version.h>
+#include <dnbd3/build.h>
+#include <dnbd3/shared/protocol.h>
+#include <dnbd3/shared/log.h>
+
+
+#define FUSE_USE_VERSION 30
+#include <dnbd3/config.h>
+#include <fuse_lowlevel.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <assert.h>
+/* for printing uint */
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+#include <getopt.h>
+#include <time.h>
+#include <signal.h>
+#include <pthread.h>
+#define debugf(...) do { logadd( LOG_DEBUG1, __VA_ARGS__ ); } while (0)
+
+#define INO_ROOT (1)
+#define INO_STATS (2)
+#define INO_IMAGE (3)
+
+extern bool useCow;
+extern bool cow_merge_after_upload;
+void image_ll_getattr( fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi );
+
+#endif /* main_H_ */ \ No newline at end of file