Ejemplo n.º 1
0
        public void FsTrim()
        {
            int virtualBlockCount  = Header.MainDataBlockCount;
            int physicalBlockCount = virtualBlockCount + Header.JournalBlockCount;

            int blockMapLength       = virtualBlockCount * MapEntryLength;
            int physicalBitmapLength = Util.AlignUp(physicalBlockCount, 32) / 8;
            int virtualBitmapLength  = Util.AlignUp(virtualBlockCount, 32) / 8;

            MapStorage.Slice(blockMapLength).Fill(SaveDataFileSystem.TrimFillValue);
            FreeBlocks.Slice(physicalBitmapLength).Fill(SaveDataFileSystem.TrimFillValue);
            ModifiedPhysicalBlocks.Slice(physicalBitmapLength).Fill(SaveDataFileSystem.TrimFillValue);
            ModifiedVirtualBlocks.Slice(virtualBitmapLength).Fill(SaveDataFileSystem.TrimFillValue);
        }
Ejemplo n.º 2
0
 public IStorage GetModifiedPhysicalBlocksStorage() => ModifiedPhysicalBlocks.AsReadOnly();
Ejemplo n.º 3
0
 public IStorage GetModifiedPhysicalBlocksStorage() => ModifiedPhysicalBlocks.WithAccess(FileAccess.Read);