+#include "filesys/filehdr.h"
+#include <bitmap.h>
+#include <debug.h>
+#include <stdio.h>
+#include "filesys/filesys.h"
+#include "threads/malloc.h"
+
+/* Allocates sectors from bitmap B for the content of a file
+ whose size is LENGTH bytes, and returns a new `struct filehdr'
+ properly initialized for the file.
+ It is the caller's responsible to allocate a sector for the
+ file header itself, and to write the file header and bitmap
+ to disk.
+ If memory or disk allocation fails, returns a null pointer,
+ leaving bitmap B is unchanged. */