mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 02:34:53 +00:00
Take inode size from Ext2 superblock.
svn path=/trunk/; revision=42723
This commit is contained in:
parent
961afecdd8
commit
2a60b44d65
|
@ -452,8 +452,9 @@ typedef struct _Ext2VolumeControlBlock
|
|||
ULONG ReservedBlocksCount;
|
||||
ULONG FreeBlocksCount;
|
||||
ULONG FreeInodesCount;
|
||||
ULONG LogBlockSize; // Block size = 1024 << LogBlockSize
|
||||
|
||||
ULONG LogBlockSize; // Block size = 1024 << LogBlockSize
|
||||
ULONG InodeSize;
|
||||
|
||||
// Group Information Saved up in the VCB...
|
||||
PtrExt2GroupDescriptors PtrGroupDescriptors;
|
||||
ULONG NoOfGroups;
|
||||
|
|
|
@ -368,6 +368,14 @@ Ext2MountVolume (
|
|||
PtrVCB->NoOfGroups = ( SuperBlock->s_blocks_count - SuperBlock->s_first_data_block
|
||||
+ SuperBlock->s_blocks_per_group - 1 )
|
||||
/ SuperBlock->s_blocks_per_group;
|
||||
if( SuperBlock->s_rev_level )
|
||||
{
|
||||
PtrVCB->InodeSize = SuperBlock->s_inode_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
PtrVCB->InodeSize = sizeof( EXT2_INODE );
|
||||
}
|
||||
|
||||
PtrVCB->PtrGroupDescriptors = Ext2AllocatePool( NonPagedPool, sizeof( Ext2GroupDescriptors ) * PtrVCB->NoOfGroups );
|
||||
|
||||
|
@ -465,9 +473,9 @@ Ext2MountVolume (
|
|||
ZeroSize.QuadPart = 0;
|
||||
if ( !NT_SUCCESS( Ext2CreateNewFCB(
|
||||
&PtrVCB->PtrRootDirectoryFCB, // Root FCB
|
||||
ZeroSize, // AllocationSize,
|
||||
ZeroSize, // EndOfFile,
|
||||
PtrRootFileObject, // The Root Dircetory File Object
|
||||
ZeroSize, // AllocationSize,
|
||||
ZeroSize, // EndOfFile,
|
||||
PtrRootFileObject, // The Root Dircetory File Object
|
||||
PtrVCB,
|
||||
PtrObjectName ) ) )
|
||||
{
|
||||
|
|
|
@ -184,7 +184,7 @@ NTSTATUS NTAPI Ext2PassDownMultiReadWriteIRP(
|
|||
}
|
||||
|
||||
for( i = 0; i < Count; i++ ) {
|
||||
DbgPrint("PASSING DOWN IRP %d TO TARGET DEVICE\n", i);
|
||||
// DbgPrint("PASSING DOWN IRP %d TO TARGET DEVICE\n", i);
|
||||
IoCallDriver( PtrVCB->TargetDeviceObject, PtrIoRuns[ i].PtrAssociatedIrp );
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ NTSTATUS NTAPI Ext2PassDownMultiReadWriteIRP(
|
|||
// Synchronous IO
|
||||
// Wait for the IO to complete...
|
||||
//
|
||||
DbgPrint("DEADLY WAIT (%d)\n", KeGetCurrentIrql());
|
||||
DbgPrint("DEADLY WAIT (%d)\n", KeGetCurrentIrql());
|
||||
KeWaitForSingleObject( PtrSyncEvent,
|
||||
Executive, KernelMode, FALSE, (PLARGE_INTEGER)NULL );
|
||||
DbgPrint("DEADLY WAIT DONE\n");
|
||||
|
|
|
@ -102,9 +102,9 @@ NTSTATUS NTAPI Ext2ReadInode (
|
|||
NumberOfBytesToRead = sizeof(EXT2_INODE); // LogicalBlockSize;
|
||||
|
||||
VolumeByteOffset.QuadPart = PtrVcb->PtrGroupDescriptors[ GroupNo ].InodeTablesBlock
|
||||
* LogicalBlockSize + Index * sizeof(EXT2_INODE);
|
||||
* LogicalBlockSize + Index * PtrVcb->InodeSize;
|
||||
//VolumeByteOffset.QuadPart = PtrVcb->InodeTableBlock[ GroupNo ] * LogicalBlockSize +
|
||||
// Index * sizeof(EXT2_INODE);
|
||||
// Index * PtrVcb->InodeSize;
|
||||
|
||||
TempOffset.QuadPart = Ext2Align64( VolumeByteOffset.QuadPart, LogicalBlockSize );
|
||||
if( TempOffset.QuadPart != VolumeByteOffset.QuadPart )
|
||||
|
@ -752,7 +752,7 @@ NTSTATUS NTAPI Ext2WriteInode(
|
|||
NumberOfBytesToRead = sizeof(EXT2_INODE);
|
||||
|
||||
VolumeByteOffset.QuadPart = PtrVcb->PtrGroupDescriptors[ GroupNo ].InodeTablesBlock
|
||||
* LogicalBlockSize + Index * sizeof(EXT2_INODE);
|
||||
* LogicalBlockSize + Index * PtrVcb->InodeSize;
|
||||
|
||||
TempOffset.QuadPart = Ext2Align64( VolumeByteOffset.QuadPart, LogicalBlockSize );
|
||||
if( TempOffset.QuadPart != VolumeByteOffset.QuadPart )
|
||||
|
|
Loading…
Reference in a new issue