code: mafs

Download patch

ref: 4e7cd51921280769a1914a2459e1f8aeff1464d5
parent: ebaad2dcaf73e2259c1b236304e7d092b55a5ff5
author: 9ferno <gophone2015@gmail.com>
date: Mon Nov 28 23:15:58 EST 2022

updated document

--- a/dat.h
+++ b/dat.h
@@ -181,7 +181,7 @@
 };
 struct Indirect
 {
-	u8 tagi;
+	u8 tagi;	/* the suffix i to avoid union complaining about ambiguous fields */
 	u8 veri;
 	u8 pad[6];	/* unused, to align to a multiple of 8 */
 	u64 dblkno;	/* block number of the directory entry */
--- a/docs/mafs.ms
+++ b/docs/mafs.ms
@@ -208,7 +208,7 @@
 };
 struct Indirect
 {
-	u8 tag;
+	u8 tagi;	/* the suffix i to avoid union complaining about ambiguous fields */
 	u8 veri;
 	u8 pad[6];	/* unused, to align to a multiple of 8 */
 	u64 dblkno;	/* block number of the directory entry */
@@ -694,6 +694,8 @@
 	u8 *append;		/* appended data added not yet written to disk */
 	u64 appendsize;
 	u8 freshalloc;	/* uninitialized blocks on the disk */
+	u64 atime;		/* to find old buffers to flush to the disk */
+	u8 tag;
 };
 .fi
 .sp
@@ -795,6 +797,9 @@
 
 	u8 nlru;		/* number of items in the lru linked list */
 	Extent *lru;	/* least recently used extent in the circular lru linked list */
+	char name[32];
+
+	void (*flush)(void);
 };
 .fi
 .sp