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

Function Ext2LoadGroupBH

Ext4Fsd/ext3/generic.c:166–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164
165
166BOOLEAN
167Ext2LoadGroupBH(IN PEXT2_VCB Vcb)
168{
169 struct super_block *sb = &Vcb->sb;
170 struct ext4_sb_info *sbi = &Vcb->sbi;
171 unsigned long i;
172 BOOLEAN rc = FALSE;
173
174 __try {
175
176 ExAcquireResourceExclusiveLite(&Vcb->sbi.s_gd_lock, TRUE);
177 ASSERT (NULL != sbi->s_gd);
178
179 for (i = 0; i < sbi->s_gdb_count; i++) {
180 ASSERT (sbi->s_gd[i].block);
181 if (sbi->s_gd[i].bh)
182 continue;
183 sbi->s_gd[i].bh = sb_getblk(sb, sbi->s_gd[i].block);
184 if (!sbi->s_gd[i].bh) {
185 DEBUG(DL_ERR, ("Ext2LoadGroupBH: can't read group descriptor %d\n", i));
186 DbgBreak();
187 __leave;
188 }
189 sbi->s_gd[i].gd = (struct ext4_group_desc *)sbi->s_gd[i].bh->b_data;
190 }
191
192 rc = TRUE;
193
194 } __finally {
195
196 ExReleaseResourceLite(&Vcb->sbi.s_gd_lock);
197 }
198
199 return rc;
200}
201
202
203BOOLEAN

Callers 2

Ext2LoadGroupFunction · 0.85
ext4_get_group_descFunction · 0.85

Calls 1

sb_getblkFunction · 0.85

Tested by

no test coverage detected