Lines Matching refs:dno
208 dnode_secno dno = d->self;
214 if (dd->up != dno || dd->root_dnode) {
215 dd->up = dno;
226 static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
252 if (!(d = hpfs_map_dnode(i->i_sb, dno, &qbh))) {
259 if (hpfs_stop_cycles(i->i_sb, dno, &c1, &c2, "hpfs_add_to_dnode")) {
305 for_all_poss(i, hpfs_pos_subst, ((loff_t)dno << 4) | pos, ((loff_t)adno << 4) | pos);
312 for_all_poss(i, hpfs_pos_subst, ((loff_t)dno << 4) | pos, 4);
319 for_all_poss(i, hpfs_pos_del, (loff_t)dno << 4, pos);
322 dno = ad->up = d->up;
360 set_last_pointer(i->i_sb, rd, dno);
361 dno = rdno;
382 dnode_secno dno;
385 dno = hpfs_inode->i_dno;
388 if (hpfs_stop_cycles(i->i_sb, dno, &c1, &c2, "hpfs_add_dirent")) return 1;
389 if (!(d = hpfs_map_dnode(i->i_sb, dno, &qbh))) return 1;
398 dno = de_down_pointer(de);
412 c = hpfs_add_to_dnode(i, dno, name, namelen, new_de, 0);
425 dnode_secno dno, ddno;
433 dno = from;
436 if (hpfs_stop_cycles(i->i_sb, dno, &c1, &c2, "move_to_top"))
438 if (!(dnode = hpfs_map_dnode(i->i_sb, dno, &qbh))) return 0;
442 dno, chk_up, dnode->up);
446 chk_up = dno;
449 hpfs_error(i->i_sb, "move_to_top: dnode %08x has no last de", dno);
454 dno = de_down_pointer(de);
460 hpfs_free_dnode(i->i_sb, dno);
463 for_all_poss(i, hpfs_pos_subst, ((loff_t)dno << 4) | 1, 5);
473 hpfs_error(i->i_sb, "move_to_top: dnode %08x doesn't point down to %08x", up, dno);
481 dno = up;
500 return dno;
508 static void delete_empty_dnode(struct inode *i, dnode_secno dno)
518 if (hpfs_stop_cycles(i->i_sb, dno, &c1, &c2, "delete_empty_dnode")) return;
519 if (!(dnode = hpfs_map_dnode(i->i_sb, dno, &qbh))) return;
528 hpfs_error(i->i_sb, "delete_empty_dnode: root dnode %08x is empty", dno);
532 hpfs_free_dnode(i->i_sb, dno);
544 dno, up, (unsigned long)i->i_ino);
559 for_all_poss(i, hpfs_pos_subst, ((loff_t)dno << 4) | 1, (loff_t) 12);
566 if (de->down) if (de_down_pointer(de) == dno) goto fnd;
567 hpfs_error(i->i_sb, "delete_empty_dnode: pointer to dnode %08x not found in dnode %08x", dno, up);
570 for_all_poss(i, hpfs_pos_subst, ((loff_t)dno << 4) | 1, ((loff_t)up << 4) | p);
588 hpfs_error(i->i_sb, "delete_empty_dnode: dnode %08x, first_free == %03x", dno, dnode->first_free);
615 /*printk("UP-TO-DNODE: %08x (ndown = %08x, down = %08x, dno = %08x)\n", up, ndown, down, dno);*/
616 dno = up;
629 dno = up;
686 dno = up;
699 int hpfs_remove_dirent(struct inode *i, dnode_secno dno, struct hpfs_dirent *de,
707 hpfs_error(i->i_sb, "hpfs_remove_dirent: attempt to delete first or last dirent in dnode %08x", dno);
727 dnode_secno a = move_to_top(i, down, dno);
733 delete_empty_dnode(i, dno);
738 void hpfs_count_dnodes(struct super_block *s, dnode_secno dno, int *n_dnodes,
750 if (hpfs_stop_cycles(s, dno, &c1, &c2, "hpfs_count_dnodes #1")) return;
753 if (!(dnode = hpfs_map_dnode(s, dno, &qbh))) return;
755 hpfs_error(s, "hpfs_count_dnodes: bad up pointer; dnode %08x, down %08x points to %08x", odno, dno, dnode->up);
762 ptr, dno, odno);
769 odno = dno;
770 dno = de_down_pointer(de);
778 ptr = dno;
779 dno = dnode->up;
791 static struct hpfs_dirent *map_nth_dirent(struct super_block *s, dnode_secno dno, int n,
797 dnode = hpfs_map_dnode(s, dno, qbh);
809 hpfs_error(s, "map_nth_dirent: n too high; dnode = %08x, requested %08x", dno, n);
813 dnode_secno hpfs_de_as_down_as_possible(struct super_block *s, dnode_secno dno)
816 dnode_secno d = dno;
825 if (!(de = map_nth_dirent(s, d, 1, &qbh, NULL))) return dno;
844 dnode_secno dno;
853 dno = pos >> 6 << 2;
855 if (!(de = map_nth_dirent(inode->i_sb, dno, pos, qbh, &dnode)))
886 if (up_de->down && de_down_pointer(up_de) == dno) {
894 dno, dnode->up);
904 struct hpfs_dirent *map_dirent(struct inode *inode, dnode_secno dno,
916 if (hpfs_stop_cycles(inode->i_sb, dno, &c1, &c2, "map_dirent")) return NULL;
917 if (!(dnode = hpfs_map_dnode(inode->i_sb, dno, qbh))) return NULL;
923 if (dd) *dd = dno;
928 dno = de_down_pointer(de);
945 void hpfs_remove_dtree(struct super_block *s, dnode_secno dno)
950 dnode_secno d1, d2, rdno = dno;
952 if (!(dnode = hpfs_map_dnode(s, dno, &qbh))) return;
958 hpfs_free_dnode(s, dno);
959 dno = d1;
968 hpfs_free_dnode(s, dno);
971 if (!(dnode = hpfs_map_dnode(s, dno = d1, &qbh))) return;
976 hpfs_free_dnode(s, dno);
984 hpfs_free_dnode(s, dno);
1000 dnode_secno dno, downd;
1030 dno = upf->u.external[0].disk_secno;
1035 if (!(d = hpfs_map_dnode(s, dno, qbh))) {
1046 hpfs_error(s, "pointer to dnode %08x not found in dnode %08x", downd, dno);
1058 dno = de_down_pointer(de);
1061 if (hpfs_stop_cycles(s, dno, &c1, &c2, "map_fnode_dirent #1")) {
1076 downd = dno;
1077 dno = d->up;