Lines Matching refs:dentry

912 		DBG(3, "ino[0x%x] has inline dentry!\n", nid);
1393 u8 *bitmap, struct f2fs_dir_entry *dentry,
1408 name_len = le16_to_cpu(dentry[idx].name_len);
1433 struct f2fs_dentry *d = fsck->dentry;
1435 if (dentry[idx].file_type != F2FS_FT_REG_FILE)
1444 if (dump_node(sbi, le32_to_cpu(dentry[idx].ino), 0))
1452 new, le32_to_cpu(dentry[idx].ino),
1458 struct f2fs_dir_entry *dentry,
1467 if (dentry->hash_code != hash_code) {
1472 new, le32_to_cpu(dentry->hash_code),
1474 dentry->hash_code = cpu_to_le32(hash_code);
1494 static int f2fs_check_dirent_position(const struct f2fs_dir_entry *dentry,
1508 le32_to_cpu(dentry->hash_code) % nbucket);
1523 struct f2fs_dir_entry *dentry,
1532 if (le32_to_cpu(dentry->ino) != child->p_ino) {
1534 le32_to_cpu(dentry->ino), child->p_ino);
1535 dentry->ino = cpu_to_le32(child->p_ino);
1542 if (le32_to_cpu(dentry->ino) != F2FS_ROOT_INO(sbi)) {
1544 le32_to_cpu(dentry->ino));
1545 dentry->ino = cpu_to_le32(F2FS_ROOT_INO(sbi));
1548 } else if (le32_to_cpu(dentry->ino) != child->pp_ino) {
1550 le32_to_cpu(dentry->ino), child->pp_ino);
1551 dentry->ino = cpu_to_le32(child->pp_ino);
1556 if (f2fs_check_hash_code(get_encoding(sbi), casefolded, dentry, name, len, enc_name))
1568 static void nullify_dentry(struct f2fs_dir_entry *dentry, int offs,
1571 memset(dentry, 0, sizeof(struct f2fs_dir_entry));
1578 u8 *bitmap, struct f2fs_dir_entry *dentry,
1601 ino = le32_to_cpu(dentry[i].ino);
1609 name_len = le16_to_cpu(dentry[i].name_len);
1621 if (!IS_VALID_NID(sbi, le32_to_cpu(dentry[i].ino))) {
1622 ASSERT_MSG("Bad dentry 0x%x with invalid NID/ino 0x%x",
1623 i, le32_to_cpu(dentry[i].ino));
1625 FIX_MSG("Clear bad dentry 0x%x with bad ino 0x%x",
1626 i, le32_to_cpu(dentry[i].ino));
1634 ftype = dentry[i].file_type;
1636 ASSERT_MSG("Bad dentry 0x%x with unexpected ftype 0x%x",
1637 le32_to_cpu(dentry[i].ino), ftype);
1639 FIX_MSG("Clear bad dentry 0x%x with bad ftype 0x%x",
1648 name_len = le16_to_cpu(dentry[i].name_len);
1651 ASSERT_MSG("Bad dentry 0x%x with invalid name_len", i);
1653 FIX_MSG("Clear bad dentry 0x%x", i);
1666 /* Becareful. 'dentry.file_type' is not imode. */
1671 ret = __chk_dots_dentries(sbi, casefolded, &dentry[i],
1685 nullify_dentry(&dentry[i], i,
1697 if (f2fs_check_hash_code(get_encoding(sbi), casefolded, dentry + i, name, name_len, enc_name))
1703 ret = f2fs_check_dirent_position(dentry + i, en,
1708 FIX_MSG("Clear bad dentry 0x%x", i);
1720 le32_to_cpu(dentry[i].ino),
1721 dentry[i].file_type);
1724 dentry, max, i, last_blk, enc_name);
1731 NULL, le32_to_cpu(dentry[i].ino),
1740 le32_to_cpu(dentry[i].ino),
1742 dentry[i].file_type);
1782 d.bitmap, d.dentry, d.filename, d.max, 1,
1793 fsck->dentry = cur_dentry;
1826 de_blk->dentry, de_blk->filename,
1840 fsck->dentry = cur_dentry;
2213 fsck->dentry = calloc(sizeof(struct f2fs_dentry), 1);
2214 ASSERT(fsck->dentry != NULL);
2215 memcpy(fsck->dentry->name, "/", 1);
2216 fsck->dentry_end = fsck->dentry;
2660 struct dentry de;
3412 while (fsck->dentry) {
3413 struct f2fs_dentry *dentry = fsck->dentry;
3415 fsck->dentry = fsck->dentry->next;
3416 free(dentry);