- register struct buf *bp;
- struct buf *nbp, *blist;
- int s, dirty = 0;
-
- for (;;) {
- if (blist = vp->v_dirtyblkhd)
- /* void */;
- else if (blist = vp->v_cleanblkhd)
- /* void */;
- else
- break;
- for (bp = blist; bp; bp = nbp) {
-printf("lfs_vinvalbuf: ino %d, lblkno %d, blkno %lx flags %xl\n",
-VTOI(vp)->i_number, bp->b_lblkno, bp->b_blkno, bp->b_flags);
- nbp = bp->b_blockf;
- s = splbio();
- if (bp->b_flags & B_BUSY) {
-printf("lfs_vinvalbuf: buffer busy, would normally sleep\n");
-/*
- bp->b_flags |= B_WANTED;
- sleep((caddr_t)bp, PRIBIO + 1);
-*/
- splx(s);
- break;
- }
- bremfree(bp);
- bp->b_flags |= B_BUSY;
- splx(s);
- if (bp->b_flags & B_DELWRI) {
- dirty++; /* XXX */
-printf("lfs_vinvalbuf: buffer dirty (DELWRI). would normally write\n");
- break;
- }
- if (bp->b_vp != vp)
- reassignbuf(bp, bp->b_vp);
- else
- bp->b_flags |= B_INVAL;
- brelse(bp);
- }
- }
- if (vp->v_dirtyblkhd || vp->v_cleanblkhd)
- panic("lfs_vinvalbuf: flush failed");
- return (dirty);
+ register struct inode *ip;
+ register struct ufid *ufhp;
+
+ ip = VTOI(vp);
+ ufhp = (struct ufid *)fhp;
+ ufhp->ufid_len = sizeof(struct ufid);
+ ufhp->ufid_ino = ip->i_number;
+ ufhp->ufid_gen = ip->i_gen;
+ return (0);