From 29c26b964f2f2af899f1c5672149499607573aab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 00:50:54 +0000 Subject: [PATCH 1/2] Initial plan From 12494db25627e846c848f8bd97da1c2927358c77 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 00:53:47 +0000 Subject: [PATCH 2/2] [UDFS] move large mount/VAT buffers to PagedPool Agent-Logs-Url: https://github.com/Zero3K20/reactos/sessions/ffe6841a-3388-46f2-ae2f-469a57193caa Co-authored-by: Zero3K20 <258969903+Zero3K20@users.noreply.github.com> --- drivers/filesystems/udfs/udf_info/mount.cpp | 13 ++++++------- drivers/filesystems/udfs/udf_info/udf_info.cpp | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/filesystems/udfs/udf_info/mount.cpp b/drivers/filesystems/udfs/udf_info/mount.cpp index 3fc100aba5a3f..8d4322eb08d7c 100644 --- a/drivers/filesystems/udfs/udf_info/mount.cpp +++ b/drivers/filesystems/udfs/udf_info/mount.cpp @@ -81,7 +81,7 @@ UDFPrepareXSpaceBitmap( LBS = Vcb->SectorSize; *XSl = sizeof(SPACE_BITMAP_DESC) + ((plen+7)>>3); - _XSBM = (int8*)DbgAllocatePool(NonPagedPool, (*XSl + BS - 1) & ~(BS-1) ); + _XSBM = (int8*)DbgAllocatePool(PagedPool, (*XSl + BS - 1) & ~(BS-1) ); *XSBM = _XSBM; switch (XSpaceBitmap->extLength >> 30) { @@ -1643,7 +1643,7 @@ UDFAddXSpaceBitmap( i=UDFPartStart(Vcb, RefPartNum); flags = bm->extLength >> 30; if (!flags /*|| flags == EXTENT_NOT_RECORDED_ALLOCATED*/) { - tmp = (int8*)DbgAllocatePool(NonPagedPool, max(Length, Vcb->SectorSize)); + tmp = (int8*)DbgAllocatePool(PagedPool, max(Length, Vcb->SectorSize)); if (!tmp) return STATUS_INSUFFICIENT_RESOURCES; locAddr.partitionReferenceNum = (uint16)RefPartNum; locAddr.logicalBlockNum = bm->extPosition; @@ -1723,7 +1723,7 @@ UDFVerifyXSpaceBitmap( // i=UDFPartStart(Vcb, RefPartNum); flags = bm->extLength >> 30; if (!flags /*|| flags == EXTENT_NOT_RECORDED_ALLOCATED*/) { - tmp = (int8*)DbgAllocatePool(NonPagedPool, max(Length, Vcb->SectorSize)); + tmp = (int8*)DbgAllocatePool(PagedPool, max(Length, Vcb->SectorSize)); if (!tmp) return STATUS_INSUFFICIENT_RESOURCES; locAddr.partitionReferenceNum = (uint16)RefPartNum; locAddr.logicalBlockNum = bm->extPosition; @@ -1964,13 +1964,13 @@ UDFBuildFreeSpaceBitmap( if (!(Vcb->FSBM_Bitmap)) { // init Bitmap buffer if necessary - Vcb->FSBM_Bitmap = (int8*)DbgAllocatePool(NonPagedPool, (i = (Vcb->LastPossibleLBA+1+7)>>3) ); + Vcb->FSBM_Bitmap = (int8*)DbgAllocatePool(PagedPool, (i = (Vcb->LastPossibleLBA+1+7)>>3) ); if (!(Vcb->FSBM_Bitmap)) return STATUS_INSUFFICIENT_RESOURCES; RtlZeroMemory(Vcb->FSBM_Bitmap, i); #ifdef UDF_TRACK_ONDISK_ALLOCATION_OWNERS - Vcb->FSBM_Bitmap_owners = (uint32*)DbgAllocatePool(NonPagedPool, (Vcb->LastPossibleLBA+1)*sizeof(uint32)); + Vcb->FSBM_Bitmap_owners = (uint32*)DbgAllocatePool(PagedPool, (Vcb->LastPossibleLBA+1)*sizeof(uint32)); if (!(Vcb->FSBM_Bitmap_owners)) { MyFreePool__(Vcb->ZSBM_Bitmap); Vcb->ZSBM_Bitmap = NULL; @@ -2964,7 +2964,7 @@ UDFGetDiskInfoAndVerify( UDFLoadFileset(Vcb,FileSetDesc, &(Vcb->RootLbAddr), &(Vcb->SysStreamLbAddr)); - Vcb->FSBM_OldBitmap = (int8*)DbgAllocatePool(NonPagedPool, Vcb->FSBM_ByteCount); + Vcb->FSBM_OldBitmap = (int8*)DbgAllocatePool(PagedPool, Vcb->FSBM_ByteCount); if (!(Vcb->FSBM_OldBitmap)) try_return(RC = STATUS_INSUFFICIENT_RESOURCES); RtlCopyMemory(Vcb->FSBM_OldBitmap, Vcb->FSBM_Bitmap, Vcb->FSBM_ByteCount); @@ -2976,4 +2976,3 @@ try_exit: NOTHING; return(RC); } // end UDFGetDiskInfoAndVerify() - diff --git a/drivers/filesystems/udfs/udf_info/udf_info.cpp b/drivers/filesystems/udfs/udf_info/udf_info.cpp index e5d0b699e4947..eac196242cc8e 100644 --- a/drivers/filesystems/udfs/udf_info/udf_info.cpp +++ b/drivers/filesystems/udfs/udf_info/udf_info.cpp @@ -3698,7 +3698,7 @@ UDFLoadVAT( goto err_vat_15; } // read VAT & remember old version - Vcb->Vat = (uint32*)DbgAllocatePool(NonPagedPool, (Vcb->LastPossibleLBA+1)*sizeof(uint32) ); + Vcb->Vat = (uint32*)DbgAllocatePool(PagedPool, (Vcb->LastPossibleLBA+1)*sizeof(uint32) ); if (!Vcb->Vat) { goto err_vat_15_2; }