Lines Matching refs:ent
128 struct hash_entry *ent; in fill_dir_block() local
210 ent = fd->harray + fd->num_array++; in fill_dir_block()
211 ent->dir = dirent; in fill_dir_block()
213 ent->ino = dirent->inode; in fill_dir_block()
215 ent->hash = EXT2_DIRENT_HASH(dirent); in fill_dir_block()
216 ent->minor_hash = EXT2_DIRENT_MINOR_HASH(dirent); in fill_dir_block()
218 ent->hash = ent->minor_hash = 0; in fill_dir_block()
224 &ent->hash, &ent->minor_hash); in fill_dir_block()
459 struct hash_entry *ent, *prev; in duplicate_search_and_fix() local
476 ent = fd->harray + i; in duplicate_search_and_fix()
477 prev = ent - 1; in duplicate_search_and_fix()
478 if (!ent->dir->inode || in duplicate_search_and_fix()
479 !same_name(cmp_ctx, ent->dir->name, in duplicate_search_and_fix()
480 ext2fs_dirent_name_len(ent->dir), in duplicate_search_and_fix()
484 pctx.dirent = ent->dir; in duplicate_search_and_fix()
485 if ((ent->dir->inode == prev->dir->inode) && in duplicate_search_and_fix()
487 e2fsck_adjust_inode_count(ctx, ent->dir->inode, -1); in duplicate_search_and_fix()
488 ent->dir->inode = 0; in duplicate_search_and_fix()
495 e2fsck_adjust_inode_count(ctx, ent->dir->inode, -1); in duplicate_search_and_fix()
496 ent->dir->inode = 0; in duplicate_search_and_fix()
501 new_len = ext2fs_dirent_name_len(ent->dir); in duplicate_search_and_fix()
507 memcpy(new_name, ent->dir->name, new_len); in duplicate_search_and_fix()
523 memcpy(ent->dir->name, new_name, new_len); in duplicate_search_and_fix()
524 ext2fs_dirent_set_name_len(ent->dir, new_len); in duplicate_search_and_fix()
528 &ent->hash, &ent->minor_hash); in duplicate_search_and_fix()
543 struct hash_entry *ent; in copy_dir_entries() local
585 ent = fd->harray + i; in copy_dir_entries()
586 if (ent->dir->inode == 0) in copy_dir_entries()
588 rec_len = ext2fs_dir_rec_len(ext2fs_dirent_name_len(ent->dir), in copy_dir_entries()
610 if (ent->hash == prev_hash) in copy_dir_entries()
611 outdir->hashes[outdir->num-1] = ent->hash | 1; in copy_dir_entries()
613 outdir->hashes[outdir->num-1] = ent->hash; in copy_dir_entries()
615 dirent->inode = ent->dir->inode; in copy_dir_entries()
617 ext2fs_dirent_name_len(ent->dir)); in copy_dir_entries()
619 ext2fs_dirent_file_type(ent->dir)); in copy_dir_entries()
624 memcpy(dirent->name, ent->dir->name, in copy_dir_entries()
627 EXT2_DIRENT_HASHES(dirent)->hash = ext2fs_cpu_to_le32(ent->hash); in copy_dir_entries()
629 ext2fs_cpu_to_le32(ent->minor_hash); in copy_dir_entries()
641 prev_hash = ent->hash; in copy_dir_entries()