mirror of
https://github.com/versity/scoutfs.git
synced 2025-12-23 13:35:18 +00:00
Mark all mkfs chunks allocated in bitmap
The initial bitmap entry written in the ring by mkfs was off by one. Three chunks were written but the 0th chunk is also free for the supers. It has to mark the first four chunks as allocated. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -133,8 +133,8 @@ static int write_new_fs(char *path, int fd)
|
||||
ent->len = cpu_to_le16(sizeof(*bm));
|
||||
bm = (void *)(ent + 1);
|
||||
memset(bm->bits, 0xff, sizeof(bm->bits));
|
||||
/* the first three blocks are allocated */
|
||||
bm->bits[0] = cpu_to_le64(~7ULL);
|
||||
/* the first four chunks are allocated */
|
||||
bm->bits[0] = cpu_to_le64(~15ULL);
|
||||
bm->bits[1] = cpu_to_le64(~0ULL);
|
||||
|
||||
blkno += SCOUTFS_BLOCKS_PER_CHUNK;
|
||||
|
||||
Reference in New Issue
Block a user