Skip to content

Commit

Permalink
lxfs: preserve root directory start block
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 29, 2024
1 parent 03c3361 commit f1bab31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/lxfs/src/include/lxfs/lxfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ typedef struct Mountpoint {
int fd;
int sectorSize, blockSize, blockSizeBytes;

uint64_t root; // root directory block
void *blockTableBuffer; // of size blockSizeBytes
} Mountpoint;

Expand Down
2 changes: 2 additions & 0 deletions fs/lxfs/src/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ void lxfsMount(MountCommand *cmd) {
mp->blockSize = blockSize;
mp->blockSizeBytes = blockSizeBytes;
mp->blockTableBuffer = buffer;
mp->root = id->rootBlock;

luxLogf(KPRINT_LEVEL_DEBUG, "- %d bytes per sector, %d sectors per block\n", mp->sectorSize, mp->blockSize);
luxLogf(KPRINT_LEVEL_DEBUG, "- root directory at block %d\n", mp->root);

cmd->header.header.status = 0;
luxSendDependency(cmd);
Expand Down

0 comments on commit f1bab31

Please sign in to comment.