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

Function dx_insert_block

Ext4Fsd/ext3/htree.c:1358–1370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1356}
1357
1358static void dx_insert_block(struct dx_frame *frame, u32 hash, u32 block)
1359{
1360 struct dx_entry *entries = frame->entries;
1361 struct dx_entry *old = frame->at, *new = old + 1;
1362 unsigned int count = dx_get_count(entries);
1363
1364 ASSERT(count < dx_get_limit(entries));
1365 ASSERT(old < entries + count);
1366 memmove(new + 1, new, (char *)(entries + count) - (char *)(new));
1367 dx_set_hash(new, hash);
1368 dx_set_block(new, block);
1369 dx_set_count(entries, count + 1);
1370}
1371
1372struct buffer_head *
1373 ext3_dx_find_entry(struct ext2_icb *icb, struct dentry *dentry,

Callers 2

ext3_dx_add_entryFunction · 0.85
do_splitFunction · 0.85

Calls 5

dx_get_countFunction · 0.85
dx_get_limitFunction · 0.85
dx_set_hashFunction · 0.85
dx_set_blockFunction · 0.85
dx_set_countFunction · 0.85

Tested by

no test coverage detected