Lines Matching refs:dnode

12 static loff_t get_pos(struct dnode *d, struct hpfs_dirent *fde)  in get_pos()
120 static struct hpfs_dirent *dnode_pre_last_de(struct dnode *d) in dnode_pre_last_de()
130 static struct hpfs_dirent *dnode_last_de(struct dnode *d) in dnode_last_de()
140 static void set_last_pointer(struct super_block *s, struct dnode *d, dnode_secno ptr) in set_last_pointer()
173 struct hpfs_dirent *hpfs_add_de(struct super_block *s, struct dnode *d, in hpfs_add_de()
204 static void hpfs_delete_de(struct super_block *s, struct dnode *d, in hpfs_delete_de()
215 static void fix_up_ptrs(struct super_block *s, struct dnode *d) in fix_up_ptrs()
223 struct dnode *dd; in fix_up_ptrs()
242 struct dnode *d, *ad, *rd, *nd = NULL; in hpfs_add_to_dnode()
392 struct dnode *d; in hpfs_add_dirent()
437 struct dnode *dnode; in move_to_top() local
448 if (!(dnode = hpfs_map_dnode(i->i_sb, dno, &qbh))) return 0; in move_to_top()
450 if (le32_to_cpu(dnode->up) != chk_up) { in move_to_top()
452 dno, chk_up, le32_to_cpu(dnode->up)); in move_to_top()
458 if (!(de = dnode_last_de(dnode))) { in move_to_top()
467 while (!(de = dnode_pre_last_de(dnode))) { in move_to_top()
468 dnode_secno up = le32_to_cpu(dnode->up); in move_to_top()
475 if (!(dnode = hpfs_map_dnode(i->i_sb, up, &qbh))) return 0; in move_to_top()
476 if (dnode->root_dnode) { in move_to_top()
481 de = dnode_last_de(dnode); in move_to_top()
487 le32_add_cpu(&dnode->first_free, -4); in move_to_top()
493 t = get_pos(dnode, de); in move_to_top()
503 hpfs_delete_de(i->i_sb, dnode, de); in move_to_top()
504 set_last_pointer(i->i_sb, dnode, ddno); in move_to_top()
522 struct dnode *dnode; in delete_empty_dnode() local
529 if (!(dnode = hpfs_map_dnode(i->i_sb, dno, &qbh))) return; in delete_empty_dnode()
530 if (le32_to_cpu(dnode->first_free) > 56) goto end; in delete_empty_dnode()
531 if (le32_to_cpu(dnode->first_free) == 52 || le32_to_cpu(dnode->first_free) == 56) { in delete_empty_dnode()
533 int root = dnode->root_dnode; in delete_empty_dnode()
534 up = le32_to_cpu(dnode->up); in delete_empty_dnode()
535 de = dnode_first_de(dnode); in delete_empty_dnode()
548 struct dnode *d1; in delete_empty_dnode()
573 if (!(dnode = hpfs_map_dnode(i->i_sb, up, &qbh))) return; in delete_empty_dnode()
575 de_end = dnode_end_de(dnode); in delete_empty_dnode()
576 for (de = dnode_first_de(dnode); de < de_end; de = de_next_de(de), p++) in delete_empty_dnode()
585 le32_add_cpu(&dnode->first_free, -4); in delete_empty_dnode()
587 (char *)dnode + le32_to_cpu(dnode->first_free) - (char *)de_next_de(de)); in delete_empty_dnode()
589 struct dnode *d1; in delete_empty_dnode()
599 …hpfs_error(i->i_sb, "delete_empty_dnode: dnode %08x, first_free == %03x", dno, le32_to_cpu(dnode->… in delete_empty_dnode()
606 struct dnode *d1; in delete_empty_dnode()
615 hpfs_delete_de(i->i_sb, dnode, de); in delete_empty_dnode()
632 struct hpfs_dirent *de_prev = dnode_pre_last_de(dnode); in delete_empty_dnode()
634 struct dnode *d1; in delete_empty_dnode()
681 hpfs_delete_de(i->i_sb, dnode, de_prev); in delete_empty_dnode()
685 le32_add_cpu(&dnode->first_free, 4); in delete_empty_dnode()
714 struct dnode *dnode = qbh->data; in hpfs_remove_dirent() local
723 if (depth && (de->down || (de == dnode_first_de(dnode) && de_next_de(de)->last))) { in hpfs_remove_dirent()
729 for_all_poss(i, hpfs_pos_del, (t = get_pos(dnode, de)) + 1, 1); in hpfs_remove_dirent()
730 hpfs_delete_de(i->i_sb, dnode, de); in hpfs_remove_dirent()
746 struct dnode *dnode; in hpfs_count_dnodes() local
758 if (!(dnode = hpfs_map_dnode(s, dno, &qbh))) return; in hpfs_count_dnodes()
759 if (hpfs_sb(s)->sb_chk) if (odno && odno != -1 && le32_to_cpu(dnode->up) != odno) in hpfs_count_dnodes()
760 …_dnodes: bad up pointer; dnode %08x, down %08x points to %08x", odno, dno, le32_to_cpu(dnode->up)); in hpfs_count_dnodes()
761 de = dnode_first_de(dnode); in hpfs_count_dnodes()
782 if ((de = de_next_de(de)) < dnode_end_de(dnode)) goto next_de; in hpfs_count_dnodes()
784 dno = le32_to_cpu(dnode->up); in hpfs_count_dnodes()
785 if (dnode->root_dnode) { in hpfs_count_dnodes()
797 struct quad_buffer_head *qbh, struct dnode **dn) in map_nth_dirent()
801 struct dnode *dnode; in map_nth_dirent() local
802 dnode = hpfs_map_dnode(s, dno, qbh); in map_nth_dirent()
803 if (!dnode) return NULL; in map_nth_dirent()
804 if (dn) *dn=dnode; in map_nth_dirent()
805 de = dnode_first_de(dnode); in map_nth_dirent()
806 de_end = dnode_end_de(dnode); in map_nth_dirent()
832 if (up && le32_to_cpu(((struct dnode *)qbh.data)->up) != up) in hpfs_de_as_down_as_possible()
833 …ointer; dnode %08x, down %08x points to %08x", up, d, le32_to_cpu(((struct dnode *)qbh.data)->up)); in hpfs_de_as_down_as_possible()
853 struct dnode *dnode; in map_pos_dirent() local
854 struct dnode *up_dnode; in map_pos_dirent()
860 if (!(de = map_nth_dirent(inode->i_sb, dno, pos, qbh, &dnode))) in map_pos_dirent()
864 if ((d = de_next_de(de)) < dnode_end_de(dnode)) { in map_pos_dirent()
880 if (dnode->root_dnode) goto bail; in map_pos_dirent()
882 if (!(up_dnode = hpfs_map_dnode(inode->i_sb, le32_to_cpu(dnode->up), &qbh0))) in map_pos_dirent()
890 "map_pos_dirent: pos crossed dnode boundary; dnode = %08x", le32_to_cpu(dnode->up)); in map_pos_dirent()
892 *posp = ((loff_t) le32_to_cpu(dnode->up) << 4) + c; in map_pos_dirent()
899 dno, le32_to_cpu(dnode->up)); in map_pos_dirent()
913 struct dnode *dnode; in map_dirent() local
922 if (!(dnode = hpfs_map_dnode(inode->i_sb, dno, qbh))) return NULL; in map_dirent()
924 de_end = dnode_end_de(dnode); in map_dirent()
925 for (de = dnode_first_de(dnode); de < de_end; de = de_next_de(de)) { in map_dirent()
953 struct dnode *dnode; in hpfs_remove_dtree() local
957 if (!(dnode = hpfs_map_dnode(s, dno, &qbh))) return; in hpfs_remove_dtree()
958 de = dnode_first_de(dnode); in hpfs_remove_dtree()
976 if (!(dnode = hpfs_map_dnode(s, dno = d1, &qbh))) return; in hpfs_remove_dtree()
977 de = dnode_first_de(dnode); in hpfs_remove_dtree()
1004 struct dnode *d; in map_fnode_dirent()