Kernel: i386 has 14 indirect blocks in TmpInode instead of 2
This allows keeping size of TmpInodeInfo as 128
This commit is contained in:
parent
c0dff5e203
commit
2352c86048
|
@ -21,12 +21,23 @@ namespace Kernel
|
||||||
size_t size { 0 };
|
size_t size { 0 };
|
||||||
blkcnt_t blocks { 0 };
|
blkcnt_t blocks { 0 };
|
||||||
|
|
||||||
|
#if ARCH(x86_64)
|
||||||
// 2x direct blocks
|
// 2x direct blocks
|
||||||
// 1x singly indirect
|
// 1x singly indirect
|
||||||
// 1x doubly indirect
|
// 1x doubly indirect
|
||||||
// 1x triply indirect
|
// 1x triply indirect
|
||||||
BAN::Array<paddr_t, 5> block;
|
BAN::Array<paddr_t, 5> block;
|
||||||
static constexpr size_t direct_block_count = 2;
|
static constexpr size_t direct_block_count = 2;
|
||||||
|
#elif ARCH(i386)
|
||||||
|
// 14x direct blocks
|
||||||
|
// 1x singly indirect
|
||||||
|
// 1x doubly indirect
|
||||||
|
// 1x triply indirect
|
||||||
|
BAN::Array<paddr_t, 17> block;
|
||||||
|
static constexpr size_t direct_block_count = 14;
|
||||||
|
#else
|
||||||
|
#error
|
||||||
|
#endif
|
||||||
static constexpr size_t max_size =
|
static constexpr size_t max_size =
|
||||||
direct_block_count * PAGE_SIZE +
|
direct_block_count * PAGE_SIZE +
|
||||||
(PAGE_SIZE / sizeof(paddr_t)) * PAGE_SIZE +
|
(PAGE_SIZE / sizeof(paddr_t)) * PAGE_SIZE +
|
||||||
|
|
Loading…
Reference in New Issue