Finished battfs_init.
[bertos.git] / fs / battfs.h
index 640465d8c73b88aabd060681b0eda70b616de518..14728a8d2b199f82c36054fa9237bbdb1bc5904a 100644 (file)
@@ -90,11 +90,6 @@ STATIC_ASSERT(sizeof(BattFsPageHeader) == 12);
  */
 #define BATTFS_MAX_FILES (1 << (CPU_BITS_PER_CHAR * sizeof(inode_t)))
 
-/**
- * Special inode used to identify free pages.
- */
-#define BATTFS_FREE_INODE (BATTFS_MAX_FILES - 1)
-
 /* Fwd decl */
 struct BattFsSuper;
 
@@ -103,6 +98,11 @@ struct BattFsSuper;
  */
 typedef uint16_t pgcnt_t;
 
+/**
+ * Sentinel used to keep trace of unset pages in disk->pag_array.
+ */
+#define PAGE_UNSET_SENTINEL ((1 << (CPU_BITS_PER_CHAR * sizeof(pgcnt_t))) - 1)
+
 /**
  * Type interface for disk init function.
  * \return true if all is ok, false otherwise.