fix: indirect block alloc
This commit is contained in:
parent
8165ea664f
commit
bde4397caa
|
@ -38,6 +38,7 @@ bmap(struct fs_inode *ip, uint32_t blocknum)
|
||||||
if (addrs[index] == 0)
|
if (addrs[index] == 0)
|
||||||
{
|
{
|
||||||
addrs[index] = fs_balloc(ip->super);
|
addrs[index] = fs_balloc(ip->super);
|
||||||
|
fs_bio_bwrite(buff);
|
||||||
}
|
}
|
||||||
fs_bio_brelse(buff);
|
fs_bio_brelse(buff);
|
||||||
return (addrs[index]);
|
return (addrs[index]);
|
||||||
|
|
|
@ -139,7 +139,7 @@ start:
|
||||||
.indirect_read:
|
.indirect_read:
|
||||||
push ebx
|
push ebx
|
||||||
|
|
||||||
mov ax, DISK_BUFFER/10
|
mov ax, DISK_BUFFER/0x10
|
||||||
mov es, ax
|
mov es, ax
|
||||||
|
|
||||||
mov eax, [DISK_BUFFER + 512 + INODE_SIZE * 2 + inode.zones + 28] ;zones[7] == indirect
|
mov eax, [DISK_BUFFER + 512 + INODE_SIZE * 2 + inode.zones + 28] ;zones[7] == indirect
|
||||||
|
@ -147,7 +147,7 @@ start:
|
||||||
xor bx, bx
|
xor bx, bx
|
||||||
call disk_read_sectors
|
call disk_read_sectors
|
||||||
|
|
||||||
mov ax, LOADER_BASE/10
|
mov ax, LOADER_BASE/0x10
|
||||||
mov es, ax
|
mov es, ax
|
||||||
pop ebx
|
pop ebx
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue