summaryrefslogtreecommitdiffstats
path: root/inc/dnbd3/types.h
diff options
context:
space:
mode:
authorSimon Rettberg2023-03-29 12:03:54 +0200
committerSimon Rettberg2024-05-13 18:26:42 +0200
commitec0b9b5f72607335ac19d4ea00c24919943b7970 (patch)
treefaf735a62dff9d88f22c1073b601e5af913cc3e9 /inc/dnbd3/types.h
parent[FUSE] Fixed cow daemon issue (diff)
downloaddnbd3-ec0b9b5f72607335ac19d4ea00c24919943b7970.tar.gz
dnbd3-ec0b9b5f72607335ac19d4ea00c24919943b7970.tar.xz
dnbd3-ec0b9b5f72607335ac19d4ea00c24919943b7970.zip
[FUSE] cow: Cleanup, comments, fixes, minor refactoring
- Use the term "cluster" for a group of dnbd3-blocks instead of also calling them blocks. - Use term "table" instead of "array" for the L1 and L2 tables. - Use term "index" instead of "offset" when addressing those tables - Fix a few logic bugs, use-after-free - Add TODOs for parts that need better comments
Diffstat (limited to 'inc/dnbd3/types.h')
-rw-r--r--inc/dnbd3/types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/inc/dnbd3/types.h b/inc/dnbd3/types.h
index 699fa68..bd15f4e 100644
--- a/inc/dnbd3/types.h
+++ b/inc/dnbd3/types.h
@@ -30,6 +30,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
+#define container_of( ptr, type, member ) ( (type *)( (char *)( ptr ) - (char *)&( ( (type *)NULL )->member ) ) )
#endif
#ifndef MIN