CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.85k stars 536 forks source link

Partition Manager is broken for parition size bigger than 2GB!, because of the data type is `int` instead of `ulong` #2954

Open COR-ET opened 2 months ago

COR-ET commented 2 months ago

Area of Cosmos - Partition of Disk and FileSystem (ManagedPartition is also related!)

Expected Behaviour - Partition bigger than int size (for example 2GB Partition) expected to work fine, so we can get correct BlockCount, Size, and use ReadBlock | WriteBlock

Actual Behaviour - The BlockCount is bigger than the Disk BlockCount 💀 , and ReadBlock or WriteBlock will give CPU heap (kernel unexpected crash)

Reproduction - After testing and analyzing.

Version - ofc DevKit and should be last month version.

image

zarlo commented 2 months ago

i see no issue with the requested change of replacing the use of int to ulong in the VFS and fs drivers

fixed typo

COR-ET commented 2 months ago

@zarlo It would only increase from Max partition size from 2 GB to 4 GB wouldn't it ?

zarlo commented 2 months ago

o i meant to put ulong

funcieqDEV commented 2 weeks ago

I have same