MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2RefreshSuper

Function Ext2RefreshSuper

Ext4Fsd/ext3/generic.c:88–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87
88BOOLEAN
89Ext2RefreshSuper (
90 IN PEXT2_IRP_CONTEXT IrpContext,
91 IN PEXT2_VCB Vcb
92)
93{
94 LONGLONG offset;
95 IO_STATUS_BLOCK iosb;
96
97 offset = (LONGLONG) SUPER_BLOCK_OFFSET;
98 if (!CcCopyRead(
99 Vcb->Volume,
100 (PLARGE_INTEGER)&offset,
101 sizeof(EXT2_SUPER_BLOCK),
102 TRUE,
103 (PVOID)Vcb->SuperBlock,
104 &iosb )) {
105 return FALSE;
106 }
107
108 if (!NT_SUCCESS(iosb.Status)) {
109 return FALSE;
110 }
111
112 /* reload root inode */
113 if (Vcb->McbTree) {
114
115 if (!Ext2LoadInode(Vcb, &Vcb->McbTree->Inode))
116 return FALSE;
117
118 /* initializeroot node */
119 Vcb->McbTree->CreationTime = Ext2NtTime(Vcb->McbTree->Inode.i_ctime);
120 Vcb->McbTree->LastAccessTime = Ext2NtTime(Vcb->McbTree->Inode.i_atime);
121 Vcb->McbTree->LastWriteTime = Ext2NtTime(Vcb->McbTree->Inode.i_mtime);
122 Vcb->McbTree->ChangeTime = Ext2NtTime(Vcb->McbTree->Inode.i_mtime);
123 }
124
125 return TRUE;
126}
127
128VOID
129Ext2DropGroupBH(IN PEXT2_VCB Vcb)

Callers 1

Ext2RecoverJournalFunction · 0.85

Calls 2

Ext2LoadInodeFunction · 0.85
Ext2NtTimeFunction · 0.85

Tested by

no test coverage detected