Lines Matching refs:entries
124 struct dx_entry entries[0]; member
130 struct dx_entry entries[0]; member
137 struct dx_entry *entries; member
152 static unsigned dx_get_count (struct dx_entry *entries);
153 static unsigned dx_get_limit (struct dx_entry *entries);
154 static void dx_set_count (struct dx_entry *entries, unsigned value);
155 static void dx_set_limit (struct dx_entry *entries, unsigned value);
216 static inline unsigned dx_get_count (struct dx_entry *entries) in dx_get_count() argument
218 return le16_to_cpu(((struct dx_countlimit *) entries)->count); in dx_get_count()
221 static inline unsigned dx_get_limit (struct dx_entry *entries) in dx_get_limit() argument
223 return le16_to_cpu(((struct dx_countlimit *) entries)->limit); in dx_get_limit()
226 static inline void dx_set_count (struct dx_entry *entries, unsigned value) in dx_set_count() argument
228 ((struct dx_countlimit *) entries)->count = cpu_to_le16(value); in dx_set_count()
231 static inline void dx_set_limit (struct dx_entry *entries, unsigned value) in dx_set_limit() argument
233 ((struct dx_countlimit *) entries)->limit = cpu_to_le16(value); in dx_set_limit()
253 static void dx_show_index (char * label, struct dx_entry *entries) in dx_show_index() argument
255 int i, n = dx_get_count (entries); in dx_show_index()
259 printk("%x->%u ", i? dx_get_hash(entries + i): 0, dx_get_block(entries + i)); in dx_show_index()
302 struct dx_entry *entries, int levels) in dx_show_entries() argument
305 unsigned count = dx_get_count (entries), names = 0, space = 0, i; in dx_show_entries()
310 for (i = 0; i < count; i++, entries++) in dx_show_entries()
312 u32 block = dx_get_block(entries), hash = i? dx_get_hash(entries): 0; in dx_show_entries()
313 u32 range = i < count - 1? (dx_get_hash(entries + 1) - hash): ~hash; in dx_show_entries()
318 dx_show_entries(hinfo, dir, ((struct dx_node *) bh->b_data)->entries, levels - 1): in dx_show_entries()
346 struct dx_entry *at, *entries, *p, *q, *m; in dx_probe() local
392 entries = (struct dx_entry *) (((char *)&root->info) + in dx_probe()
395 if (dx_get_limit(entries) != dx_root_limit(dir, in dx_probe()
407 count = dx_get_count(entries); in dx_probe()
408 if (!count || count > dx_get_limit(entries)) { in dx_probe()
416 p = entries + 1; in dx_probe()
417 q = entries + count - 1; in dx_probe()
431 at = entries; in dx_probe()
445 dxtrace(printk(" %x->%u\n", at == entries? 0: dx_get_hash(at), dx_get_block(at))); in dx_probe()
447 frame->entries = entries; in dx_probe()
452 at = entries = ((struct dx_node *) bh->b_data)->entries; in dx_probe()
453 if (dx_get_limit(entries) != dx_node_limit (dir)) { in dx_probe()
522 if (++(p->at) < p->entries + dx_get_count(p->entries)) in ext3_htree_next_block()
555 p->at = p->entries = ((struct dx_node *) bh->b_data)->entries; in ext3_htree_next_block()
766 struct dx_entry *entries = frame->entries; in dx_insert_block() local
768 int count = dx_get_count(entries); in dx_insert_block()
770 assert(count < dx_get_limit(entries)); in dx_insert_block()
771 assert(old < entries + count); in dx_insert_block()
772 memmove(new + 1, new, (char *)(entries + count) - (char *)(new)); in dx_insert_block()
775 dx_set_count(entries, count + 1); in dx_insert_block()
1228 dxtrace(dx_show_index ("frame", frame->entries)); in do_split()
1350 struct dx_entry *entries; in make_indexed_dir() local
1403 entries = root->entries; in make_indexed_dir()
1404 dx_set_block (entries, 1); in make_indexed_dir()
1405 dx_set_count (entries, 1); in make_indexed_dir()
1406 dx_set_limit (entries, dx_root_limit(dir, sizeof(root->info))); in make_indexed_dir()
1415 frame->entries = entries; in make_indexed_dir()
1416 frame->at = entries; in make_indexed_dir()
1492 struct dx_entry *entries, *at; in ext3_dx_add_entry() local
1503 entries = frame->entries; in ext3_dx_add_entry()
1522 dx_get_count(entries), dx_get_limit(entries))); in ext3_dx_add_entry()
1524 if (dx_get_count(entries) == dx_get_limit(entries)) { in ext3_dx_add_entry()
1526 unsigned icount = dx_get_count(entries); in ext3_dx_add_entry()
1532 if (levels && (dx_get_count(frames->entries) == in ext3_dx_add_entry()
1533 dx_get_limit(frames->entries))) { in ext3_dx_add_entry()
1543 entries2 = node2->entries; in ext3_dx_add_entry()
1552 unsigned hash2 = dx_get_hash(entries + icount1); in ext3_dx_add_entry()
1561 memcpy ((char *) entries2, (char *) (entries + icount1), in ext3_dx_add_entry()
1563 dx_set_count (entries, icount1); in ext3_dx_add_entry()
1568 if (at - entries >= icount1) { in ext3_dx_add_entry()
1569 frame->at = at = at - entries - icount1 + entries2; in ext3_dx_add_entry()
1570 frame->entries = entries = entries2; in ext3_dx_add_entry()
1574 dxtrace(dx_show_index ("node", frames[1].entries)); in ext3_dx_add_entry()
1576 ((struct dx_node *) bh2->b_data)->entries)); in ext3_dx_add_entry()
1583 memcpy((char *) entries2, (char *) entries, in ext3_dx_add_entry()
1588 dx_set_count(entries, 1); in ext3_dx_add_entry()
1589 dx_set_block(entries + 0, newblock); in ext3_dx_add_entry()
1594 frame->at = at = at - entries + entries2; in ext3_dx_add_entry()
1595 frame->entries = entries = entries2; in ext3_dx_add_entry()